Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I hide a particular user from the login screen on a default install of 11.10 and higher? (ie. using LightDM)?

share|improve this question
add comment

4 Answers

up vote 23 down vote accepted
+100

Currently this method is not working because of a bug in lightdm.

Please check the bug status before applying this method.


Heres what you want to do:

First, make a backup of your config.

sudo cp /etc/lightdm/users.conf /etc/lightdm/users.conf.bak

Then, you need to edit your config:

sudo nano /etc/lightdm/users.conf

You'll see something like this:

#
# User accounts configuration
#
# NOTE: If you have AccountsService installed on your system, then LightDM will
# use this instead and these settings will be ignored
#
# minimum-uid = Minimum UID required to be shown in greeter
# hidden-users = Users that are not shown to the user
# hidden-shells = Shells that indicate a user cannot login
#
[UserAccounts]
minimum-uid=500
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin

Of interest to us is the part here:

hidden-users=nobody nobody4 noaccess

To hide the username james, just add it like this:

hidden-users=nobody nobody4 noaccess james

Then, reboot your computer and it should be gone.

As a reference to others, see

See https://bugs.launchpad.net/ubuntu/+source/accountsservice/+bug/857651

share|improve this answer
add comment

Your option until bug 857651 is fixed is to create the user with uid < 1000

For example, to assign new uid less than 1000, (we are using 999) use this command

sudo usermod -u 999 user-name

Replace the user-name with the actual user name, just as anwar or detly etc.

share|improve this answer
    
This hides the user, but if you're changing the uid you may also want to change the gid, since they are usually the same number: sudo groupmod -g999 user-name. And as dqvn2002 mentions in their answer, for Ubuntu 12.04 you'll need a number < 500, so 999 won't work. –  Eric Lambart Feb 7 at 1:21
    
And don't forget! When you change the user id, any private files owned by that user will suddenly become inaccessible. You'll need to run (e.g.) sudo chown -R user-name:user-name /home/user-name. –  Eric Lambart Feb 7 at 1:23
add comment

because the Ubuntu 12.04 setup

[UserAccounts]  
minimum-uid=500

so we need to reduce the uid less than 500

example: sudo usermod -u 499 user-name

It works with me! SOLVED Good luck.

share|improve this answer
    
You may want/need to also change the group id, and chown any files owned by the user, as I commented on OerHeks' answer. –  Eric Lambart Feb 7 at 1:25
add comment

This method is not works on Ubuntu 13.10.

To hide user login names correctly You must to open LightDM config:

sudo vim /etc/lightdm/lightdm.conf

and add the following options:

greeter-hide-users=true
greeter-show-manual-login=true

Then save and reboot. That's all.

share|improve this answer
add comment

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.