System Administration Guide: Basic Administration

ProcedureHow to Customize User Initialization Files

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Create a skeleton directory for each type of user.


    # mkdir /shared-dir/skel/user-type
    
    shared-dir

    The name of a directory that is available to other systems on the network.

    user-type

    The name of a directory to store initialization files for a type of user.

  3. Copy the default user initialization files into the directories that you created for different types of users.


    # cp /etc/skel/local.cshrc /shared-dir/skel/user-type/.cshrc
    # cp /etc/skel/local.login /shared-dir/skel/user-type/.login
    # cp /etc/skel/local.profile /shared-dir/skel/user-type/.profile
    

    Note –

    If the account has profiles assigned to it, then the user has to launch a special version of the shell called a profile shell to use commands (with any security attributes) that are assigned to the profile. There are three profile shells corresponding to the types of shells: pfsh (Bourne shell), pfcsh (C shell), and pfksh (Korn shell). For information about profile shells, see Role-Based Access Control (Overview) in System Administration Guide: Security Services.


  4. Edit the user initialization files for each user type and customize them based on your site's needs.

    For a detailed description on the ways to customize the user initialization files, see Customizing a User's Work Environment.

  5. Set the permissions for the user initialization files.


    # chmod 744 /shared-dir/skel/user-type/.*
    
  6. Verify that the permissions for the user initialization files are correct.


    # ls -la /shared-dir/skel/*
    

Example 5–1 Customizing User Initialization Files

The following example shows how to customize the C-shell user initialization file in the /export/skel/enduser directory designated for a particular type of user. For an example of a .cshrc file, see Example 4–3.


# mkdir /export/skel/enduser
# cp /etc/skel/local.cshrc /export/skel/enduser/.cshrc
 
(Edit .cshrc file)
# chmod 744 /export/skel/enduser/.*