Linux - Usermod home directory copy and change, Change and copy users home directory
Usermod home directory copy and change
The default home directory for creating a user is /home# HOME=/home
Change and copy users home directory
# usermod -m -d /path/to/new/home/dir userNameHereSome time we would like to change users home directory, where a user is alredy created. If the user have already start using the home directory and if you as a system admim wants to change the users home directory then the above command can be used to change and copy the files of users home directory, which is already created.
Where,
-d dirnanme : Path to new login (home) directory.
-m : The contents of the current home directory will be moved to the new home directory, which is created if it does not already exist.
In this example set the user's new login directory to /users/v/vivek from /home/vivek, enter:
# usermod -m -d /ramesh/home/myfiles ramesh
The topic on Linux - Usermod home directory copy and change is posted by - Math
Hope you have enjoyed, Linux - Usermod home directory copy and changeThanks for your time