Change the name of a local user

I wanted to change the a local user and found this post here on OS forums.

I was wondering if now, 5 years on, the advice found there still applies??


Yes, it will be mostly the same.

There isn’t much under “.kde4” now. Most of the KDE4 settings are under “.config” and “.local/share” (under the users home directory). But the same general principles still apply.

Please, do yourself a favour: Use YaST’s user and groups module. It will make sure that after changing a user’s name the rest of what’s needed to adapt the system to the change is changed as well.

Yes, i looked there … was not sure if by simply pressing ‘Edit’ and changing the USER name was a wise move! So i thought i would ask first :wink:

Should i also manually change the home dir path under the second tab “Details” … or will the system adapt accordingly??

I imagine that “User ID” and “Password” will remain the same.

Thanks Krurpt

Thanks Nrick!

That should not be necessary, unless you really want to be certain the NAME of the home path matches the new user name. It will just work, from the Yast module, but the path will remain the same under the old name, IIRC. (I might not, done the move quite awhile back, made no other changes than in the Yast module, no problems.)

IIRC you’re right. I went from some other name to /home/knurpht on my laptop to match the structures on my other systems. AFAIK know I manually renamed the folder in /home, then ran the YaST module and manually changed the path. But this was over a year ago. Kept a symlink with the old user name in /home though, to avoid conflicts with hard coded paths in certain configs ( Recent docs etc. ).

What i ended up doing was just changing the UserName and DirName in Yast … Bingo! … very few issues, worked like a charm.

The only places i have had to attend to manually since are:

  1. Change the username in Mod_UserDir
  2. Re-synce DropBox … ie re-import files under the new username, even though the system had chowned them.
  3. In the file manager Dolphin, the links to ‘Places’ retain the link to the old user … just a matter of editing those links manually.

… and a couple of items on the system tray panel needed to be replaced.

Apart from that everywhere else to now, (24hrs later), works as expected.

Thanks for the support guys!! :slight_smile:

Nice you got it sorted out. :shake:

And thanks for reporting. That may help others.

Great to hear, and you are Welcome.

Also, thanks from me, as well, for coming back to give a detailed result, will help many others, IMHO.