# New User Home Directory



## epanagio (Oct 1, 2009)

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


----------



## CodeBlock (Oct 1, 2009)

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?


----------



## SirDice (Oct 1, 2009)

Try `$ grep visitor /etc/passwd` and post the results.


----------



## epanagio (Oct 2, 2009)

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?


----------



## SirDice (Oct 2, 2009)

If you want to use su, try `# su - username`. Note the dash (-).


----------

