The tag has no usage guidance.

learn more… | top users | synonyms

5
votes
1answer
2k views

getent hosts prints IPv4, getent ahosts prints IPv6

Verbatim output from my terminal: $ getent hosts example.org 2001:500:88:200::10 example.org $ getent ahosts example.org 192.0.43.10 STREAM 43-10.any.icann.org 192.0.43.10 DGRAM 192.0.43.10 ...
3
votes
2answers
116 views

read files directly VS getent

In various shell scripts I often see two approaches for getting information from databases supported by Name Service Switch libraries like /etc/group, /etc/hosts or /etc/services. One is getent ...
2
votes
1answer
29 views

command to get username via id

There is a command id to get the user id. E.g. id -u rootgives me 0. Is there an opposite command to get the user name via the id? I know I can grep /etc/passwdor run getent and awk or cutthe result. ...
0
votes
1answer
344 views

getent passwd does not return AD users Centos 7 SSSD

I'm used to joining windows 2008 r2 AD with Krb5.conf/ldap.conf/smb.conf and pam.d/authconfig_ac and being able to list users with getent passwd but after joining a centos 7 system I can logon fine, ...