fbpx
Recommended Services
Supported Scripts
06 1
Lets show you how to create a secondary root user.
To add a user and allow him the root privileges by editing the /etc/passwd file. Add a user as root
# useradd newuser

set a password for the new user

# passwd newuser

Once done, edit the ‘passwd’ file

# vi /etc/passwd

set the UID:GUD bits to 0:0. Say for example the new user is ‘admin’, the line should look like

Quote:
admin:x:0:0::/home/admin:/sbin/nologin

Note: This method increases the security risk on the server and the best method is to add the new user in the sudoers list. You can also allow a list of commands for the new user beyond which he won’t be able to execute any commands as root.

Share this Post

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.