Administrative Account
Revision as of 19:21, 24 July 2021 by 172.26.0.1 (talk)
In case you lost the admin password, which is the first user of the MediaWiki system, you can always go to the database and change the password using SQL. Detailed instructions here: (Sample code is shown as follows)
UPDATE user SET user_password = MD5( CONCAT( user_id, '-', MD5( 'NEWPASS' ) ) ) WHERE user_id =1;
The following instruction steps are inspired by the article[1]:
Command Line Operations
To add a new user account with administrator access, one must follow these steps:
- Log in to the system with root access, using a terminal applications.
- Create a new user name, say
xlp
, by using theadduser
command:
adduser xlp
- Make the user xlp, possess
admin
rights.
usermod -aG sudo xlp
- Verify its rights using
id xlp
- Log in as
xlp
, by key in the following command
su - xlp
- Then run some
sudo
command
sudo ls -l /etc/
If the the above worked, you have created an administrative account with user name:id xlp
.