Change home directory

Is it possible to change a users home directory?
Upgraded to Tumbleweed (past week), from Leap15.3/KDE, and had a few issues (some of which rolled over from Leap…)
Created new user, and have configured applications etc, and seems to be working better, and would like to attach the original username “john”, to the new user directory (currently user “johno”).
Is this possible?
Thanks.

Just edit home directory (scond to last field) in /etc/passwd.

You will need to either change UID of user john to match that of johno (and edit any group assignment as well) or change ownership of johno home directory (including all files under it) to user john. The latter is probably less error prone.

Hi
Or use YaST users, it has an option to ‘move’ to the new directory and retain everything else.

Wouldn’t “Move to new Location” just move the current users home, to a different (ie not /home/<USER>) location…?
Thanks.

“Move” in Unix/Linux often in fact means “rename”. That is because the mv command renames (or otherwise reorganises) if it stays in the same file system, but it physically moves the data when it has to go to another file system. (This explains the surprise of many when one mv seems to be instantly and another mv may take a lot of time).

I assume that is how to interpret the “move” here.