Verbatim output from my terminal: $ getent hosts example.org 2001:500:88:200::10 example.org $ getent ahosts example.org 220.127.116.11 STREAM 43-10.any.icann.org 18.104.22.168 DGRAM 22.214.171.124 ...
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 ...
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. ...
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, ...