Chaning user from a command line

If it doesn't fit in another category, ask it here.
Post Reply
70578k8
Posts: 1
Joined: 2012/01/09 15:42:44

Chaning user from a command line

Post by 70578k8 » 2012/01/09 15:46:22

Is it possibel to change the user on command line? Or do I have to logout from GUI and login from GUI, in centos 5.7.

hawaiian717
Posts: 178
Joined: 2009/01/30 19:58:25
Location: California

Re: Chaning user from a command line

Post by hawaiian717 » 2012/01/09 20:25:45

You can use the [b]su[/b] command to switch to a different user:

[code]$ su - newusername[/code]

You will then be prompted for the other user's password.

You can type [b]exit[/b] when you are done to switch back.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Chaning user from a command line

Post by gerald_clark » 2012/01/09 21:09:40

That will not switch to the other users desktop.

allamiro
Posts: 21
Joined: 2009/07/30 20:43:36

Re: Chaning user from a command line

Post by allamiro » 2012/02/10 21:46:00

You have to exit from the desktop to do that switching

Post Reply

Return to “CentOS 5 - Miscellaneous Questions”