PDA

View Full Version : logging in as second user at command prompt



roncrump
November 3rd, 2007, 04:38 AM
I have created a second user account on my system.

I want to use this to set up and test a software system at home which runs as a user account on the production system at work.

So, I want to logon as the second user from the command line - I do not want to logout and log in as the new user at the gnome login prompt.

That is, I want to have myself logged in within gnome, then in a terminal be logged in as the second account and accessing the directories etc within that space.

I tried just typing "login two" and just got a message about having to use login at the lowest sh level and something about no utmp empty.

Any suggestions? I'm sure this is ridiculously simple, really.

Ron.

LaRoza
November 3rd, 2007, 04:41 AM
You can run something as another user with "sudo".

roncrump
November 3rd, 2007, 04:53 AM
You can run something as another user with "sudo".

I don't just want to run something as that user, rather be that user within that terminal window in order to do a lot of things.

Ron.

ruibernardo
November 3rd, 2007, 05:21 AM
Maybe you want su:


su another_username
<password>

roncrump
November 7th, 2007, 12:14 AM
Maybe you want su:


su another_username
<password>

Would that be equivalent to

sudo login another_username
<password>[/QUOTE]
or different?