Overview#

Query for Data#

The getent command displays entries from Name Service Switch Types, aka databases, supported by the Name Service Switch libraries.

If one or more key arguments are provided, then only the entries that match the supplied keys will be displayed. Otherwise, if no key is provided, all entries will be displayed (unless the database does not support enumeration).

The Getent tool can be used to query NSS for specific Getent by giving the group name as a command-line parameter:

getent netgroup sysadmin
sysadmin             (sa.willeke.com, , ) (xenhost.willeke.com, , )

Enumeration not supported on Netgroup

Some entries in the .... do not support returning more than one entry.

EXIT STATUS#

The following exit values are returned:
  • 0 - Successful completion.
  • 1 - Command syntax was incorrect, an invalid option was used, or an internal error occurred.
  • 2 - At least one of the specified entry names was not found in the database.
  • 3 - There is no support for enumeration on this database.

getent attribute LDAP SearchFilters[1]#

getent NameLDAP SearchFilters
aliases(objectClass=rfc822MailGroup)
auth_attr(objectClass=SolarisAuthAttr)
audit_user(objectClass=SolarisAuditUser)
exec_attr(objectClass=SolarisExecAttr)
group(objectClass=posixGroup)
hosts(objectClass=ipHost)
networks(objectClass=ipNetwork)
prof_attr(objectClass=SolarisProfAttr)
protocols(objectClass=ipProtocol)
passwd(objectClass=posixAccount)
printers(objectClass=sunPrinter)
rpc(objectClass=oncRpc)
services(objectClass=ipService)
shadow(objectclass=shadowAccount)
project(objectClass=SolarisProject)
usr_attrobjectClass=SolarisUserAttr)

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-8) was last changed on 16-Sep-2013 17:37 by jim