Sudo is a program which can be used by normal users to execute programs as super user or any other user. Sudo access is controlled by /etc/sudoers. The users listed in /etc/sudoers file can execute commands with an effective user id of 0 and a group id of root's group.
The file '/etc/sudoers' should be edited with the editor "visudo".
First, create a user called "ctechz"
# useradd ctechz
# passwd ctechz
To give a specific group of users limited root privileges, edit the file with visudo as follows:
# visudo
03. Go down to the line ‘# User privilege specification‘and add the following line.
ctechz ALL=(ALL) ALL
ctechz : name of user to be allowed to use sudo
ALL : Allow sudo access from any terminal ( any machine ).
(ALL) : Allow sudo command to be executed as any user.
ALL : Allow all commands to be executed.
OR
Create a user with uid 0
# useradd -u 0 -o jeff
-u, --uid UID force use the UID for the new user account
-o, --non-unique allow create user with duplicate
OR
Create a Normal user and edit its uid in /etc/passwd file and make it as ZERO
No comments:
Post a Comment