To add User account in Ubuntu 14.04

 

Ubuntu 14.04

Add User. In directory home, Lock User, Unlock User, Kill User Session, Delete User, and Remove User Directory

To Add User

 sudo useradd -m -s /bin/bash  username

 sudo passwd username

It will prompt you to enter the password once then again to confirm

 cd  /home

ls  (lower case L)

To view the users in the home directory

Then you should see new user home directory

To disable (lock account) user:  sudo passwd – l username     (lower case L)

To unlock the accountsudo passwd -u username

Will be prompt admin password to complete the task.

To delete a user: sudo userdel username

If you get a message that the user is in a session;

Then you do:  sudo pkill -KILL -u username

Then perform the:  sudo userdel username

If you were to do ls to view the users in the home directory you will still see there is a directory for the user. To remove the user’s directory do the following:

sudo rm -r /home/username

Looking again with command ls you now see that user’s directory has been remove.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s