HostOnNet Blog

Hide Users On Ubuntu Login Screen

Looking for Linux Server Admin or WordPress Expert? We can help.

To hide a user from showing up in Ubuntu Login screen, edit file

vi /etc/lightdm/users.conf

Find line

hidden-users=nobody nobody4 noaccess

Add the user you want to hide on this line.

On my PC, following user shows up on login screen

libvirt-qemu:x:64055:135:Libvirt Qemu,,,:/var/lib/libvirt:/bin/false

This is a user created when installing libvirt. Normally these system added users have uid below 500, that are considered system users and won’t show up. For some reason this user have uid 64055.

root@hon-pc-01:/etc/lightdm# id libvirt-qemu
uid=64055(libvirt-qemu) gid=135(kvm) groups=135(kvm)
root@hon-pc-01:/etc/lightdm# 

Here is the content of my /etc/lightdm/users.conf file

root@hon-pc-01:~# cat  /etc/lightdm/users.conf
#
# 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
#
[UserList]
minimum-uid=500
hidden-users=nobody nobody4 noaccess libvirt-qemu
hidden-shells=/bin/false /usr/sbin/nologin
root@hon-pc-01:~# 

Posted in Ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.