How to hide an account on KDE login screen?

1

I am running a CentOS 7 virtual machine on my laptop and I'm using KDE (version 4.14.8). That VM serves as an Ansible control tower, from which my Ansible descriptions are applied to the other (headless) VMs that I use on the same laptop.

My problem is that the graphical login screen shows my account as well as the account ansible. I thought system accounts would not show up in that list so I created ansible as a system account. But here is an excerpt from my /etc/passwd file:

hg:x:1002:1002:Mercurial SCM:/home/hg:/bin/bash
saned:x:986:980:SANE scanner daemon user:/usr/share/sane:/sbin/nologin
backupscript:x:1003:1004:Data backup script:/home/backupscript:/sbin/nologin
ansible:x:985:979::/home/ansible:/bin/bash

As can be seen, hg is a user account, but it does not show up in the login screen, which means to me that the user account vs system account distinction is not the element that determines whether an account is shown in the login screen or not.

How can I hide an account on the login screen?

AbVog

Posted 2019-07-20T18:05:16.790

Reputation: 521

Is there a password defined for that ansible user? – xenoid – 2019-07-20T19:23:31.050

Yes, there is indeed a password to that account. – AbVog – 2019-07-21T05:07:19.793

Then remove it. With the proper setup you can su to it from you own account when needed. – xenoid – 2019-07-21T08:23:09.003

Good idea, I hadn't though of that. But the account still shows up and clicking it logged me directly into a Gnome desktop. – AbVog – 2019-07-21T09:48:09.083

Answers

0

To hide the user account, you can add HideUsers=ansible in /etc/sddm.conf under the [User] session.

Atsou Jason

Posted 2019-07-20T18:05:16.790

Reputation: 1

I did just that, to no avail. The file did not exist and I created it. But the 'ansible' account still shows up. Moreover, I issued yum list sddm command after reading your answer and doing some Internet search, and the package is not installed on the system. Maybe that's why the conf file has no effect. – AbVog – 2019-12-26T11:21:23.313

I have done what you suggested, to no avail. The file did not exist and I created it. But the user still shows up on the account list from which I want to remove it. A yum list sddm reveals that sddm is not installed, which probably explains why the conf file is not taken into account. – AbVog – 2019-12-26T17:07:31.397

I think you first need to find out what Desktop manager you are using. Those directives was for sddm, but it seems it is not the one your are currently using. You can see the content of /etc/X11/default-display-manager to find that. After that you have to search for appropriate configuration for that desktop manager. – Atsou Jason – 2019-12-29T08:41:34.900