본문으로 바로가기

* Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64)


* 사용자 추가 및 sudo 권한 주기


* 사용자 추가

root@localhost:/etc# adduser uuser

Adding user `uuser' ...

Adding new group `uuser' (1001) ...

Adding new user `uuser' (1001) with group `uuser' ...

Creating home directory `/home/uuser' ...

Copying files from `/etc/skel' ...

Enter new UNIX password:

Retype new UNIX password:

passwd: password updated successfully

Changing the user information for uuser

Enter the new value, or press ENTER for the default

        Full Name []: uuser

        Room Number []:

        Work Phone []:

        Home Phone []:

        Other []:

Is the information correct? [Y/n]Y



* sudo 권한 주기

root@localhost:/etc# vi /etc/sudoers

root@localhost:/etc# cat /etc/sudoers | grep uuser

uuser    ALL=(ALL:ALL) ALL

/etc/sudoers 파일에 사용자를 추가한다. root 권한으로 수정해도 read only 파일이므로 vi에서 w! 옵션으로 저장해야 저장된다.



* 생성 및 권한 확인

root@localhost:/etc# ssh uuser@0

The authenticity of host '0 (0.0.0.0)' can't be established.

localhost@0's password:

Added user uuser.


Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.2.0-27-generic x86_64)


 * Documentation:  https://help.ubuntu.com/


  System information as of Fri Apr  1 10:49:12 KST 2016



  Graph this data and manage this system at:

    https://landscape.canonical.com/


68 packages can be updated.

56 updates are security updates.



The programs included with the Ubuntu system are free software;

the exact distribution terms for each program are described in the

individual files in /usr/share/doc/*/copyright.


Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by

applicable law.


user@uuserhome:~$ sudo su -

[sudo] password for uuser:

root@uuserhome:~# id

uid=0(root) gid=0(root) groups=0(root)