userdel
This is the command to delete user in your local system.
delete an user
userdel sikkandar
User sikkandar will be deleted from your local machine without home directory.
Delete an user with home directory
userdel -r sikkandar
Delete an user with home directory including files owned by other users
userdel -rf sikkandar
Showing posts with label Managing Users. Show all posts
Showing posts with label Managing Users. Show all posts
Saturday, May 3, 2008
Deleting User
Labels:
Managing Users
Sunday, April 20, 2008
Adding New User
useradd
This is the command to create new user in your local system.
Create an user
useradd sikkandar
User sikkandar will be added to your local machine without home directory.
Create an user with home directory
useradd -m sikkandar
To create password for user
passwd username
For example: passwd sikkandar
For more details see man useradd
TIPS
If you forgot to create home directory and you want to create the same later, do the following:
To create the home directory for user sikkandar:
mkdir /home/sikkandar
cd /etc/skel
tar cv . | tar xvC /home/sikkandar
chown -R sikkandar.users /home/sikkandar
Labels:
Managing Users
Subscribe to:
Posts (Atom)