Managing User Accounts and Groups (Tasks)
This chapter describes how to set up and maintain user accounts and groups.
For information on the procedures associated with setting up and maintaining user accounts and groups, see "Setting Up User Accounts (Task Map)" and "Maintaining User Accounts (Task Map)".
For background information about managing user accounts and groups, see Chapter 4, Managing User Accounts and Groups (Overview).
Setting Up User Accounts (Task Map)
Task | Description | For Instructions |
---|---|---|
1. Start the Solaris Management Console launcher | Start the Solaris Management Console launcher to access the User Accounts and Groups Tools. | "How to Start the Console as Superuser or as a Role" or "How to Start the Solaris Management Console in a Name Service Environment" |
2. (Optional) Customize User Initialization Files | You can set up user initialization files (.cshrc, .profile, .login), so you can provide new users with consistent environments. | |
3. (Optional) Add a Group | You can add groups to help administer users by using the Groups Tool. | See Solaris Management Console online help |
4. (Optional) Set up a User Template | You can create a user template so you don't have to manually add all similar user properties. | See Solaris Management Console online help |
5. Add a User | You can add a user account by using the Users Tool. | See Solaris Management Console online help |
6. (Optional) Add Rights or a Role to a User | You can add rights or a role to a user so the user can perform a specific command or task. | See Solaris Management Console online help |
7. Share the User's Home Directory | You must share the user's home directory so the directory can be remotely mounted from the user's system. | |
8. Mount the User's Home Directory | You must mount the user's home directory on the user's system. |
User Information Data Sheet
You might find it useful to create a form like the one that follows to gather information about users before adding their accounts.
Item | Description |
User Name: |
|
Role Name: |
|
Profiles or Authorizations: |
|
User Name: |
|
UID: |
|
Primary Group: |
|
Secondary Groups: |
|
Comment: |
|
Default Shell: |
|
Password Status and Aging: |
|
Home Directory Server Name: |
|
Home Directory Path Name: |
|
Mounting Method: |
|
Permissions on Home Directory: |
|
Mail Server: |
|
Department Name: |
|
Department Administrator: |
|
Manager: |
|
Employee Name: |
|
Employee Title: |
|
Employee Status: |
|
Employee Number: |
|
Start Date: |
|
Add to These Mail Aliases: |
|
Desktop System Name: |
|
How to Customize User Initialization Files
Become superuser or assume an equivalent role on the system where the users' home directories are created and shared.
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.
Copy the default user initialization files into the directories 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).
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".
Set the permissions for the user initialization files.
# chmod 744 /shared-dir/skel/user-type/.*
Verify that the permissions for the user initialization files are correct.
# ls -la /shared-dir/skel/*
Example--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--.cshrc File".
# mkdir /export/skel/enduser # cp /etc/skel/local.cshrc /export/skel/enduser/.cshrc (Edit .cshrc file ) # chmod 744 /export/skel/enduser/.* |
How to Share a User's Home Directory
Become superuser or assume an equivalent role on the system that contains the home directory.
Verify that the mountd daemon is running.
# ps -ef | grep mountd root 176 1 0 May 02 ? 0:19 /usr/lib/nfs/mountd
The /usr/lib/nfs/mountd line shows whether the mountd daemon is running.
If the mountd daemon is not running, start it.
# /etc/init.d/nfs.server start
List the file systems that are shared on the system.
# share
Select one of the following based on whether the file system containing the user's home directory is already shared.
If the user's home directory is already shared, go to the verification step below.
If the user's home directory is not shared, go to Step 6.
Edit the /etc/dfs/dfstab file and add the following line.
share -F nfs /file-system
file-system is the file system containing the user's home directory that you need to share. By convention, the file system is /export/home.
Share the file systems listed in the /etc/dfs/dfstab file.
# shareall -F nfs
This command executes all the share commands in the /etc/dfs/dfstab file, so you do not have to wait to reboot the system.
Verify that a user's home directory is shared, as follows:
# share