System Administration Commands smprofile(1M)
NAME
smprofile - manage profiles in the prof_attr and exec_attr
databasesSYNOPSIS
/usr/sadm/bin/smprofile subcommand [ auth_args] --
[subcommand_args]
DESCRIPTION
The smprofile command manages one or more profiles in the
prof_attr(4) or exec_attr(4) databases in the local /etc
files name service or an NIS name service. subcommandssmprofile subcommands are:
add Adds a new profile (right) to the prof_attr(4)
database. To add a profile, the administrator must have the solaris.profmgr.write authorization.delete Deletes a profile from the prof_attr(4) database,
deletes all associated entries from theexec_attr(4) database, and deletes the assigned
profile from the user_attr(4) database. To delete
a profile, the administrator must have the solaris.profmgr.execattr.write and solaris.profmgr.write authorization.list Lists one or more profiles from the prof_attr(4)
or exec_attr(4) databases. To list a profile, the
administrator must have the solaris.profmgr.read authorization.modify Modifies a profile in the prof_attr(4) database.
To modify a profile, the administrator must have the solaris.profmgr.write authorization. OPTIONSThe smprofile authentication arguments, auth_args, are
derived from the smc(1M) arg set and are the same regardlessof which subcommand you use. The smprofile command requires
the Solaris Management Console to be initialized for the command to succeed (see smc(1M)). After rebooting theSolaris Management Console server, the first Solaris Manage-
ment Console connection might time out, so you might need to retry the command.SunOS 5.11 Last change: 11 Dec 2009 1
System Administration Commands smprofile(1M)
The subcommand-specific options, subcommand_args, must come
after the auth_args and must be separated from them by the
-- option.
auth_args
The valid auth_args are -D, -H, -l, -p, -r, and -u; they are
all optional. If no auth_args are specified, certain
defaults will be assumed and the user may be prompted foradditional information, such as a password for authentica-
tion purposes. These letter options can also be specified by their equivalent option words preceded by a double dash. Forexample, you can use either -D or --domain with the domain
argument.-D | --domain 13;domain
Specifies the default domain that you want to manage.The syntax of domain is type:/host_name/domain_name,
where type is nis, dns, ldap, or file; host_name is the
name of the machine that serves the domain; anddomain_name is the name of the domain you want to
manage.If you do not specify this option, the Solaris Manage-
ment Console assumes the file default domain on whatever server you choose to manage, meaning that changes are local to the server. Toolboxes can change the domain ona tool-by-tool basis; this option specifies the domain
for all other tools.-H | --hostname 13;host_name:port
Specifies the host_name and port to which you want to
connect. If you do not specify a port, the system con-
nects to the default port, 898. If you do not specifyhost_name:port, the Solaris Management Console connects
to the local host on port 898. You may still have to choose a toolbox to load into the console. To overridethis behavior, use the smc(1M) -B option, or set your
console preferences to load a "home toolbox" by default.-l | --rolepassword 13;role_password
Specifies the password for the role_name. If you specify
a role_name but do not specify a role_password, the sys-
tem prompts you to supply a role_password. Passwords
specified on the command line can be seen by any user on the system, hence this option is considered insecure.SunOS 5.11 Last change: 11 Dec 2009 2
System Administration Commands smprofile(1M)
-p | --password 13;password
Specifies the password for the user_name. If you do not
specify a password, the system prompts you for one. Passwords specified on the command line can be seen by any user on the system, hence this option is considered insecure.-r | --rolename 13;role_name
Specifies a role name for authentication. If you do not specify this option, no role is assumed.-u | --username 13;user_name
Specifies the user name for authentication. If you do not specify this option, the user identity running the console process is assumed.--
This option is required and must always follow the preceding options. If you do not enter the precedingoptions, you must still enter the -- option.
subcommand_args
Note: Descriptions and other arg options that contain white spaces must be enclosed in double quotes. To add privileges to or modify privileges in a profile entry, the administrator must have the solaris.admin.privilege.write authorization. See privileges(5). o For subcommand add:-a addauth1 -a addauth2 . . .
(Optional) Specifies the authorization name(s) to add to the new profile. The administratormust have the solaris.profmgr.write authoriza-
tion and must have the corresponding "grant" authorization. A "grant" authorization is onein which the lowest component of the authoriza-
tion name is replaced by the word grant. For example, to grant some profile theSunOS 5.11 Last change: 11 Dec 2009 3
System Administration Commands smprofile(1M)
solaris.role.write authorization, the adminis-
trator needs that authorization and also the solaris.role.grant authorization. For more information on granting authorizations, seeauth_attr(4).
-d description
Specifies the description of the new profile.-h
(Optional) Displays the command's usage state-
ment.-m html_help
Specifies the HTML help file name for the new profile. The help file name must be put in the/usr/lib/help/profiles/locale/C directory.
-n name
Specifies the name of the new profile.-p addprof1 -p addprof2 . . .
(Optional) Specifies the supplementary profile name(s) to add to the new profile.-I inherited_privs
Specifies the inherited privilege name(s) toadd to the new prof_attr(4) entry.
To add privileges to or modify privileges in a profile entry, the administrator must have the solaris.admin.privilege.write authorization. See privileges(5). o For subcommand delete:SunOS 5.11 Last change: 11 Dec 2009 4
System Administration Commands smprofile(1M)
-h (Optional) Displays the command's usage
statement.-n name Specifies the name of the profile you
want to delete. o For subcommand list:-h (Optional) Displays the
command's usage state-
ment.-l (Optional) Displays the
detailed output for each profile in a block ofkey:value pairs, fol-
lowed by a blank linethat delimits each pro-
file block. Each key:value pair is displayed on a separate line. All the attributesassociated with a pro-
file from the prof_attr
and exec_attr databases
are displayed. If you do not specify this option,only the specified pro-
file name(s) and associ-
ated profile description(s) are displayed.-n name1 -n name2 . . . (Optional) Specifies the
profile(s) that you want to display. If you do not specify a profile name, all profiles are displayed. o For subcommand modify:SunOS 5.11 Last change: 11 Dec 2009 5
System Administration Commands smprofile(1M)
-a addauth1 -a addauth2 . . .
(Optional) Specifies the authorization name(s) to add to the profile. The administrator mustcurrently have been granted each of the speci-
fied authorizations and must have the ability to grant each of those authorizations to otherusers or roles. For more information on grant-
ing authorizations, see auth_attr(4).
-d description
(Optional) Specifies the new description of the profile.-h
(Optional) Displays the command's usage state-
ment.-m html_help
(Optional) Specifies the new HTML help file name of the profile. If you change this name, you must accordingly rename the help file nameentered in the /usr/lib/help/profiles/locale/C directory.
-n name
Specifies the name of the profile you want to modify.-p addprof1 -p addprof2 . . .
(Optional) Specifies the supplementary profilename(s) to add to the profile. The administra-
tor must have the solaris.profmgr.assign authorization to add any profile and the solaris.profmgr.delegate authorization to add any profile that has been assigned to the authenticated user.-q delprof1 -q delprof2 . . .
(Optional) Specifies the supplementary profileSunOS 5.11 Last change: 11 Dec 2009 6
System Administration Commands smprofile(1M)
name(s) to delete from the profile. The administrator must have the solaris.profmgr.assign authorization to delete any profile and the solaris.profmgr.delegate authorization to delete any profile that has been assigned to the authenticated user.-r delauth1 -r delauth2 . . .
(Optional) Specifies the authorization name(s) to delete from the profile. The administratormust have the solaris.profmgr.write authoriza-
tion and must have the corresponding "grant" authorization. For more information about"grant" authorizations, see the -a option
description for the add subcommand above.-I inherited_privs
Specifies the inherited privilege name(s) tomodify in the prof_attr(4) entry.
To add privileges to or modify privileges in a profile entry, the administrator must have the solaris.admin.privilege.write authorization. See privileges(5).EXAMPLES
Example 1 Creating a new profile The following creates a new User Manager profile on the local file system. The new profile description is Manage users and groups, and the authorizations assigned are solaris.admin.usermgr.write and solaris.admin.usermgr.read. The supplementary profile assigned is Operator. The help file name is RtUserMgmt.html../smprofile add -H myhost -p mypasswd -u root -- -n "User Manager" \
-d "Manage users and groups" -a solaris.admin.usermgr.write \
-a solaris.admin.usermgr.read -p Operator -m RtUserMgmt.html
Example 2 Deleting a profileSunOS 5.11 Last change: 11 Dec 2009 7
System Administration Commands smprofile(1M)
The following deletes the User Manager profile from the local file system:./smprofile delete -H myhost -p mypasswd -u root -- -n "User Manager"
Example 3 Listing all profilesThe following lists all profiles and their associated pro-
file descriptions on the local file system../smprofile list -H myhost -p mypasswd -u root --
Example 4 Modifying a profile The following modifies the User Manager profile on the local file system. The new profile description is Manage world, the new authorization assignment is solaris.admin.usermgr.* authorizations, and the new supplementary profile assignmentis All. (The -a option argument must be enclosed in double
quotes when the wildcard character (*) is used.)./smprofile modify -H myhost -p mypasswd -u root -- -n "User Manager" \
-d "Manage world" -a "solaris.admin.usermgr.*" -p All
ENVIRONMENT VARIABLESSee environ(5) for a description of the JAVA_HOME environ-
ment variable, which affects the execution of the smprofile
command. If this environment variable is not specified, the /usr/java location is used. See smc(1M). EXIT STATUS The following exit values are returned: 0 Successful completion. 1 Invalid command syntax. A usage message displays. 2 An error occurred while executing the command. An error message displays.SunOS 5.11 Last change: 11 Dec 2009 8
System Administration Commands smprofile(1M)
FILESThe following files are used by the smprofile command:
/etc/security/exec_attr Rights profiles database. See
exec_attr(4).
/etc/security/prof_attr Profile description database. See
prof_attr(4).
/etc/user_attr Extended user attribute database.
See user_attr(4).
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWmga ||_____________________________|_____________________________|
____________________________________________________________
| Interface Stability Committed ||___________________________________________________________|
SEE ALSO
smc(1M), auth_attr(4), exec_attr(4), prof_attr(4),
user_attr(4), attributes(5), environ(5)
SunOS 5.11 Last change: 11 Dec 2009 9