Users can put a .copy_files file and .link_files file into their home directory at the label that corresponds to their minimum sensitivity label. Users can also modify the existing .copy_files and .link_files files at the users' minimum label. This procedure is for the administrator role to automate the setup for a site.
You must be in the System Administrator role in the global zone. For details, see How to Enter the Global Zone in Trusted Extensions.
Create two Trusted Extensions startup files.
You are going to add .copy_files and .link_files to your list of startup files.
# cd /etc/skel # touch .copy_files .link_files |
Customize the .copy_files file.
Start the trusted editor.
For details, see How to Edit Administrative Files in Trusted Extensions.
Type the full pathname to the .copy_files file.
/etc/skel/.copy_files |
Type into .copy_files, one file per line, the files to be copied into the user's home directory at all labels.
Use .copy_files and .link_files Files for ideas. For sample files, see Example 13–5.
Customize the .link_files file.
Customize the other startup files for your users.
For a discussion of what to include in startup files, see Customizing a User’s Work Environment in System Administration Guide: Basic Administration.
For details, see How to Customize User Initialization Files in System Administration Guide: Basic Administration.
For an example, see Example 13–5.
(Optional) Create a skelP subdirectory for users whose default shell is a profile shell.
The P indicates the Profile shell.
Copy the customized startup files into the appropriate skeleton directory.
Use the appropriate skelX pathname when you create the user.
The X indicates the letter that begins the shell's name, such as B for Bourne, K for Korn, C for a C shell, and P for Profile shell.
In this example, the security administrator configures files for every user's home directory. The files are in place before any user logs in. The files are at the user's minimum label. At this site, the users' default shell is the C shell.
The security administrator creates a .copy_files and a .link_files file in the trusted editor with the following contents:
## .copy_files for regular users ## Copy these files to my home directory in every zone .mailrc .mozilla .soffice :wq |
## .link_files for regular users with C shells ## Link these files to my home directory in every zone .cshrc .login .Xdefaults .Xdefaults-hostname :wq |
## .link_files for regular users with Korn shells # Link these files to my home directory in every zone .ksh .profile .Xdefaults .Xdefaults-hostname :wq |
In the shell initialization files, the administrator ensures that the users' print jobs go to a labeled printer.
## .cshrc file setenv PRINTER conf-printer1 setenv LPDEST conf-printer1 |
## .ksh file export PRINTER conf-printer1 export LPDEST conf-printer1 |
The administrator modifies the .Xdefaults-home-directory-server file to force the dtterm command to source the .profile file for a new terminal.
## Xdefaults-HDserver Dtterm*LoginShell: true |
The customized files are copied to the appropriate skeleton directory.
$ cp .copy_files .link_files .cshrc .login .profile \ .mailrc .Xdefaults .Xdefaults-home-directory-server \ /etc/skelC $ cp .copy_files .link_files .ksh .profile \ .mailrc .Xdefaults .Xdefaults-home-directory-server \ /etc/skelK |
If you create a .copy_files files at your lowest label, then log in to a higher zone to run the updatehome command and the command fails with an access error, try the following:
Verify that from the higher-level zone you can view the lower-level directory.
higher-level zone# ls /zone/lower-level-zone/home/username ACCESS ERROR: there are no files under that directory |
If you cannot view the directory, then restart the automount service in the higher-level zone:
higher-level zone# svcadm restart autofs |
Unless you are using NFS mounts for home directories, the automounter in the higher-level zone should be loopback mounting from /zone/lower-level-zone/export/home/username to /zone/lower-level-zone/home/username.