Sun Microsystems Inc. SunOS 5.10 Generic January 2005
-bash-3.00$ cat /etc/user_attr
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# /etc/user_attr
#
# execution attributes for profiles. see user_attr(4)
#
#ident "@(#)user_attr 1.1 07/01/31 SMI"
#
#
adm::::profiles=Log Management
lp::::profiles=Printer Management
postgres::::type=role;profiles=Postgres Administration,All
root::::auths=solaris.*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no;min_label=admin_low;clearance=admin_high
shutadmin::::type=role;profiles=shutdown
user01::::type=normal;roles=norshut
Basic Solaris User
All
norshut
/usr/sbin/shutdown: Only root can run /usr/sbin/shutdown //普通用户不能执行shutdown命令
Password:
uid=100(norshut) gid=1(other)
$ /usr/ucb/whoami
norshut
$ profiles //查看norshut有哪些rights profile
shutdown
Basic Solaris User
All
$ profiles –l //查看当前的rights profiles能执行哪些命令
/usr/sbin/shutdown uid=0
All:
*
Broadcast Message from root (pts/2) on node01 Fri Nov 27 21:25:02...
THE SYSTEM node01 IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged