By default when we add new user with useradd command (without specifying home directory) user home directory is set to /home/<userName>.
If we want to change user home directory from command line after adding new user, we need to edit /etc/passwd file with sudo/root permission.
Lets say we created a user.
$ useradd tempuser
By default tempuser home directory for /home/tempuser
If we want to change home directory to /home/temp, just open /etc/passwd file with any editor.
Search for the required user name for which you want to change the home directory. In above example for tempuser home directory looks like :/home/tempuser: and just change it to :/home/temp:, then save and exit from /etc/passwd file.
Now relogin and test for update you made, your home directory will be changed.