- Getent
getent is a
unix command that helps a user get entries in a number of importanttext files called databases. This includes the passwd and group databases which store user information - hence getent is a common way to look up user details on Unix. Since getent uses the same name service as the system, getent will show all information, including that gained from network information sources such as LDAP.The databases it searches in are: passwd, group, hosts, services, protocols, or networks.
The general syntax is:
getent database [key ...]
Thorsten Kukuk wrote the "getent" utility for theGNU C libraryExamples
Fetch list of user accounts on a Unix system (stored in a database called 'passwd'). This will show all user accounts, regardless of the type of
name service used. For example, if both local and LDAPname service are used for user accounts, the results will include all local and LDAP users:getent passwd
Fetch details for a particular user called joe:
getent passwd joe
Fetch list of group accounts on a Unix system (stored in a database called 'group')
getent group
External links
* [http://www.linuxmanpages.com/man1/getent.1.php] The program's
manpage
Wikimedia Foundation. 2010.