0

How can I put a user in a default directory when the logs in via SSH on Ubuntu? Currently, users are in ~ but I want them in something like /path/to/something. How is this configured? The machine will always have the path.

Many thanks :).

1
  • Do you mean changing the home directory? Apr 5, 2012 at 10:18

2 Answers 2

5

If you want to keep the users home directory but change the dirextory where they login to then you would have to add a cd /path/to/something at the end of the /etc/profile or $HOME/.profile

2

If you want to change the home directory of a user, you can use:

$ sudo usermod -d /path/to/new/home username

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .