Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have six boys, and they tend to ask another parent when wanting to use one of the computers, but don't bother asking the logged in user if they're finished. All four machines are running Ubuntu 12.04 with gnome 3.

How can I permanently disable user switching - not just in the user menu, but also on the lock screen?

share|improve this question
You mean allow multiple users on the system BUT disable user switching via the GUI? (logout?) – izx Jun 21 '12 at 3:19
no, I want them to be able to log out...just not be able to switch to another user while a user is already logged in. – Daniel Jun 21 '12 at 3:42
Oh, and not just in the user menu, but also the lock screen..I wanna get rid of the "switch user" function altogether. – Daniel Jun 21 '12 at 3:51
And you're on Gnome – izx Jun 23 '12 at 4:16

This is for Gnome 3 (aka gnome-shell, NOT Unity), and will disable both the "Switch User" option in the user menu as well as on the lock screen:

  • Start the terminal with Ctrl-Alt-T, and then type:

    1. sudo apt-get install dconf-tools
    2. Start dconf-editor
    3. Disable apps->indicator-session->user-show-menu:

    enter image description here

  • Enable org->gnome->desktop->lockdown->disable-user-switching:

    enter image description here

  • Close dconf-editor, logout and log in to see the changes.

share|improve this answer
Another place to check for the setting for the lock screen is org->gnome->desktop->screensaver->user-switch-enabled – rakslice Aug 2 '15 at 21:44

Another way to do this would be using the 'dconf editor'.
You can install it from software center.
After opening it click on 'apps' -> 'indicator session' and uncheck 'user-show-menu'.
Close the program and log out and back in.

View of the dconf editor

share|improve this answer
The key is not this but disable-user-switching. – izx Jun 22 '12 at 0:04
Are they both doing the same thing? Cause using either key the 'User Menu' disappears from the panel. Or does the 'disable-user-switching' also affect the lock screen and the 'user-show-menu' doesn't? – Daniel Jun 22 '12 at 9:24

How many user do you have? By default its only your acc and Guest acc. To disable Guest acc follow this guide.

Open /etc/lightdm/lightdm.conf file from your terminal using the following command

gksudo gedit /etc/lightdm/lightdm.conf

Add the following line


Save and exit the file

Finally you have to restart lightdm using the following command from your terminal

sudo restart lightdm
share|improve this answer
just out of gnome3 is this handled by lightdm as well? or is it handled by gdm? – Daniel Jun 21 '12 at 22:07

You can disable user-switching by following command in terminal:

gsettings set org.gnome.desktop.lockdown disable-lock-screen true
share|improve this answer

Your Answer


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.