Home / How to / How to add remove user (standard user/non-root) in Kali Linux?

How to add remove user (standard user/non-root) in Kali Linux?

This guide will walk you through on how to add remove user (standard user or non-root user) in Kali Linux. I’ve tested this in Kali Linux, so any Debian or Debian derivative (such as Ubuntu) should just work.

This guide accomplishes:

The main reason I wanted to try this to demonstrate the followings:

  1. 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.
  2. 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
  3. 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.
  4. Login as that user and demonstrate there were no errors.
  5. Be able to use sudo and show groups affinity.
  6. Delete that user safely.

Benefits of Standard User in Kali:

Few benefits you have as non-root or standard user in Kali

  1. Install and run Google Chrome
  2. Install and run Gnome User and Groups manager (Install gnome-system-tools)
  3. Use Kali as Primary Operating System without worrying about breaking it all the time.

Now let’s move onto actual guide.

Add user in Kali Linux:

  • First of all let’s confirm which version of Linux and Kernel I’m running.In command prompt type in
    uname –a
    lsb_release –a

    How to add remove user - Standard usernon-root - in Kali Linux - blackMORE Ops -1

  • Now let’s add user. Open terminal and type following to create new user (replace user1 with your desired user name)
    useradd -m user1

    How to add remove user - Standard usernon-root - in Kali Linux - blackMORE Ops -2

    (Note: -m means create home directory which is usually /home/username)

  • Now set password for this user
    passwd user1

    Enter desired password twice

    How to add remove user - Standard usernon-root - in Kali Linux - blackMORE Ops -3

  • Add user to sudo group (to allow user to install software, allow printing, use privileged mode etc.)
    usermod -a -G sudo user1

    How to add remove user - Standard usernon-root - in Kali Linux - blackMORE Ops -4

    (Note: -a means append or add and –G mean to specified group/groups)

  • Change default shell of previously created user to bash
    chsh -s /bin/bash user1

    How to add remove user - Standard usernon-root - in Kali Linux - blackMORE Ops -5

    (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.
    Let’s logout and login back as our new Standard Non-root user (user1)

Check Also

How to disable IPv6 in Linux - blackMORE Ops - 1 300px

How to disable IPv6 in Linux?

The entire world is moving towards IPv6, although it’s happening too slowly. IPv6 is necessary to replace IPv4 — we’re running out of IPv4 addresses and IPv6 is the solution. In that context, the last method of setting preferences (Without disabling IPv6 - setting IPv4 as preferred over IPv6) is better. There’s a good chance you don’t actually need IPv6 on your network — unless you rely on Windows Homegroup or similar features — so it may not be particularly harmful to remove if if you know what you’re doing. However, you won’t see a speed improvement from clinging to IPv4 unless there are serious problems with your Internet service provider’s network or your home network. The moral is, if you notice that IPv6 needs fixing, fix it today rather than postponing until tomorrow. We live in the early days of mass deployment of IPv6, and we need to work together to untangle the implementation quirks that arise. The list of fixes above represents only a small sampling of potential issues. You can always seek help Online at any number of reputable IPv6 discussion forums. Use network misbehavior as an opportunity to learn about and improve the state of IPv6 internetworking and resist any temptations to disable the protocol.

Complete solution for online privacy with own private OpenSSH, OpenVPN and VNC server - blackMORE Ops

Complete solution for online privacy with own private OpenSSH, OpenVPN and VNC server

While there are publicly available VPN and SSH servers available – some free and some not – on the Internet, anyone who has tried to use them has discovered that they are not as reliable as they had hoped them to be: Difficulty in connecting, and very poor performance are common. Many people feel that the servers should not maintain logs; something that is difficult to find without paying a monthly or annual fee -- which, if you think about it, takes away your anonymity because now they have a record of their sales transaction. The best possible solution for this situation is to set up a private SSH and VPN server on your home network and use them when you are out on the road or overseas: You won't have logs to worry about, it is always available and totally exclusive to you; which means that your performance should be outstanding! And, all of your traffic transverses an encrypted channel which makes it virtually immune to hacking and prying eyes.

28 comments

  1. Thank you very much! Was reading some stuff about this ICEAuthority error but this helped me finally! Great Template of the Blog by the way.

    John

  2. Awesome for nebie like me. Nebie question. Why you change default shell?! What for?!

    • Hi olmc,

      Thanks. I’m glad you actually picked it up and paid attention to small details.

      bash is a superset of sh ie. everything you can do in sh you can do in bash. Bash has more features (branching, builtins, arrays) making script easier to write. I guess Wikipedia can explain better than I can .. http://en.wikipedia.org/wiki/Comparison_of_comput…. You could create another user, skip chsh -s /bin/bash user1 and see how default shell feels like. If you like that, you keep that, else you could always delete that test user.

  3. Is the command sudo su – permenant because it keeps reverting back to user?

  4. I used to log in as root ! but now i’ m standard user !
    so how can i import all the system settings and preferences from the old user (root) to this new user ?
    and thank you !

    • I have been trying to find the same answer as Helmi??? Bump

      • There’s no easy answer to this really. Ideally you should be making changes on /etc/skel/ so that the changes takes affect when a new user is created.
        Apart from that, copy all files from User1 to User2 home folder, chmod and chown them. But depending on applications installed and access required, I am afraid you’ll be doing too much work this way. Cheers,
        -BMO

  5. Very insightful and informative….

    THanks

  6. Thank’s to the communities of blackmoreops you are just doing a marvellous job.

  7. I tried to do this just to access chrome, and I think changing the default shell on the new user somehow killed gnome3.

    Now when I boot in, I just have a black screen with the cursor as a white watch. I can access the terminal, but can’t seem to get internet access, and nothing I can find anywhere else seems to help.

    Any ideas? I tried changing the shell on root between sh and bash, with no luck. Deleting the user, trying to fix the apt-get installs via net but couldn’t connect.

    Thank you very much for your guides otherwise though! They’re fantastic.

  8. Hello admin please help me can u tell me how to switch users in Kali Linux on android

  9. Hi,
    I followed ur steps.. works fine till add to SUDO group. Next when I do the chsh -s /bin/bash username, I get a “enter password” and then authentication failure. (I enter root password. I also tried the username password and no password !) I am working with Kali linux.

    Am I missing anything?

    Thank you for the time.

  10. plz help
    How to remove my login detail from wtmp

  11. hi
    thank you for this great tutorial
    but i have i small problem i hope you help me solving it
    i can normally log in as root but when i try log in as normal user this message shows up ” could not update iceauthority file /home/habi/.ICEauthority

    i tried to remove the file but it didn’t work .
    thank you very much.

  12. How to change the “root” name?

  13. i got a error to create a useradd -m user1 this commd,can not create direcetory home/user1

  14. Thanks for the great post!

  15. Awesome
    it really works.
    i have changed user name by using above commands in recovery mode

  16. i shall now proceed to bookmark your page

  17. Very Helpful. Thanks.

  18. How do we safely delete group created by user1, assuming that a group ‘user1′ created for user ‘user1′.

Leave a Reply. (Anonymous comments allowed). Use WP, Twitter, FaceBook or Google+ for faster responses.