8/25/2010

User Management

useradd

● Based on /etc/login.defs, the system creates a home directory for the new user.
useradd name-user
● The contents of /etc/skel is copied to the home directory.
○ This contains bash and other startup files.
● Once you have added a user, use passwd to give the user a password.

userdel

● The following command will remove a user's account: userdel -r username
● If appropriate, make a backup copy of the files belonging to the user before
deleting the account.
● The userdel command will remove the account, the user's home directory, and
all the files in the directory

Usermod

● This command can temporarily turn off a user's account.
○ You can change the expiration date for the account.
usermod -e "12/31/03" username
● This command will prevent the user from logging in

No comments:

Post a Comment