getent
getent is a command-line utility on many Unix-like systems that retrieves entries from administrative databases. It relies on the Name Service Switch (NSS) configuration to query databases defined in /etc/nsswitch.conf. Entries may come from local files such as /etc/passwd, /etc/group, and /etc/hosts, or from remote services like LDAP, NIS, or SSSD, depending on the system’s NSS setup. The tool provides a uniform way to obtain information about users, groups, hosts, and other entities regardless of the underlying source.
Usage and syntax: getent database [keys...]. The database is the name of the NSS source to query
Notes: Output is plain text and database-specific. For passwd and group, lines are typically colon-separated fields;