getent man page on Cygwin

Man page or keyword search:  
man Server   22533 pages
apropos Keyword Search (all sections)
Output format
Cygwin logo
[printable version]

GETENT(1)			 User Commands			     GETENT(1)

NAME
       getent - get entries from Name Service Switch libraries

SYNOPSIS
       getent database [key ...]

DESCRIPTION
       The  getent  command  displays  entries from databases supported by the
       Name Service  Switch  libraries,	 which	are  configured	 in  /etc/nss‐
       witch.conf.   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 database may be any of  those  supported  by	 the  Cygwin  Library,
       listed below:

	  ahosts    When one or more key arguments are provided, pass each key
		    in succession to getaddrinfo(3) with  the  address	family
		    AF_UNSPEC,	 enumerating  each  socket  address  structure
		    returned.  Enumeration is not supported on	ahosts,	 so  a
		    key must be provided.

	  ahostsv4  Same as ahosts, but use the address family AF_INET.

	  ahostsv6  Same  as ahosts, but use the address family AF_INET6.  The
		    call  to  getaddrinfo(3)  in  this	 case	includes   the
		    AI_V4MAPPED flag.

	  group	    When no key is provided, use setgrent(3), getgrent(3), and
		    endgrent(3) to enumerate the group database.  When one  or
		    more  key arguments are provided, pass each numeric key to
		    getgrgid(3) and each nonnumeric  key  to  getgrnam(3)  and
		    display the result.

	  hosts	    When one or more key arguments are provided, pass each key
		    to gethostbyaddr(3)	 or  gethostbyname2(3),	 depending  on
		    whether  a	call to inet_pton(3) indicates that the key is
		    an IPv6 or IPv4 address or not, and	 display  the  result.
		    Enumeration	 is  not  supported on hosts, so a key must be
		    provided.

	  initgroups
		    When one or more key arguments are provided, pass each key
		    in	succession  to getgrouplist(3) and display the result.
		    Enumeration is not supported on initgroups, so a key  must
		    be provided.

	  passwd    When no key is provided, use setpwent(3), getpwent(3), and
		    endpwent(3) to enumerate the passwd database.  When one or
		    more  key arguments are provided, pass each numeric key to
		    getpwuid(3) and each nonnumeric  key  to  getpwnam(3)  and
		    display the result.

	  protocols When  no  key  is  provided,  use  setprotoent(3), getpro‐
		    toent(3), and endprotoent(3) to  enumerate	the  protocols
		    database.	When  one  or more key arguments are provided,
		    pass each numeric key to getprotobynumber(3) and each non‐
		    numeric key to getprotobyname(3) and display the result.

	  services  When no key is provided, use setservent(3), getservent(3),
		    and endservent(3)  to  enumerate  the  services  database.
		    When  one  or  more	 key arguments are provided, pass each
		    numeric key to getservbynumber(3) and each nonnumeric  key
		    to getservbyname(3) and display the result.

EXIT STATUS
       One of the following exit values can be returned by getent:

	  0	    Command completed successfully.

	  1	    Missing arguments, or database unknown.

	  2	    One	 or  more supplied key could not be found in the data‐
		    base.

	  3	    Enumeration not supported on this database.

SEE ALSO
       nsswitch.conf(5)

COLOPHON
       This page is an excerpt of the getent man page from release 3.53 of the
       Linux  man-pages	 project,  matched  to	the capabilities of Cygwin.  A
       description of the project, and information about reporting  bugs,  can
       be found at http://www.kernel.org/doc/man-pages/.

Linux				  2013-03-15			     GETENT(1)
[top]

List of man pages available for Cygwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net