LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How do I hide users named "Comment" from the login screen? (https://www.linuxquestions.org/questions/linux-general-1/how-do-i-hide-users-named-comment-from-the-login-screen-4175497321/)

Banquo 03-06-2014 07:45 PM

How do I hide users named "Comment" from the login screen?
 
After much messing about with samba, I seem to have many additional "users" added to the login list, Most are named "Comment" but one is named "Samba Guest Account"

I am using the samba gtk gui for configuring and wanted to add my linux account and my Win 7 accounts. Now I have 8 users on my linux box! How do I disable or hide them?

eklavya 03-13-2014 09:59 AM

As you haven't mentioned your distro, i am guessing it should be ubuntu 11.10+ because it is mentioned in your profile.

Users whose userid is less than 1000 do not list in the login screen. To change the userid of the user.
# sudo usermod -u 999 user-name

If it does not work for you, follow this solution.

Open file /etc/lightdm/users.conf and add your users in the line
Code:

hidden-users=nobody nobody4 noaccess
Suppose your usernames are john david and louie, add this in the line
Code:

hidden-users=nobody nobody4 noaccess john david louie
Now restart lightdm, your users should not be disappeared on the login screen.

sundialsvcs 03-14-2014 04:27 PM

Slight but important note on your comment, eklavya: while you can use usermod as shown to change the numeric-userid of any user, there are two things that you must also consider:
  1. The numeric userids should be unique. In your example, you change it to 999. You should change users according to some consistent-to-you pattern, but do not allow two users to share the same id ... and, of course, never let any of those numbers be 0.
  2. Changing the numeric userid of a user will not affect any user sessions that are already logged on.
  3. The home-directory of the user, and any files including hidden files in that directory and its subdirectories, must be chowned to be owned by the new numeric-id, because it is this number that actually drives the permissions system. I do not believe that usermod will change this. You can lock a user out of his own home.


All times are GMT -5. The time now is 04:11 AM.