Is "libvirt qemu" provided by Ubuntu 16.04 officially, or did I do something wrong/right?

$ grep -E 'libvirt|qemu' /etc/passwd"
libvirt-qemu:x:64055:134:Libvirt Qemu,,,:/var/lib/libvirt:/bin/false
libvirt-dnsmasq:x:124:137:Libvirt Dnsmasq,,,:/var/lib/libvirt/dnsmasq:/bin/false
  • 1
    Can you please edit your question and show the output of grep -E 'libvirt|qemu' /etc/passwd ? – Byte Commander Mar 26 '17 at 11:39
  • 1
    what display manager (GDM, SDDM, etc) are you using? it's probably a slight misconfiguration. if libvirt-qemu is shown but libvirt-dnsmasq isn't, then the display manager isn't filtering out /bin/false shells but is filtering out system accounts. libvirt-qemu has a high but normal-user UID. – quixotic Apr 2 '17 at 23:49
  • To answer @quixotic question please edit the content of /etc/X11/default-display-manager into your post. thank you for helping us help you! – Elder Geek Apr 14 '17 at 14:23
  • Even if it was answered "correctly" I have no way of testing and honestly accepting an answer, because I reinstalled Ubuntu. @ElderGeek – naughtyPenguin Apr 20 '17 at 4:14
  • Corresponding report in Ubuntu's bug tracker: bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1674765 – user13975 Apr 4 '18 at 8:14

You may have a configuration problem in the file /etc/lightdm/users.conf as users with the shell /bin/false as is the case with the libvirt-qemu should never show up in the account list for login or switch to. This is controlled by the the line hidden-shells=/bin/false /usr/sbin/nologin in the aforementioned /etc/lightdm/users.conf file.

However, if you have the package accountsservice installed, then that overrides any settings in /etc/lightdm/users.conf. If accountsservice doesn't hide an account with nologin/false shells, then it may be a bug as mentioned in this answer.


How do I hide a particular user from the login screen?

/etc/lightdm/users.conf on Ubuntu 14.04.5 LTS and 16.04.2 LTS


The accountsservice package seems to have a bug, since it shows nologin-shell accounts.

As a workaround, simply use these two commands:

printf "[User]\nSystemAccount=true\n" | sudo tee /var/lib/AccountsService/users/libvirt-qemu
sudo systemctl restart accounts-daemon.service 
  • 3
    This worked and is much simpler for Ubuntu 17.04. The setup described by Elder Geek was already in place, but still had the issue. – Zachary Scott Oct 21 '17 at 15:06
  • This doesn't work for me on Debian 9 (Stretch). The directory and the daemon exist but after I created the file as described and rebooted the libvirt-qemu entry persists. – Daniel Böhmer Feb 16 '18 at 9:50
  • This gives me bash:` /var/lib/AccountsService/users/libvirt-qemu: Permission denied`, even on sudo. – darksoulsong Jan 14 '19 at 12:31
  • @darksoulsong: It seems you tried to execute the file which is not permitted. Double-check that you correctly copied the command line or edit the file with an interactive editor like nano /var/lib/AccountsService/users/libvirt-qemu. – Daniel Böhmer Jan 15 '19 at 9:29
  • 1
    In Ubuntu 18.04 the libvirt-qemu user is still displayed on Lightdm's login screen and can be hidden with the instructions above. – mark Dec 6 '19 at 11:15

warning : In case you work with libvirt I would advice against doing this, since it deletes the account and makes libvirt stop working

I accidentally pressed CtrlAltF10 once trying out some shortcuts I had seen on a Website this took me to a Black Fullscreen tty session where I typed in chvt N and startx to get out to GUI of Ubuntu but this failed and resulted in an additional account named "Libvirt qemu" above my present user name at the Login Page during reboot.

Anyone trying to figure out how to remove Libvirt qemu user, this is how I removed it :

  1. Go to System Settings -> User Accounts
  2. Unlock the UA control
  3. Click on Libvirt qemu account
  4. Remove Libvirt qemu by clicking the small "-" sign at bottom left side.
  • 1
    Thanks, that's very helpful and simple. I got the qemu account when I tried to install KVM for my android emulator's hardware acceleration. – Harsha Dec 22 '17 at 6:13
  • 2
    This is ofcourse not very helpful if You work with libvirt. This deletes the account entirely from system and makes libvirt stop working. – Sprinterfreak Nov 10 '18 at 10:10
  • @Sprinterfreak that is exactly why I described how I got the error so that people who didn't get it that way would not risk using my method to get rid of the additional account, I'll add a warning on top. – himanshuxd Mar 26 '20 at 7:54

For whatever reason the system user "libvirt-gemu" is created with the uid 64055 (at least in Ubuntu 16.04.2).

This is how 16.04.2 creates it:

libvirt-qemu:x:64055:130:Libvirt Qemu,,,:/var/lib/libvirt:/bin/false
libvirt-dnsmasq:x:121:129:Libvirt Dnsmasq,,,:/var/lib/libvirt/dnsmasq:/bin/false

And this is how it should be:

libvirt-qemu:x:125:130:Libvirt Qemu,,,:/var/lib/libvirt:/bin/false
libvirt-dnsmasq:x:121:129:Libvirt Dnsmasq,,,:/var/lib/libvirt/dnsmasq:/bin/false

To correct this simply change the uid of "libvirt-qemu" and it's belonging files. "Libvirt Qemu" will then disappear from the login!

Read e.g. nixCraft - How to Change a USER and GROUP ID on Linux For All Owned Files to know how to do this.

  • 1
    "For whatever reason the system user "libvirt-gemu" is created with the uid 64055 ...". AFAICT, the adoption of 64055 for the libvirt-qemu UID and GID in Debian (and therefore in its derivative distros) was introduced in a patch to libvirt-daemon-system, filed in the Debian bug tracker on 14 Nov 2016 as #844339. Further explanation exists in Debian bug report #843881 and Ubuntu bug report #1637601. – user13975 Apr 4 '18 at 8:20
  • Digging a little further into those bug reports, I see that the relevant Debian maintainer pre-allocated UID/GID 64055 to libvirt-qemu very slightly earlier: 11 Nov 2016. – user13975 Apr 4 '18 at 8:35
  • UID has to be below 1000 to not show up in the user manager. 125 was in my case (Ubuntu) still occupied by gdm, so find next free number. – Sprinterfreak Nov 10 '18 at 10:18
  • Same with Ubuntu 18.04, also the users were still present even after apt purge libvirt*. So I had to delete them manually. – tejas Oct 5 '20 at 9:13
  • I reported a bug bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1903509 about incorrect behavior of packages accountsservice and libvirt-daemon-system combined. The workaround is to create file /var/lib/AccountsService/users/libvirt-qemu. See bug for details. – Mikko Rantalainen Nov 9 '20 at 9:42

At one point either you, or another application installed as a prerequisite, qemu.

  • 1
    I had this problem due to installing gnome-boxes. – orschiro Dec 28 '17 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.