Linux.com

Which users can login

Link to this post 18 Feb 12

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

Link to this post 18 Feb 12

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

Link to this post 18 Feb 12

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

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board