I'm trying to rename the standard user account "kali" in my Kali linux installation. I've tried two different ways.

First I used the root account to rename the user account and change the home directory the following way:

Using the root account:

pkill -9 -u old-username

usermod -l new-username old-username

usermod -d /home/new-user-name -m new-username

groupmod -n new-groupname old-groupname

The result is, when I try to log into the new account it seems some of it is working, like the browser I had previously open opens again etc. But the desktop doesn't fully load, I get no task bar etc.

The other way I tried is creating a new user, adding the user to the same groups as the current user. Copying over the home directory and chowning the new users directory:

sudo su

adduser new-username

adduser new-username sudo

adduser new-username netdev
#doing that with all other groups the old user is part of

cp -r /home/old-username /home/new-username

chown -R new-username:new-username /home/new-username

When I do that, some things seem to be working, but the desktop settings aren't copied and I don't have the previously installed apps or for example Firefox extensions.

  • Doing what you are trying to do, indicates that you should not be running kali. Kali is not for general desktop or server use. It is for expert security use. If you teacher is telling you to use it as your first Gnu/Linux system, then consider getting a new teacher. – ctrl-alt-delor Sep 19 '20 at 21:06
  • I’m not using it as my main desktop OS. It’s running as a VM on my Mac and I’m using it to learn about pen testing. However, even under those circumstances it is recommended to not use the standard user account which I started doing. I’d appreciate a constructive answer to my question. – Marco Boerner Sep 19 '20 at 22:30

Changing the user name does not transfer all your GUI settings. Maybe copy the hidden files and directories over from the previous home directory, if there is one. Kali doesn't work like a typical desktop distro. Many of the defaults are not expected by a typical user.

I don't use Kali, but I did use backtrack, which Kali came from.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.