Why do I have a "libvirt qemu" account in Lock/Switch account options in Ubuntu 16.04?
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
Solution 1:
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
Solution 2:
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 :
- Go to System Settings -> User Accounts
- Unlock the UA control
- Click on Libvirt qemu account
- Remove Libvirt qemu by clicking the small "-" sign at bottom left side.
Solution 3:
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.
Sources:
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
Solution 4:
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.
Solution 5:
At one point either you, or another application installed as a prerequisite, qemu.