커널 배포판 |
4.4.0-87-generic |
커널 버전 |
#110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 |
운영체제 |
GNU/Linux |
1 2 3 | root@master:/$ visudo -f /etc/sudoers | cs |
* sudoers 파일은 일반적인 vi 명령어와 달리 visudo 명령어로 진행합니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/s$ # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d | cs |
* 추가하고자 하는 계정을 위의 "root ALL=(ALL:ALL) ALL" 이하 부분에 작성합니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # # This file MUST be edited with the 'visudo' command as root. # # Please consider adding local content in /etc/sudoers.d/ instead of # directly modifying this file. # # See the man page for details on how to write a sudoers file. # Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/s$ # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL test ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d | cs |
* 추가하려는 계정은 test 이며 추가 후의 모습입니다.
'Operating System > Linux' 카테고리의 다른 글
SSH 생성 및 분배 (0) | 2017.10.10 |
---|---|
disk mount (0) | 2017.10.10 |
방화벽 ON / OFF (0) | 2017.09.28 |
host 파일 설정 (0) | 2017.09.26 |
maven 설치 (0) | 2017.09.26 |