Linux Tutorial | Add/Modify Users

Let’s talk about how to add users and modify their privileges using Kali Linux (Debian). For this tutorial I will assume you are using Root. If you are not using Root then you will have already added a user. If you need this tutorial anyway then you will need to add sudo before each command. Sudo gives a user superuser (Admin) privileges.

So let’s get started:

The useradd statement is self explanatory, I hope. The -m creates a home directory for the user. In our example you will replace newuser with the username you want to user. So now you’re wondering about the password, right?

Again, replace newuser with the user ID you created. This will cause Linux to prompt you to enter the new password twice. Don’t worry if you don’t see the cursor move or the **** to show up, that’s by design.

Now if you want to give the new user superuser permissions (only if you want the user to be an admin on the system) you will want to enter the following:

Usermod is invoked to modify the user privileges. The use of -a is to add or append. The -G tells Linux that we want to add(-a) the user to a Group(-G). Sudo is the group that we are adding the user to and newuser should be replaced with the user ID that you are creating.

And what if you wanted to remove a user from Linux? Well that’s pretty simple as well.

Here we call userdel which is short for user delete. The -r removes the user’s home directory and again you will replace newuser with the user ID you desire to delete.

You may be told by Linux that a process is running and that you cannot delete the user. If that happens (as it did in our example in the video) use the following command:

Kill process in Kali

As you can see I had a little difficulty. For some reason Kali in VMWare does not like my number pad.

Well, that should do it for now. Until next time…practice, practice, practice.