change home directory of user in rhel 7 code example Example: assign home directory to user linux usermod -d /path/to/dir username