How to hide users on the login screen list

This is a tip that I personally like a lot 🙂

It happens that there are times that we share our computer with someone else at home, and for a certain reason we do not want that other person to know who our user is, or that at least apparently our user does not exist.

The problem is that a list of system users can be displayed on our login screen, for example:

Taking a closer look at the user area:

As you can see ... a list of users appears, right?

The question is, How to make a user not appear in the list, even though it exists in the system? 😀

Suppose we want to hide the user kira ... for this in a terminal we put:

sudo usermod -u 999 kira

This will be enough to hide it .. see:

What is interesting? 😀

What we did with that command is change the UID (ID or representative number of the user) to 999, and everything seems to indicate that users with a UID lower than 1000 does not show them in that list, since apparently it recognizes them as daemons or internal users of the system, that's why it does not show them 😉

Well there is nothing more to say about this tip 😉

I hope someone finds it interesting ...

regards


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   xxmlud said

    Hi !, one question, is it LightDM ?, are there themes for LightDM ?, can you change from LightDM to KDM ?.
    Hahaha
    Thanks and Regards

  2.   ever said

    Hello KZKG ^ Gaara, I congratulate you for the post you have been writing, you help many who have just landed on Linux to show them the power of the ability to customize it, and from what I see, you also learn a lot in the course of this! attitude!
    What I do recommend that to do this to hide a user in the list you better use the configuration of the session manager (in your case KDM). This is because changing the UID of a user is not a recommended practice, because several programs can use this number to uniquely identify the user, and if you change it they will not recognize it. Besides, as you already noticed, users under 1000 are reserved for the system, so in theory some program that needs to create a user could overwrite it.
    In your case, go to System Configuration -> Session manager and from there examining a little you will see the options to hide, apart from other very useful ones. You could even change the KDM theme to one that does not list users, that way you would have to write the names (which would be the safest thing to do).
    A hug

    1.    KZKG ^ Gaara said

      Thank you
      The truth is that I am really happy because I am publishing a lot in these last days, I do not remember when was the last time I published so much *-*

      Actually I used this tip some time ago, several months ago (I think more than a year ago), when I needed to create a hidden user on a computer, I created the user with the home in another half hidden place, and I made this tip , then I used it to access via SSH 🙂

      Yes, you are right that it is a risk to change the UID for something as simple as this, being able to do this mainly through clicks, but hey… it is the solution I found at the time. In fact, in those days I was using Gnome2 hahaha.

      Thank you for the comment really, and yes… the idea is not only me to share knowledge, but to give us all feedback, learn all of us because obviously, I also have a lot to learn 😀

  3.   vicky said

    What theme do you use on the login screen?

  4.   Doroide said

    Good tips and lovely Login !!!
    What is the theme you use?

    1.    KZKG ^ Gaara said

      haha actually I use the one that comes by default in KDE 4.8, that of the screenshot I put it so that the user list would be clearly visible, you can download it from here: http://kde-look.org/content/show.php?content=63928

  5.   City said

    It's good that you're happy KZKG ^ Gaara, your articles are very good, because I also add to the doubt of what is your Login topic?

    1.    KZKG ^ Gaara said

      hahaha thanks for what good articles are hahaha.
      Actually I use the one that comes by default in KDE 4.8, that of the screenshot I put it so that the user list can be seen well, you can download it from here: http://kde-look.org/content/show.php?content=63928

      1.    City said

        thanks I'll put it on my kde 🙂

        1.    KZKG ^ Gaara said

          Thanks to you for commenting 😀

  6.   Lulu said

    I actually use another way to hide an account on the login screen, it seems very practical:

    I look for the passwd file and comment (#) the line of said user, that's all 🙂

    1.    n3storm said

      don't ever do that !!! well, Lulu has already thought of it 😛 but the rest of you don't do it unless you know very well which users you are blocking.

      1.    Lulu said

        What's wrong with it?????? :) :)

    2.    KZKG ^ Gaara said

      This is not recommended, because then you are not hiding the account, but disabling it 😉

      1.    Lulu said

        hehe, I really don't understand ??? If you want to hide an account you don't want anyone to see your documents ?????

        Why hide the account on the login screen if your documents are going to be visible to whoever enters / home ????

        I have just reviewed a "disabled" account and I can see all its documents perfectly

        1.    KZKG ^ Gaara said

          Nothing is simple 🙂
          First, when creating the user I do it with a parameter specifying that for example, its home will NOT be / home / kira ... but / lib / kira
          adduser kira --home /lib/kira

          But still the user will see that it exists in the login, right? ... well, so that the user continues to work but is hidden from human eyes, I change the UID as indicated in the tutorial and that's it 😉

          1.    Lulu said

            yes, nothing is easy 🙂

            the title should be changed to: "how to create hidden account"

  7.   Ariel said

    Using KDM as session manager, there is a section of its configuration (System Preferences> Login screen) that allows showing or hiding users without changing their UID. So quick and easy.

  8.   orbayo said

    Very interesting. If I'm not mistaken, this in KDE-openSUSE can be done from yast.

  9.   Tomas said

    Then how can I access a hidden account?