日期:2014-05-16 浏览次数:20708 次
# groupadd -g 102 test # useradd -u 1003 -g 102 -d /home/test1 -s /bin/bash \ -c "Test 1" -m -k /etc/skel test1
# chmod u+w /etc/sudoers # vi /etc/sudoers ## Next comes the main part: which users can run what software on ## which machines (the sudoers file can be shared between multiple ## systems). ## Syntax: ## ## user MACHINE=COMMANDS ## ## The COMMANDS section may have other options added to it. ## ## Allow root to run any commands anywhere root ALL=(ALL) ALL test1 ALL=(ALL) ALL # 执行sudo命令时需要输入密码 # test1 ALL=NOPASSWD: ALL # 不需要输入密码 ## Allows members of the 'sys' group to run networking, software, ## service management apps and more. # %sys ALL = NETWORKING, SOFTWARE, SERVICES, STORAGE, DELEGATING, PROCESSES, LOCATE, DRIVERS ## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL ## Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL