Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 8
    Unlike getent, this does not work if the system uses LDAP. Commented Apr 17, 2012 at 8:51
  • 3
    this doesn't work either if NIS is used or whatever other distributed authentication protocol. Commented Apr 18, 2012 at 1:25
  • @choroba : if he had a specific requirement for LDAP or NIS, he probably would have mentioned it. My solution works on typical linux setups. Commented Apr 18, 2012 at 2:55
  • 2
    downvote beacause it's not reliable (it could match either the user or group). Commented Dec 29, 2016 at 10:36