|
||||||||||||||||||||||||||||
1. Security Services (Overview) Part II System, File, and Device Security 2. Managing Machine Security (Overview) 3. Controlling Access to Systems (Tasks) 4. Virus Scanning Service (Tasks) 5. Controlling Access to Devices (Tasks) 6. Using the Basic Audit Reporting Tool (Tasks) 7. Controlling Access to Files (Tasks) Part III Roles, Rights Profiles, and Privileges 8. Using Roles and Privileges (Overview) 9. Using Role-Based Access Control (Tasks) 10. Role-Based Access Control (Reference) Part IV Solaris Cryptographic Services 13. Solaris Cryptographic Framework (Overview) 14. Solaris Cryptographic Framework (Tasks) 15. Solaris Key Management Framework Part V Authentication Services and Secure Communication 16. Using Authentication Services (Tasks) 19. Using Solaris Secure Shell (Tasks) 20. Solaris Secure Shell (Reference) 21. Introduction to the Kerberos Service 22. Planning for the Kerberos Service 23. Configuring the Kerberos Service (Tasks) 24. Kerberos Error Messages and Troubleshooting 25. Administering Kerberos Principals and Policies (Tasks) 26. Using Kerberos Applications (Tasks) 27. The Kerberos Service (Reference) 28. Solaris Auditing (Overview) 29. Planning for Solaris Auditing 30. Managing Solaris Auditing (Tasks) |
Managing RBACThe Solaris Management Console GUI is the preferred method for managing RBAC. Note - Do not attempt to administer RBAC with the command line and the graphical user interface at the same time. Conflicting changes could be made to the configuration, and the behavior would be unpredictable. Both tools can administer RBAC, but you cannot use both tools concurrently. How to Change the Password of a RoleBefore You BeginYou must have assumed a role that includes the User Security profile or have switched to superuser. You cannot be in the role whose password you want to change. A role cannot change its own password.
Example 9-13 Changing a Local Role's Password With the passwd CommandIn this example, superuser changes the password of the local operadm role. # passwd -r files operadm New password: Type new password Re-enter new password: Retype new password Example 9-14 Changing a Role's Password in an LDAP RepositoryIn this example, the Primary Admin role changes the password of the operadm role in the LDAP directory service. $ passwd -r ldap operadm New password: Type new password Re-enter new password: Retype new password Example 9-15 Changing a Role's Password With the smrole modify CommandIn this example, the administrator contacts the Solaris Management Console server to change the operadm password in the NIS domain. When the administrator does not provide the password before pressing the Return key, the New Password: prompt appears. $ /usr/sadm/bin/smrole -D nis:/examplehost/example.domain \ -r primaryadm -l <Type primaryadm password> \ modify -- -n operadm -P Press the Return key New Password: a!2@3#4$5%6*7 $ How to Change the Properties of a RoleBefore You BeginYou must have assumed the role of Primary Administrator or have switched to superuser to change the properties of a role. Role properties include password, rights profiles, and authorizations. Note - To change a role's password property, see How to Change the Password of a Role.
Example 9-16 Changing a Local Role's Properties With the rolemod CommandIn this example, the operadm role is modified to include the Media Restore rights profile. $ rolemod -c "Handles printers, backup, AND restore" \ -P "Printer Management,Media Backup,Media Restore,All" operadm Example 9-17 Changing a Local Role's Properties With the smrole modify CommandIn the following example, the operadm role is modified to add the Media Restore rights profile. $ /usr/sadm/bin/smrole -r primaryadm -l <Type primaryadm password> \ modify -- -n operadm -c "Handles printers, backup, AND restore" \ -p "Media Restore" Example 9-18 Changing a Role in a Domain With the smrole modify CommandIn the following example, the clockmgr role is changed. The NIS user whose ID is 108 can no longer assume the role. The NIS user whose ID is 110 can assume the role clockmgr. $ /usr/sadm/bin/smrole -D nis:/examplehost/example.domain \ -r primaryadm -l <Type primaryadm password> \ modify -- -n clockmgr -r 108 -u 110 How to Create or Change a Rights ProfileA rights profile is a property of a role. You should create or change a rights profile when the prof_attr database does not contain a rights profile that fulfills your needs. To learn more about rights profiles, see RBAC Rights Profiles. Before You BeginTo create or change a rights profile, you must have assumed the role of Primary Administrator or have switched to superuser.
Example 9-19 Modifying a Rights Profile From the Command LineIn the following example, the Network Management rights profile is made a supplementary profile of the Network Security rights profile. The role that contains the Network Security profile can now configure the network and hosts, as well has run security-relevant commands. $ /usr/sadm/bin/smprofile -D nisplus:/example.host/example.domain \ -r primaryadm -l <Type primaryadm password> \ modify -- -n "Network Security" \ -d "Manage network and host configuration and security" \ -m RtNetConfSec.html -p "Network Management" The administrator created a new help file, RtNetConfSec.html, and placed it in the /usr/lib/help/profiles/locale/C directory, before running this command. Example 9-20 Modifying an Existing Rights ProfileIn the following example, the security administrator of MyCompany customizes the Console User rights profile. Another goal is to retain the customized rights profile when the Solaris OS is updated to a later version. First, the administrator closes the Solaris Management Console. Then, the administrator opens the prof_attr file, copies the Console User rights profile to the next line, and renames the second entry. The administrator uses the existing help file, RtConsUser.html. # vi /etc/security/prof_attr Console User:::Manage System as the Console User:help=RtConsUser.html MyCompany Console User:::Manage System as the Console User:help=RtConsUser.html The administrator assumes the secadmin role. The secadmin role can modify the security features of a system. The secadmin role opens the Solaris Management Console, clicks the System Configuration and the Users tool, types the role password, and double-clicks the Rights tool. The administrator double-clicks the MyCompany Console User rights profile. Under the Authorizations tab, the administrator adds two authorizations to the Authorizations Included list and saves the changes. When the system is patched or updated to a later version of the Solaris OS, the Console User rights profile is updated and the MyCompany Console User rights profile is not changed. Example 9-21 Creating a New Rights Profile With the Rights ToolThe following table shows sample data for a hypothetical rights profile that is called “Build Administrator”. This rights profile includes the commands in the subdirectory /usr/local/swctrl/bin. These commands have an effective UID of 0. The Build Administrator rights profile would be useful for administrators who manage the builds and versioning for software development.
TroubleshootingCheck the following if the rights profile does not provide the role with the capabilities that you expect:
How to Change the RBAC Properties of a UserUser properties include password, rights profiles, and authorizations. The most secure method of giving a user administrative capabilities is to assign a role to the user. For a discussion, see Security Considerations When Directly Assigning Security Attributes. Before You BeginYou must have assumed the role of Primary Administrator or have switched to superuser to change the properties of a user.
Example 9-22 Modifying a Local User's RBAC Properties From the Command LineIn this example, the user jdoe can now assume the role of System Administrator. $ usermod -R sysadmin jdoe Example 9-23 Modifying a User's RBAC Properties With the smuser CommandIn this example, the user jdoe is assigned two roles, System Administrator and Operator. Because the user and the roles are defined locally, the -D option is not necessary. $ /usr/sadm/bin/smuser -r primaryadm -l <Type primaryadm password> \ modify -- -n jdoe -a sysadmin -a operadm In the following example, the user is defined in the NIS name service. Therefore, the -D option is required. Two roles are defined in the name service. One role, root, is defined locally. $ /usr/sadm/bin/smuser -D nis:/examplehost/example.domain \ -r primaryadm -l <Type primaryadm password> \ modify -- -n jdoe -a sysadmin -a operadm -a root How to Add RBAC Properties to Legacy ApplicationsA legacy application is a command or set of commands. The security attributes are set for each command in a rights profile. The rights profile is then included in a role. A user who assumes the role can run the legacy application with the security attributes. To add legacy applications to the Solaris Management Console, see Adding Tools to the Solaris Management Console in System Administration Guide: Basic Administration. Before You BeginYou must have assumed the role of Primary Administrator or have switched to superuser to change the security attributes of a command in a rights profile.
Example 9-24 Adding Security Attributes to Commands in a ScriptIf a command in a script needs to have the setuid bit or setgid bit set to succeed, the script executable and the command must have the security attributes added in a rights profile. Then, the rights profile is included in a role, and the role is assigned to a user. When the user assumes the role and executes the script, the command runs with the security attributes. To add security attributes to a command or shell script, see How to Create or Change a Rights Profile. Example 9-25 Checking for Authorizations in a Script or ProgramTo have a script for authorizations, you need to add a test that is based on the auths command. For detailed information about this command, see the auths(1) man page. For example, the following line tests if the user has the authorization that is supplied as the $1 argument: if [ `/usr/bin/auths|/usr/xpg4/bin/grep $1` ]; then echo Auth granted else echo Auth denied fi To be more complete, the test should include logic that checks for other authorizations that use wildcards. For example, to test if the user has the solaris.admin.usermgr.write authorization, you would need to check for the following strings:
If you are writing a program, use the function getauthattr() to test for the authorization. |
|||||||||||||||||||||||||||
|