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.


2 Answers 2


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.


I faced the same issue before. In my case, this command fixed the issue:

grep -rl 'old_username' home_directory_of_new_user/.* | xargs sed -i.bak -e 's/old_username/new_username/g'

As you can see, this is a crude, not promising approach.

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.