solaris中将系统关机权限赋给一个普通用户

来源:岁月联盟 编辑:zhu 时间:2008-03-13
solaris中将系统关机权限赋给一个普通用户内容简介:】 # roleadd -u 5000 -g 10 -m -d /export/home/shutdown shutdown1 # passwd shutdown1 # vi /etc/security/prof_attr Shut:::Able to shutdown the system: # rolemod -P Shut,All shutdown1 # more /et # roleadd -u 5000 -g 10 -m -d /export/home/shutdown shutdown1
  
  # 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后执行关机命令

图片内容