Add a user into sudo on Linux
Create a new user
root@server:~# adduser username
Adding user `username' ...
Adding new group `username' (1001) ...
Adding new user `username' (1001) with group `username' ...
Creating home directory `/home/username' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for username
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
Add the user into the sudo group
root@mserver:~# adduser username sudo
Adding user `username' to group `sudo' ...
Adding user username to group sudo
Done.
Switch to the new user account
root@mal-eum:~# su - username
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
username@server:~$
댓글
댓글 쓰기