User Default Files

When a new user is created, the default files and directories that are created are stored in /etc/skel. This directory can be modified to fit your needs. Modifications will only affect new users; they do not change anything for existing users.

Group Information

Where group information is stored Group information is stored in /etc/group. This file should be changed with the usermod, groupadd and groupmod commands. The format of each line is: Group name Group password (hardly ever used) Group ID User names (separated by commas) Each field is separated by a colon.

User Information

Where user information is stored User names and primary groups are stored in /etc/passwd. This file can be directly edited using the ‘vi’ editor, although this is not recommended. The format of each line is: User name (normally all lower case) Password (encrypted – only contains the letter ‘x’) User ID (UID) (a unique number …

Disable & Enable Users

To disable a user, think of locking the account: passwd <username> -l  So, to re-enable the account you unlock it: passwd <username> -u  See this highly useful page:

Add a User

Now we’re going to create a new user. Type these commands: useradd studenth passwd studenth You’ve just created a new user named studenth and a directory in /home/ called studenth.   useradd – Adding a new user Options: -d home directory -s starting program (shell) -p password -g (primary group assigned to the users) -G …