Kali Linux, Tutorials/Tips

How to create a standard user on Kali Linux 2.0 using the cli

Kali Linux is a niche distribution designed for those with a certain degree of expertise in Linux. However, that shouldn’t stop you, if you don’t have the required level of expertise, to use it.

It’s designed for pentesters, but can be used like any other Linux desktop distribution. One little problem, though, is that unlike other distributions, a standard user account is not created during installation. So the first recommended tasks to perform on a fresh installation of Kali Linux 2.0, the latest edition, is to create a standard user account.

Because the graphical interface for creating users on the system has been severely crippled (see the last screenshot in this article), the best method for creating users on the system is from the command line. Two methods of creating users from the command line are given in this article. After creating a user, you’ll also read how to add a particular directory to the user’s PATH.

To start, launch a shell terminal and execute the command(s) in one of the follow methods.

Method 1 – The command to use here is called useradd. The m option instructs the script to create the user’s home directory, while the G option is used to add the user to existing groups. In the following command, the user is added to the sudo group to give it access to system-level commands via the sudo command. useradd -m USERNAME -G sudo -s /bin/bash. Replace USERNAME with your choice of login name.

After that, specify a password for the user with passwd USERNAME. You’ll be prompted to specify and verify a password. Again, replace USERNAME with your choice of login name.

Method 2 uses the adduser command. You just pass it the name of the user and it does the rest, prompting you to specify and verify a password along the way. For example, adduser USERNAME. As in the previous command, use your choice of login name.

Whatever method you use to create the user, after it has been created, log out, then log back in using the new username. The final task involves modifying the user’s PATH to add the /usr/sbin directory. That’s necessary because that directory is not in the user’s PATH, but most of the tools installed, even the graphical tools, depend on scripts in that directory.

So if you run some tools while logged in as the non-root user, and the directory is not in the user’s PATH, you’ll get the type of warning about tcpdump shown in Figure 1.

Kali Linux 2 user PATH
Figure 1: Why you need to update the user’s PATH

To avoid such warnings, you’ll need to add a line to the users .profile file. To do that, open the file using the nano text editor and append the following line to it: PATH=/usr/sbin:$PATH. Afterwards, log out and log back in to effect the change.

Figure 2 shows a screenshot of the System Settings Users module, which is normally used for creating users on the system. In Kali Linux 2, the module is unusable. Not sure if that’s by design or a bug.

Kali Linux 2 users
Figure 2: System Settings Users module on Kali Linux 2

Subscribe to LinuxBSDos.com

Subscribe to receive the latest articles in your Inbox

Trust me, you'll not be spammed...

Please share:

We Recommend These Vendors and Free Offers

Register now for Blockchain & Cryptocurrency Con 2018, international conference on blockchain technnology in Dallas, TX (USA), Feb. 23-24, 2018. A 50% discount for students.

Best WhatsApp Plus features in Gbwhatsapp latest APK download

Best binary auto trading software reviews by 7binaryoptions.com

Google has got competition, because Presearch is building a blockchain-based search engine controlled by the community. At $0.15 a token, you can participation in Lot 3 of the token sale by clicking here

Open Money is building a solution that will run mainstream software on blockchain tech. Click here to get free tokens that will be the digital currency of the platform

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).

One Comment

  1. Cant find the users .profile, i have a lot of .profile files…

Leave a Comment

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