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

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.



이 블로그의 인기 게시물

mongoDB admin 권한 설정방법 How to enable access control for mongo DB

Install node and yarn on Linux

Install pm2 via yarn globally