Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I build my webapp on a local machine, but from time to time I can go to a public Linux server on which I have two accounts using a ssh connection (with putty). My accounts are two Linux users, access to my public webapp is at the address: 'http://linux_srver_ip/~user_name'.

Using putty, when I'm logged as user_one, how can I switch to user_two account?

share|improve this question
    
Does user_one has sudo permission? –  quanta Aug 29 '11 at 8:16
    
how can I find that? –  dole doug Aug 29 '11 at 8:30
    
Run a command with sudo, e.g: sudo /usr/sbin/visudo. –  quanta Aug 29 '11 at 8:35
    
You don't need sudo if you have the password for the second account. To see what sudo privs a user has, run "sudo -l" to list them. –  cjc Aug 29 '11 at 11:02

1 Answer 1

su <username>

http://linux.die.net/man/1/su

share|improve this answer
1  
I prefer "su - username". The "-" causes "su" to invoke the login shell process, which may be important if the other user should be accessed with a different environment from the first user's. –  cjc Aug 29 '11 at 11:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.