Migration of home directory

satimis

Distinguished
May 9, 2005
44
0
18,530
Hi folks,

Ubuntu 10.04 64 bit

I ran following command to change username;

# usermod -c "Real name" -l new_username old_username

but forgot adding -m option to move the contents of the old home directory to the new home directory.

Therefore;
# ls /home
old_user_directory

Please advise how to fix it. /home is on partition /dev/sda3 NOT on root directory

TIA

B.R.
satimis
 

But the location of the home directory is also located in the passwd file (or its equivalent), so it's not quite that simple. Also, the chown shouldn't be necessary - as I understand it it's only the name that has changed not the UID.