How to change home directory of a user in Linux
Ensure you have shadow-utils package installed.
yum install -y shadow-utils
Use the following command to set new home directory /home/newhome for user “myuser”.
usermod -d /home/newhome myuser
Ensure you have shadow-utils package installed.
yum install -y shadow-utils
Use the following command to set new home directory /home/newhome for user “myuser”.
usermod -d /home/newhome myuser