Linux add user and change its home dir

I usually need to create Linux users for FTP access…
FTP is unsecure, we should use sftp bla bla blaa…

Add user
useradd username
Set/change password
passwd username
Set user’s home dir
usermod -m -d /new/path/ username

This way we will set the new path (/new/path/) to the user named username.

-m defines that content from the old home directory will be mobed to the new one.
-d the new home dir’s path

 See user’s information
finger username

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.