1

I searched but could not find how to suspend particular user in Ubuntu 12.04. I found the following option:

dbus-send --system --print-reply \
    --dest="org.freedesktop.UPower" \
    /org/freedesktop/UPower \
    org.freedesktop.UPower.Suspend

However suspend the current user. I want root user to suspend another user. How to do this ?

Krasimir
  • 1,233

1 Answers1

2

As root we can kill all processes of a user with:

sudo pkill -u <username>

After that lightdm will present the login screen.

Note that this will immediately terminate all applications a user had run. Unsaved data will therefore be lost.

To disable a user account see How to enable or disable a user?

Takkat
  • 144,580