set home directory for user linux
I wanted to change home directory for a User in Linux.
Use this command, If you want to set a Fresh directory as Home Directory
usermod -d /path/to/new/home/dir userNameHere
Use this command, If you want the contents of the existing home directory to be moved to the new home directory. ( -m ) flag is for this purpose.
usermod -m -d /path/to/new/home/dir userNameHere
Solution Reference:
No comments:
Post a Comment