This is a question that I would expect to quickly get an answer from google. However somehow google is failing me. Let's assume I'm logged in to a terminal session and I would like temporarily work as another non-root user whose password I know without leaving my session. When logged as this user I want the home directory, etc, for this user set up correctly until I log out. How do I do that?
I tried
su -- username
and then keying in the password, it did not produce any error but I saw no visible changes of the command prompt it would still say myname@myhost. The home directory also was that of myname and not the new login I tried to login as.
I'm - as it's apparent now - quite inexperienced in linux/Ubuntu, so any info is welcome.
-s /bin/bash
to yoursu
command or usechsh -u username -s /bin/bash
to change the shell for a user. Beware of the security implications this might have. – gertvdijk Nov 16 '12 at 08:24