Inom
Hitta mer dokumentationSupportresurser som ingår | Ladda ner denna bok i PDF (1139 KB)
Chapter 3 Managing User AccountsThis chapter describes essential decisions to make before creating regular users, and provides additional background for managing user accounts. The chapter assumes that the install team has set up a limited number of user accounts. These users can assume the roles that configure and administer the Trusted Solaris operating environment. See Trusted Solaris Installation and Configuration for details. This chapter includes the following procedures: Setup Before Creating User AccountsThe following decisions and setup affect what users can do in a Trusted Solaris environment and how easy it is for them to do it. Some decisions are the same as those you would make when installing a network of the Solaris software or other UNIX systems. However, there are decisions specific to the Trusted Solaris environment that affect site security and ease of use. Decisions to Implement Before Creating Users
Decisions to Implement Before Users Log In
Managing Default User Security AttributesSettings in the policy.conf(4) and the label_encodings(4) files together define default Trusted Solaris security attributes for user accounts. The values set explicitly in a user template override these values. Some of the values set in these files also apply to role accounts. The User Template default values are described in detail in "Adding or Modifying a User Account". Label Encodings File DefaultsThe label_encodings file defines the Minimum Label, Clearance, and Default Label View that are applied to a user account if the attributes are not explicitly set for the account. The values shown in the following table are those in the Trusted Solaris version of the label_encodings file. Typically, a site replaces the Trusted Solaris version during system configuration with a site version. Table 3-1 Security Defaults for Users in the label_encodings File
At some sites the names of administrative labels are considered to be classified information. The value EXTERNAL hides that classified information. The user account's clearance and minimum label must be dominated by the highest label and must dominate the minimum clearance that are defined in the user ACCREDITATION RANGE section in the label_encodings(4) file. See Trusted Solaris Label Administration for more about labels. The following algorithm determines which value the system uses:
policy.conf File DefaultsThe following table shows the default settings in the policy.conf file. Table 3-2 Security Defaults for Users and Roles in the policy.conf
So, users by default are authorized to view SMC data and to edit their own cron jobs; their system locks after 30 minutes of no activity; they can see the label that they are working in; they will not be able to log in if they fail to provide the correct password for three consecutive tries; they must type in a new password (possibilities will not be generated for them); and they can execute all commands and actions on the system without privilege. The authorizations (AUTHS_GRANTED) and rights profiles (PROFS_GRANTED) that are defined in this file are in addition to any authorizations and profiles assigned to individual accounts. For the other fields, the following algorithm determines which value the system uses:
Managing Remote LoginsA remote login between two Trusted Solaris hosts is considered to be an extension of the current login session. An authorization is not required when:
For all other remote logins, including logins with the telnet(1) command, the Remote Login authorization is required. See "To Create a Rights Profile" for how to create and see "To Assign an Authorization to a User" for how to assign a new profile to a user. Managing Initialization FilesAdministrators who are setting up shell initialization files must consider certain details that are either not as important in standard UNIX systems or do not apply. The differences exist because of the following aspects of the Trusted Solaris implementation:
As in the Solaris environment, files in the skeleton directory are copied into the user's home directory. However, in the Trusted Solaris environment, a user has a home directory for every label that the user works in. So, files from the skeleton directory are copied to the user's first home directory single-label directory (SLD). A user's first SLD is created by the administrator during account creation. The first SLD is at the label of the creating process, Example 3-1 User Home Directory Structure after First Login
Example 3-2 User Home Directory Structure after Working at Different Labels
To copy or link the startup files into other labeled home directories requires setup on the part of the Security Administrator role. See "To Set Up Startup Files for Users" for the procedure. This section provides the background information needed to understand how startup files are administered in the Trusted Solaris environment. Also see the man pages for the csh(1), ksh(1), sh(1), and pfexec(1) commands. A set of startup files is sourced by the window system as it comes up. The user's login shell determines which startup files are sourced, as shown in the following table.
Another set of startup files is read whenever a user brings up a shell in a terminal emulator, such as the cmdtool, shelltool, or dtterm (see "Controlling Which Startup Files Are Read When a Shell Comes Up"). Controlling the Sourcing of Startup FilesIn the Trusted Solaris CDE window system, as in the standard CDE window system, accounts get an editable $HOME/.dtprofile file which controls whether the .login or .profile files are read by the desktop at login. See also the man pages for login(1) and profile(4). See "The Sourcing of Startup Files for the Profile Shell User" for the one exception to this behavior. .dtprofile FilesIn the Trusted Solaris environment, by default the .login or .profile files are not sourced by the window system. A .dtprofile file controls the sourcing. One of the following .dtprofile files is copied into each account's $HOME/.dtprofile:
The following figure illustrates how $HOME/.dtprofile is installed. Figure 3-1 How $HOME/.dtprofile is Installed
In the default /usr/dt/config/sys.dtprofile, the See the comments in the /etc/dt/config/sys.dtprofile file and "To Invoke .login or .profile During Login", if changing the default is consistent with your site's security policy. Note - If any modifications to a .login or .profile accidentally prevent the user from logging in, the user may use the Failsafe Session option on the CDE Login screen. Failsafe Session allows a login without reading any startup files. The Sourcing of Startup Files for the Profile Shell UserThe algorithm for reading .dtprofile files when an account has a profile shell as its login shell prevents an account from executing commands that are not permitted to the account. When a user's login shell is specified as the pfsh, pfcsh, or pfksh, the window system does not consult an account's home directory. The window system uses either the default /usr/dt/config/sys.dtprofile or a version modified by the Security Administrator role in /etc/dt/config/sys.dtprofile. Figure 3-2 How $HOME/.dtprofile is Bypassed for Profile Shell Users
Controlling Which Startup Files Are Read When a Shell Comes UpAs in the Solaris environment, shell initialization files are used to set search paths and other environment variables and to execute some useful commands and functions. The following table shows which startup files are read by default when each type of shell is launched. Table 3-3 Startup Files Read at Shell Initialization
The .profile or .login files are invoked only if the shell is also identified as the account's login shell. A shell that is invoked with a prefix of - (for example: - csh) is a login shell. This means, for example, that when a C shell is started using csh (without a - prefix), the .login file is not executed. Forcing dtterm to Source $HOME/.login or .profileBy default, a shell started by dtterm is not launched as a login shell. Therefore, the $HOME/.login and $HOME/.profile files are not read. Any user or role can enable dtterm to launch a login shell. See "To Force dtterm to Launch New Shells as Login Shells " for the procedure. Note - The default .profile file for all roles contains a function to alias the adminvi(1M) command to vi(1), but the function does not take effect unless the Dtterm*LoginShell: true entry is made in the $HOME/.Xdefaults-hostname file. See "To Alias vi to adminvi". Administering Skeleton Directories
The default skeleton path used by the Users tool in the Solaris Management Console
is /etc/skel. By default, a set of initialization files for each of the shells are copied from the /etc/skel directory into a user account's Example 3-3 Contents of the Default /etc/skel Directory
In the Trusted Solaris environment, files are automatically copied from the skeleton directory only into the SLD at the account's minimum label. Either the user or the administrator must create the files .copy_files and .link_files as described in "Using .copy_files and .link_files", to ensure that subsequently-created SLDs get copies of initialization files. Accessing All Man Pages
To ensure that the man(1) command can find all of the man
pages for the products that combine to make the Trusted Solaris product (Solaris software, CDE, and X windows), the Using .copy_files and .link_filesThe Trusted Solaris files .copy_files and .link_files are useful for multilevel accounts. The files help to automate the copying or linking of startup files into every SLD in an account's home directory MLD. Whenever a user creates a workspace at a new label, dtsession runs the updatehome(1M) command to read the contents of .copy_files and .link_files in the account's minimum label SLD, and copy or link every listed file into the new workspace. The .copy_files file is useful when a user wants a slightly different startup file in different SLDs. Copying is desirable, for example, if users need to use different mail aliases when they are working at different labels. See "To Set Up Startup Files for Users" for an example. The .link-files file is useful when a startup file should be identical at any label that it is invoked. For example, if there is one printer to handle labeled print jobs, that printer can be defined once in a startup file, like .cshrc. When the .cshrc file is listed in the file .link-files, .cshrc is linked to SLDs at other labels when those SLDs are created. See "To Set Up Startup Files for Users" for an example. The following worksheet provides some examples of common files to copy or link. Table 3-4 Planning Worksheet for .copy_files and .link_files
Administering cron, at, and batch JobsIn the Trusted Solaris environment, the Job Scheduler tool in the Solaris Management Console manages jobs. This section describes the difference in managing cron(1M) and its associated commands in the Trusted Solaris environment. See the System Administration Guide, Volume 2 for basic cron information. For Trusted Solaris modifications see also the man pages for at(1), atq(1), atrm(1), cron(1M), and crontab(1). In the default policy.conf(4) file, all users are assigned the Basic Solaris User profile. This profile includes the Edit Owned Jobs authorization. The authorization enables users to manage their own cron or at jobs. The crontab file is generated by a user or role account using the crontab(1) command. The atjob file is generated by a user or role account using the at(1) or batch command. In the Trusted Solaris environment, the crontab, at, and batch commands must be in one of the account's rights profiles. In the Trusted Solaris environment, the crontabs and atjobs spool directories are MLDs that hold job files at different labels. With MLDs as spool directories, one user can have multiple crontab files at different labels within the crontabs directory, and, similarly, one user can have multiple atjob files at different labels within the atjobs directory. Running a Job with a Profile ShellIf a job requires that a profile shell execute the job, the Security Administrator role must ensure that all of the job's commands are also in a rights profile assigned to the invoking user. cron jobs can be executed using a profile shell. Profile shells are documented on the pfexec(1) man page. A profile shell can execute a cron job if:
For at jobs there is a third case in which the profile shell is used. A user can use the at program with the -c (for csh), -k (for ksh), -s (for sh), option along with the -P (for profile shell) option to specify the shell which should run the job. Therefore, at jobs are executed in the profile shell if:
Running Privileged Commands in Scheduled JobsIf a command in an at or cron job needs to run with privileges, either forced or inheritable privileges may be made available. Enabling a command to run with forced privileges, so that the privileges apply no matter who executes the command, is insecure practice. Therefore, the Security Administrator role typically does the following to make the privileges available by inheritance:
How the UNIX Domain Socket is Used for CommunicationsThe communication mechanism between crontab(1), at(1), atrm(1), and cron(1M) in the Trusted Solaris environment is a UNIX domain socket. See the man page for libt6(3NSL). The cron(1M) command is modified to create and bind the UNIX domain socket at After it creates the UNIX domain socket, the cron command is changed to run at An ancillary file is created in the crontabs MLD for each crontab file and in the atjobs MLD for each atjob file. Modification of a crontab or an atjob file also changes the ancillary file data. The ancillary file is named username.ad for a crontab file, and jobname.ad for an atjob file. The ancillary file contains information used by cron to set up a job. Trusted Solaris software is delivered with the following /var/spool/cron/crontabs files:
Permitting Users to Access Others' JobsThe default Trusted Solaris security policy does not permit users to access jobs owned by other users. To enable certain users to access jobs belonging to other users, the Security Administrator role can edit system files, or assign to the user a network-wide authorization through the Scheduled Jobs tool in the Solaris Management Console. Conditions for Access to Other's JobsAn account invoking the at, atq, atrm, or crontab commands can look at, edit, or remove jobs belonging to another user only when the following conditions are met. For the at, atq, or atrm commands, the following conditions must apply:
For the crontab command, the following conditions must apply:
Assigning the SMC to Normal User AccountsThe Basic Solaris User profile provides the authorizations to view most information in the Solaris Management Console (SMC) tools. The default /etc/security/policy.conf file ships with an entry that assigns the Basic Solaris User profile to all users. If the administrator has removed the Basic Solaris User rights profile from the policy.conf(4) file or assigns this rights profile only to selected users, most users will not be able to view the SMC information. By default, only administrative roles have the required authorizations in their rights profiles to modify information in the SMC. While a Security Administrator can assign one or more of the required authorizations to a user account, such assignment bypasses the trusted path. Preparing for User Accounts (Tasks)To Modify Default User Label AttributesWhen these changes are made while the system is being configured on the name service master, the files can be copied to each client computer as it is configured.
To Modify policy.conf DefaultsWhen these changes are on the name service master, every user and role that is created inherits these values.
To Set Up Startup Files for UsersUsers can put a .copy_files or .link_files into their home directory MLD at the SLD that corresponds to the minimum sensitivity label or can modify the files in the minimum label SLD if the files are already there. This procedure is for the administrator role to automate the setup for a site.
To Invoke .login or .profile During LoginNote - This procedure changes the default for all users on the host where the change is made.
To Force dtterm to Launch New Shells as Login ShellsDo this procedure once for each home directory SLD at which the account works, or do it once in the home directory SLD at the account's minimum label, and then list the .Xdefaults-hostname in either .copy_files or .link_files, as described in "Using .copy_files and .link_files".
To Customize Shell Initialization Files for Users
To Enable a User to Track Others' Jobs on a SystemA Security Administrator might want to set up a server, such as an audit administration server, so that the main user of the server can monitor all at jobs and cron jobs running on the system.
To Enable a User to Track All Others' JobsThe ability to monitor the cron and at jobs of other users is typically restricted to a role. However, the Security Administrator can assign an authorizations to enable a user to monitor others' jobs.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||