Welcome to the new Linux Foundation Forum!

Which users can login

Hello,

Is there a way to show which users could log onto the system and all groups available on the system. NOT which users were currently online and which groups you belong to.

Thanks,

Usman

Comments

  • marcmarc Posts: 647
    That's *VERY* difficult to know.

    However, in the average system, everything is in /etc/passwd (those users with no "nologin" or "false" at the end can log in) and /etc/group

    Regards
  • usmangt,

    Marc is right, but the information is certainly available, you'll just have to check multiple sources.

    You should also take a look at the /etc/shadow file and check for anything with an ! at the start of the second field.

    IE:
    tor:!:15373:0:99999:7:::
    

    A user can be locked in this way by running passwd -l USERNAME

    Wikipedia actually has fairly good articles on both passwd and shadow that might help you understand the syntax.

    -mm
Sign In or Register to comment.