{ 3 comments… read them below or add one }

1 Kirk December 15, 2010 at 5:21 pm

Correct me if I am wrong though, but this does not change the user’s home directory to match the new ID, right?

Reply

2 nixCraft December 15, 2010 at 6:38 pm

Try the -m and -d /home/jerry option; the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist:

usermod -m -d /home/jerry -l jerry tom
### gone ###
ls /home/tom
### as it moved to ###
ls /home/jerry

You may have to take care of secondary group memberhsip too.

Reply

3 Kirk December 15, 2010 at 8:37 pm

Exactly. Be worth updating your original FAQ, no so that the user transformation is complete.

Reply

Leave a Comment

Tagged as: , , , , , , ,

Previous Faq:

Next Faq: