Wednesday, August 13, 2014

Account Management

Every user on a UNIX machine must have an account. 
Components of a user account are:

  • login name (also called a username).
  • password.
  • The numeric user identifier or UID.
  • The numeric group identifier or GID.
  • home directory.
  • login shell.
  • startup files.


Add users from GUI tools



Configuration files related to user accounts

  • /etc/passwd    -  the password file, holds most of an account characteristics including username, UID, GID,GCOS information, login shell, home directory 
  • /etc/shadow  -  the shadow password file, a more secure mechanism for holding the password
  •  /etc/group   -  the group file, holds characteristics about a system's groups including group name, GID and group members


Fields in /etc/passwd file 

  • Each line in the /etc/passwd  file contains several fields, separated by a  colon  ( : ) , and is formatted as follows:

username:password:uid:gid:comment:
home-directory:loginshell


Fields in /etc/shadow file 

  • Each line in the /etc/shadow  file contains several fields, separated by a colon  ( : ) , and is formatted as follows:

username:password:lastchange:min:max:
warn:inactive:expire


Startup Files

  • Once the home directory is created the startup files can be copied in or created. Again you should remember that this will be done as the root user and so root will own the files. You must remember to change the ownership.
For example : 
The following is example set of commands that will perform 
these tasks.
  • mkdir home_directory
  • cp -pr /etc/skel/.* home_directory
  • chown -R login_name home_directory
  • chgrp -R group_name home_directory
  • chmod -R 700 home_directory


No comments:

Post a Comment