user logout command in terminal

Asked by Ken

Is there a terminal command I can use to logout one user and login as another?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ken
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

why not just use the su command? you can then have a shell running as another user as long as you know it's password.

You can even use sudo to launch a new terminal as a different user and use your own password as authentication (assuming you have full sudo access).

Does this solve the issue?

Revision history for this message
Ken (ken-1) said :
#2

Andrew, I am having a problem a problem with the session manager not allowing me to shut down my system.

(Session manager must be in idle state when requesting a shutdown)

I'm hoping for a command that will allow me to logout so that I can login as a different user to test if the same problem exists for the new user.

Revision history for this message
Ken (ken-1) said :
#3

I solved an immediate problem by creating a launcher as follows...

Comment: Log out of the Xfce Desktop
Command: shutdown now -h

This closes down my machine with no questions asked. If I add 'sudo' into the command, it doesn't work at all. Weird, but I'm happy until 18.04 comes my way!