# passwd shutdown1
# vi /etc/security/prof_attr
Shut:::Able to shutdown the system:
# rolemod -P Shut,All shutdown1
# more /etc/user_attr
# useradd -u 4009 -g 10 -m -d /export/home/username -s /bin/ksh -R shutdown1 username
# passwd username
# grep username /etc/user_attr
# vi /etc/security/exec_attr
Shut:suser:cmd:::/usr/sbin/shutdown:uid=0
用username登录后执行su shutdown1后执行关机命令
标签: