Kali Linux is used by security searchers and pen-testers because it’s comes with virtually all security tools built in, it’s lightweight by default, and it has a huge ecosystem that is constantly helping with project.
I created a new installation of Kali Linux recently. One of the first post-installation tasks I did was to create a new user for daily use. Sadly, Kali only creates a default root user during setup. Running as root all the time is a horrible security practice, so I recommend that you create a new user as soon as possible after installation.
- Add a user with all user directories already in place (thereby avoiding “Could not update .ICEauthority var/lib/gdm3/.ICEauthority” or any error containing .ICEauthority or permission in general.
- Add user to sudo group to allow him to use root commands. You can also add user to ‘lpadmin’ group to allow printing for Canon or HP and such. See Linux printing guide
- Change default shell from chsh to bash. Or any shell like Bourne Shell (sh), Bourne-Again Shell (bash), C Shell (csh) or Korn shell (ksh) etc.
- Login as that user and demonstrate there were no errors.
- Be able to use sudo and show groups affinity.
- Delete that user safely.
Benefits of Standard User in Kali Linux
Few benefits you have as non-root or standard user in Kali Linux
- Install and run Google Chrome
- Install and run Gnome User and Groups manager (Install gnome-system-tools)
- Use Kali as Primary Operating System without worrying about breaking it all the time.
Adding a user in Kali Linux
First of all let’s confirm which version of Linux and Kernel I’m running. In command prompt type in
[email protected]:~# uname -a Linux TheHackerToday 4.9.0-kali4-amd64 #1 SMP Debian 4.9.30-2kali1 (2017-06-22) x86_64 GNU/Linux [email protected]:~# lsb_release -a No LSB modules are available. Distributor ID: Kali Description: Kali GNU/Linux Rolling Release: kali-rolling Codename: kali-rolling [email protected]:~#
Now let’s add user. Open terminal and type following to create new user (replace fsociety with your desired user name)
[email protected]:~# useradd -m fsociety
(Note: -m means create home directory which is usually /home/fsociety)
Now set password for this user: fsociety
[email protected]:~# passwd fsociety
Add user to sudo group (to allow user to install software, allow printing, use privileged mode etc.)
[email protected]:~# usermod -a -G sudo fsociety
(Note: -a means append or add and –G mean to specified group/groups)
Change default shell of previously created user to bash
[email protected]:~# chsh -s /bin/bash fsociety
(Note: chsh mean change login shell, -s is the name of the specified shell you want for the user, in this case /bin/bash)
Nice, all worked out as expected. Now Let’s logout and login back as our new Standard Non-root user (fsociety)