how do you change a users home directory

A

Anonymous

Guest
I renamed my home directory and now when I log in it puts me in "/". How do I change the home directory for this user to reflect the name change?
 
Nevermind, I answered my own question. I just had to look in the /etc/passwd file.
 
I tried changing the directory within /etc/passwd to be the new directory I want "/home/mickey.harvey" but bash still thinks my home directory is "/home/Mickey Harvey"
 
As LateNightTV said, do NOT edit /etc/passwd directly. Never, ever.. Most of the time it'll work but someday you'll end up with a nuked passwd file.

Use vipw, chsh or the pw commands.
 
Back
Top