New User Home Directory

Using the command adduser I create a user, visitor, but when I log in the home directory is not the /home/visitor. What do I have to do to change so when the user logs in goes into /home/visitor?

Thanks,
Evan
 
Define 'log in'. If you `su` (or `sudo su`) to them, your working directory will not change. However if you ssh as the new user, it should drop you to their home directory. Might want to give some more information such as what you mean by 'log in'. If you mean actual console login (or SSH for that matter), what directory does it drop you to?
 
You are correct I logged in using su and got me confused.
Thanks,
Evan

CodeBlock said:
Define 'log in'. If you `su` (or `sudo su`) to them, your working directory will not change. However if you ssh as the new user, it should drop you to their home directory. Might want to give some more information such as what you mean by 'log in'. If you mean actual console login (or SSH for that matter), what directory does it drop you to?
 
If you want to use su, try # su - username. Note the dash (-).
 
Back
Top