Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

we're using ldap with sssd for the usermanagement, so our users are not in the "/etc/passwd"

Unfortunately, ps just shows the UIDs:

[root@xyz ~]# id jmw
uid=1582(jmw) gid=1582(jmw) groups=1582(jmw), 1000(admins)

[root@xyz ~]# ps aux
[..cutting some output..]
1582      26794 25.0  0.4 190420 38508 ?        S    12:15   0:00 /usr/bin/php-cgi -c php.ini
[..cutting some output..]

How can i poll the username, that belongs to a UID? ( a grep ':1582:' /etc/passwd doesn't work ;-) )

share|improve this question
up vote 2 down vote accepted

You want getent:

getent passwd 1582

That'll look up entries via your configured nss config. If you've configured it to use LDAP, then it'll use LDAP.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.