Add a standard user in Kali Linux,ubuntu Mint.
Anyone who uses computer is called user.You can add as many as users you want in Linux. There are two types of users in Linux.
- Standard User
Root is the most powerful user.Root has access to all the files. Root can delete,modify,change file permissions and install and uninstall programs in linux.By default root can access all the commands. Root is also known as the Superuser in Linux.
Standard Users have limited access to computer.Standard users does not have permission to delete,modify,install and uninstall programs.So non root users can not perform administrative tasks.It's too dangerous to run root user you may delete system files accidentally without even knowing. Specially in kali Linux 2.0 by default it operates with root user, but in most Linux distro's you have to access root with sudo.So it's safe to have a non root user specially in kali. So let's create a standard user.Open your Terminal and type the following command:
sunny@zeeroseven:~$ useradd user1 -m -s /bin/bash -g users
- useradd : Adds new user to linux.
- user1 : After the useradd command you need to specify the user name that you want to create.
- -m : It creates Home directory for new user.
- -s /bin/bash : It creates bash shell.This is the default shell for all the Linux distributions.
- -g users : This is the default group that newly created user will be member of.
Now check if user is created or not.Type the following command:
sunny@zeeroseven:~$ ls /home sunny user1
As you can can see we have created new user user1 successfully.This is where -m comes into action. it tells linux to have home a directory for user user1. Now that we have created new user but it doest not have it's own password.So let's assign a password to user1 with the following command.
sunny@zeeroseven:~$ passwd user1 Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully sunny user1
When you type passwd user1 command you will be asked to enter new password and re-enter again for confirmation.That's it we have created user1 with the password.
If you dont supply any user name with the command passwd then your root password will be changed.
Now you can login with user1 just type:
sunny@zeeroseven:~$ login user1 Password: Last login: Thu Oct 8 06:24:46 EDT 2015 on pts/0 Linux zeeroseven 3.18.0-kali3-amd64 #1 SMP Debian 3.18.6-1~kali2 (2015-03-02) x86_64 The programs included with the Kali GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Kali GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
userdel command delete users on linux.type the following command:
sunny@zeeroseven:~$ userdel user1
if you type ls /home you will see that user1 is still there.That's because it has deleted user from the system but did not delete it's home directory. Remove user's home directory with:
sunny@zeeroseven:~$ userdel -r user1