Create a user in Kali Linux

bash-script

the default Kali user is “root”, and no non-privileged user is created as a part of the installation process. This is one reason that Kali Linux is not recommended for use by Linux beginners who Tight be more apt to make destructive mistakes while running with root privileges. To start, launch a shell terminal and execute the following command(s). 

Add a new user using the -m to create the user’s home directory :

sander@linuxsource# useradd -m Username

 

Create a password for the user:

sander@linuxsource# passwd Username

 

Add the user to the sudo group with the command below. ( -a  for adding the user, and use  -G  for the groupname ):

 sander@linuxsource# usermod -a -G sudo Username

 

Now finally change the default shell of the newly added user to bash (-s to provide a new login shell for that account):

 sander@linuxsource# chsh -s /bin/bash Username

After it has been created, log out, then log back in using the new username!

 

“Side note”
If you run some tools, logged in as the non-root user, and the directory is not in the user’s PATH, you’ll get a warning message.
To solve this, you need to add a line to the users 

.profile

   file located in /home/Username,  with (if none exists) PATH=/usr/sbin:$PATH

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Reconnaissance with Skipfish

Next Post
password-cracking

Cracking passwords in Kali

Related Posts
fix-mbr

Backup MBR (Master Boot Record)

[title size=”2″ content_align=”center” style_type=”default” sep_color=”” margin_top=”” margin_bottom=”” class=”” id=””]Backup the MBR (Master Boot Record)[/title][separator style_type=”none” top_margin=”5″ bottom_margin=”” sep_color=””…
Read More