We are running an Ubuntu server and have several people in the company that need to have SSH access. This is a web server and the different sites reside in /home. When I create a new user on the server with adduser "username" then a new directory is automatically created in /home. As the sites also reside here, I'd like to re-structure this and actually create /home/users/ and manage all user-directories from there. However, with adduser I can not set the home directory, and I can not find a way to change this easily.
If I use useradd and the -m option, I can specify the home directory. However, my bash is different. It only shows "$" instead of the server name and current directory, as is default (user@server:/home/). Also, tabbing to get the full filename does not work anymore. This should have to do with bash settings, but I can not get this to work.
So, the question is:
- Is there an easy way to change the home directory when using adduser? OR:
- How can the bash configuration be fixed when using useradd?
Note: I compared .bashrc and .profile for the new user with useradd and adduser, and they are identical.
/bin/sh
for the user's login shell which doesn't have tab completion and has a much simpler prompting capability. – Dennis Williamson Nov 29 '10 at 1:11