Go to main content

Trusted Extensions Configuration and Administration

Exit Print View

Updated: March 2019
 
 

How to Configure Startup Files for Users in Trusted Extensions

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.

Before You Begin

You must be in the System Administrator role in the global zone.

  1. 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
  2. Customize the .copy_files file.
    1. In an editor, type the full pathname to the .copy_files file.
      # pfedit /etc/skel/.copy_files
    2. 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 15, Customizing Startup Files for Users.

  3. Customize the .link_files file.
    1. In an editor, type the full pathname to the .link_files.
      # pfedit /etc/skel/.link_files
    2. Type into .link_files, one file per line, the files to be linked into the user's home directory at all labels.
  4. Customize the other startup files for your users.
  5. (Optional) Create a skelP subdirectory for users whose default shell is a profile shell.

    The P indicates the Profile shell.

  6. Copy the customized startup files into the appropriate skeleton directory.
  7. 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.

Example 15  Customizing Startup Files for Users

In this example, the system 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 system administrator creates a .copy_files and a .link_files file with the following contents:

## .copy_files for regular users
## Copy these files to my home directory in every zone
.mailrc
.mozilla
:wq
## .link_files for regular users with bash shells
## Link these files to my home directory in every zone
.bashrc
.bashrc.user
.login
:wq
## .link_files for regular users with Korn shells
# Link these files to my home directory in every zone
.ksh
.profile
:wq

In the shell initialization files, the administrator adds customizations.

## .bashrc file
EDITOR=/usr/bin/vim ;  export EDITOR
ETOOLS /net/tools/etools; export ETOOLS
## .ksh file
export EDITOR emacs
export ETOOLS /net/tools/etools

The customized files are copied to the appropriate skeleton directory.

# cp .copy_files .link_files .bashrc .bashrc.user .cshrc \
.login .profile .mailrc /etc/skelC
# cp .copy_files .link_files .ksh .profile .mailrc \
/etc/skelK

Troubleshooting

    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.