centos sudo 유저 추가
CentOS2019. 1. 30. 12:13
728x90
원문 : http://devtainer.blogspot.com/2011/03/sudo-in-centos_16.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # chmod u+w /etc/sudoers # vi /etc/sudoers case 1. 특정 사용자가 sudo를 사용할 수 있하는 설정 devtainer ALL=(ALL) ALL case 2. 그룹에 포함된 모든 사용자가 sudo를 사용할 수 있하는 설정 %wheel ALL=(ALL) ALL case 3. 패스워드 생략 설정 %wheel ALL=(ALL) NOPASSWD: ALL devtainer ALL=(ALL) NOPASSWD: ALL case 4. sudo를 사용하여 cd 마운트, 언마운트 가능하도록 설정 %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom #users 그룹의 멤버는 sudo를 사용하여 cd롬 마운트와 언마운트만 허용 # chmod u-w /etc/sudoers | cs |