SCSA10-1 Objective 4.1 - Solaris user account and initialization file adminstration
Ahh, users.. can’t live with them.. can’t live without… anyway, users on a Solaris system are important not only because they give humans an identity on the system, but also because all files and processes are owned by a specific user. Administering users and their initialization files has a great impact on system operation.
Explain and perform Solaris 10 OS user administration, and manage user accounts and initialization files.
While there are GUI tools for adding users, in my experience these are not tested in the exams. Adding a user from the command line is more testable and arguably more important in an admin’s life.
Adding a user in this manner does not set the user’s password. To set or change the user password, usr the passwd command.
A user can be deleted with the userdel command, userdel userid
Keep in mind that this command does not remove the user’s home directory (the -r switch will take care of that).
Initialization files are essentially shell scripts that whose contents are sourced by a shell when it starts. A user’s initialization files live in the user’s home directory and the file used depends on the shell in use. Bourne and derivative shells (sh, ksh, bash, zsh) use .profile while C-shell and derivative shells (csh, tcsh) use .cshrc for their initialization. The Korn shell also uses a supplemental .kshrc file. These are hidden files because they start with a period — to list them with ls, you need to use the -a option.
When a user is created, these initialization files can be created automatically with copies of files placed in a skeleton directory, /etc/skel by default. All of the files in this directory will be copied into the new user’s home directory. To customize the .cshrc file received by a newly provisioned user, edit the file /etc/skel/.chsrc Any file in the skeleton directory (such as new user instructions, welcome file, shell scripts, etc.) will be copied into the user’s home directory.
