Our speaker was Hershel Remer, who is also known as the unixrabbi or Rabbs. His presentation was on basic system administration and the UUASC.
He talked about what the UUASC has to offer. For more information on the UUASC go to their website at http://www.uuasc.org. For more information on Hershel or his book go to his site at http://www.rabbs.com.
He discussed adding and removing users and from the system. He showed how a user can be added by adding a line to the /etc/passwd file. In most systems the passwords have been moved from /etc/passwd to /etc/shadow so that non-root users aren't able to access them. The system attaches user IDs (UIDs) and group IDs (GIDs) to users which can be viewed using the 'id' command.
· the username
· the password or an x to indicate the password is in the /etc/shadow file
· the user ID (UID)
· the group ID (GID)
· a comment for the administrator, usually the full name of the user
· the user's home directory
· the user's default shell
The syntax for creating a user with the useradd command is:
The UID and the GID of the new user must be set using -u (uid) -g (gid) . A new UID can be found by looking at /etc/passwd.
When creating users, a home directory must be prepared for the new users, and the skeleton of the new user's home directory is usually taken from /etc/skel. That is automatically done with the useradd command's -d /home/(username) -m -k /etc/skel section.
A shell for the new user can be specified using -s . Some examples of shells might be /bin/csh for the C shell, /bin/bash for the Bourne again shell, or /bin/ksh for the korn shell.
The username of the new user is specified last in the useradd command.
To set a password for the new account, passwd (username) could be used.
Days since Jan 1, 1970 that password was last changed
Days before password may be changed
Days after which password must be changed
Days before password is to expire that user is warned
Days after password expires that account is disabled
Days since Jan 1, 1970 that account is disabled
A reserved field
All of that can be manipulated using the passwd command
Also, look at the man pages for the following commands: