Change home directory

I watched somebody change a user’s home directory today by deleting the user using ‘userdel’ and then re-creating the user with ‘adduser’ and entering a different path for their home directory. This is not the simplest way to do it..

To change the user’s home directory, just use the ‘usermod’ command, which exists on all unices. It works like this:

usermod -d /path/to/new/homedir/ username

easy

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s