(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)

Login as new user

Once logged in, let’s confirm from command line who I really am! In terminal type in the following

1

whoami

Take note of user1@kali prompt. That also confirms who you are.

And let’s check my group affinity, type in the following in terminal:

1

groups

Looks good to me so far.

I am part of user1 group (my primary) and sudo group. That means I can run privileged commands or just become root myself if required.

Become root!

1

sudo su–

and type in user1’s password to become root.

See the prompt becomes root@kali instead of user1@kali. That means you’re now root and get to run anything Kali got to offer.

Lets confirm that using whoami command

1

whoami

So far so good. Now how do you delete a user?

Delete user in Kali Linux:

Log in as root user again. Open terminal and type:

1

userdel–ruser1

(Note: -r means delete all files and home directory for user1)

You can replace user1 with your desired user name.

I have an error “user1 is currently used by process 5866”.

So process ID 5866 is being used by user1. (I know that it’s the gnome–keyring process running in background when I used sudo su – command earlier. (Gnome–Keyring error is quite common in Debian when you install multiple Windows or Desktop Managers.

Let do that.

Type in the following in terminal to kill the process used by user1.

1

kill-95866

This kills the process immediately.

(Note: don’t kill root or system processes unless you know what you’re doing)

Now let’s try to delete the user again.

1

userdel–ruser1

We have a message. “userdel: user1 mail spool (/var/mail/user1) not found”.

(Note: -r means delete all files and home directory for user1)

Are we going to worry about it? Not really, we never created a mailbox for user1.

Just to confirm everything for user1 was deleted list files in home directory

1

ls/home

Nothing.. that’s good news, all files and folders were deleted for user1.

New Hacking Articles

I started this blog out of interest somewhere 7 Years back. I had really no idea what Hacking is back then, So I have decided to refresh the articles and re-write articles that is for Security / Hacking . Slowly I will be removing all the content that is unrelated or doesn’t belongs to Hacking. So expect Articles related to Windows , Mobile, Free Content, code etc gone, and more more and many more Articles on Cyber Security and Hacking to come.
Join us on Telegram – https://t.me/ethicalhackx