getent.1: Minor wording and grammar changes to Mark's new page

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2012-03-06 07:51:04 +13:00
parent 4a009a3708
commit 3fd39ec4e0
1 changed files with 67 additions and 64 deletions

View File

@ -26,13 +26,16 @@ getent \- get entries from Name Service Switch libraries
.SH SYNOPSIS .SH SYNOPSIS
.BI "getent " database " [ " key " ... ]" .BI "getent " database " [ " key " ... ]"
.SH DESCRIPTION .SH DESCRIPTION
Displays entries from databases supported by the Name Service Switch libraries, The
.I getent
command displays entries from databases supported by the
Name Service Switch libraries,
which are configured in which are configured in
.IR /etc/nsswitch.conf . .IR /etc/nsswitch.conf .
If one or more If one or more
.I key .I key
is provided, then only the entries that match the supplied keys will be arguments are provided,
displayed. then only the entries that match the supplied keys will be displayed.
Otherwise, if no Otherwise, if no
.I key .I key
is provided, all entries will be displayed (unless the database does not is provided, all entries will be displayed (unless the database does not
@ -40,15 +43,15 @@ support enumeration).
.LP .LP
The The
.I database .I database
may be any supported by the GNU C Library, listed below: may be any of those supported by the GNU C Library, listed below:
.RS 3 .RS 3
.TP 10 .TP 10
.B ahosts .B ahosts
When no When no
.I key .I key
is provided, uses is provided, use
.BR sethostent (3), .BR sethostent (3),
.BR gethostent (3) .BR gethostent (3),
and and
.BR endhostent (3) .BR endhostent (3)
to enumerate the hosts database. to enumerate the hosts database.
@ -56,7 +59,7 @@ This is identical to using
.BR hosts . .BR hosts .
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
in succession to in succession to
.BR getaddrinfo (3) .BR getaddrinfo (3)
@ -66,14 +69,14 @@ enumerating each socket address structure returned.
.TP .TP
.B ahostsv4 .B ahostsv4
Same as Same as
.B ahosts .BR ahosts ,
except for the address family but use the address family
.BR AF_INET . .BR AF_INET .
.TP .TP
.B ahostsv6 .B ahostsv6
Same as Same as
.B ahosts .BR ahosts ,
except for the address family but use the address family
.BR AF_INET6 . .BR AF_INET6 .
The call to The call to
.BR getaddrinfo (3) .BR getaddrinfo (3)
@ -84,30 +87,30 @@ flag.
.B aliases .B aliases
When no When no
.I key .I key
is provided, uses is provided, use
.BR setaliasent (3), .BR setaliasent (3),
.BR getaliasent (3) .BR getaliasent (3),
and and
.BR endaliasent (3) .BR endaliasent (3)
to enumerate the aliases database. to enumerate the aliases database.
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
in succession to in succession to
.BR getaliasbyname (3) .BR getaliasbyname (3)
and displays the result. and display the result.
.TP .TP
.B ethers .B ethers
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
in succession to in succession to
.BR ether_aton (3) .BR ether_aton (3)
and and
.BR ether_hostton (3) .BR ether_hostton (3)
until a result is obtained, and displays the result. until a result is obtained, and display the result.
Enumeration is not supported on Enumeration is not supported on
.BR ethers , .BR ethers ,
so a so a
@ -117,53 +120,53 @@ must be provided.
.B group .B group
When no When no
.I key .I key
is provided, uses is provided, use
.BR setgrent (3), .BR setgrent (3),
.BR getgrent (3) .BR getgrent (3),
and and
.BR endgrent (3) .BR endgrent (3)
to enumerate the group database. to enumerate the group database.
When one or more When one or more
.I key .I key
is provided, passes each numeric arguments are provided, pass each numeric
.I key .I key
to to
.BR getgrgid (3) .BR getgrgid (3)
and each non-numeric and each nonnumeric
.I key .I key
to to
.BR getgrnam (3) .BR getgrnam (3)
and displays the result. and display the result.
.TP .TP
.B gshadow .B gshadow
When no When no
.I key .I key
is provided, uses is provided, use
.BR setsgent (3), .BR setsgent (3),
.BR getsgent (3) .BR getsgent (3),
and and
.BR endsgent (3) .BR endsgent (3)
to enumerate the gshadow database. to enumerate the gshadow database.
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
in succession to in succession to
.BR getsgnam (3) .BR getsgnam (3)
and displays the result. and display the result.
.TP .TP
.B hosts .B hosts
When no When no
.I key .I key
is provided, uses is provided, use
.BR sethostent (3), .BR sethostent (3),
.BR gethostent (3) .BR gethostent (3),
and and
.BR endhostent (3) .BR endhostent (3)
to enumerate the hosts database. to enumerate the hosts database.
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
to to
.BR gethostbyaddr (3) .BR gethostbyaddr (3)
@ -173,16 +176,16 @@ depending on whether a call to
.BR inet_pton (3) .BR inet_pton (3)
indicates that the indicates that the
.I key .I key
is an IPv6 or IPv4 address or not, and displays the result. is an IPv6 or IPv4 address or not, and display the result.
.TP .TP
.B initgroups .B initgroups
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
in succession to in succession to
.BR getgrouplist (3) .BR getgrouplist (3)
and displays the result. and display the result.
Enumeration is not supported on Enumeration is not supported on
.BR initgroups , .BR initgroups ,
so a so a
@ -192,13 +195,13 @@ must be provided.
.B netgroup .B netgroup
When one When one
.I key .I key
is provided, passes the is provided, pass the
.I key .I key
to to
.BR setnetgrent (3) .BR setnetgrent (3)
and, using and, using
.BR getnetgrent (3) .BR getnetgrent (3)
displays the resulting string triple display the resulting string triple
.RI ( hostname ", " username ", " domainname ). .RI ( hostname ", " username ", " domainname ).
Alternatively, three Alternatively, three
.I keys .I keys
@ -218,124 +221,124 @@ must be provided.
.B networks .B networks
When no When no
.I key .I key
is provided, uses is provided, use
.BR setnetent (3), .BR setnetent (3),
.BR getnetent (3) .BR getnetent (3),
and and
.BR endnetent (3) .BR endnetent (3)
to enumerate the networks database. to enumerate the networks database.
When one or more When one or more
.I key .I key
is provided, passes each numeric arguments are provided, pass each numeric
.I key .I key
to to
.BR getnetbyaddr (3) .BR getnetbyaddr (3)
and each non-numeric and each nonnumeric
.I key .I key
to to
.BR getnetbyname (3) .BR getnetbyname (3)
and displays the result. and display the result.
.TP .TP
.B passwd .B passwd
When no When no
.I key .I key
is provided, uses is provided, use
.BR setpwent (3), .BR setpwent (3),
.BR getpwent (3) .BR getpwent (3),
and and
.BR endpwent (3) .BR endpwent (3)
to enumerate the passwd database. to enumerate the passwd database.
When one or more When one or more
.I key .I key
is provided, passes each numeric arguments are provided, pass each numeric
.I key .I key
to to
.BR getpwuid (3) .BR getpwuid (3)
and each non-numeric and each nonnumeric
.I key .I key
to to
.BR getpwnam (3) .BR getpwnam (3)
and displays the result. and display the result.
.TP .TP
.B protocols .B protocols
When no When no
.I key .I key
is provided, uses is provided, use
.BR setprotoent (3), .BR setprotoent (3),
.BR getprotoent (3) .BR getprotoent (3),
and and
.BR endprotoent (3) .BR endprotoent (3)
to enumerate the protocols database. to enumerate the protocols database.
When one or more When one or more
.I key .I key
is provided, passes each numeric arguments are provided, pass each numeric
.I key .I key
to to
.BR getprotobynumber (3) .BR getprotobynumber (3)
and each non-numeric and each nonnumeric
.I key .I key
to to
.BR getprotobyname (3) .BR getprotobyname (3)
and displays the result. and display the result.
.TP .TP
.B rpc .B rpc
When no When no
.I key .I key
is provided, uses is provided, use
.BR setrpcent (3), .BR setrpcent (3),
.BR getrpcent (3) .BR getrpcent (3),
and and
.BR endrpcent (3) .BR endrpcent (3)
to enumerate the rpc database. to enumerate the rpc database.
When one or more When one or more
.I key .I key
is provided, passes each numeric arguments are provided, pass each numeric
.I key .I key
to to
.BR getrpcbynumber (3) .BR getrpcbynumber (3)
and each non-numeric and each nonnumeric
.I key .I key
to to
.BR getrpcbyname (3) .BR getrpcbyname (3)
and displays the result. and display the result.
.TP .TP
.B services .B services
When no When no
.I key .I key
is provided, uses is provided, use
.BR setservent (3), .BR setservent (3),
.BR getservent (3) .BR getservent (3),
and and
.BR endservent (3) .BR endservent (3)
to enumerate the services database. to enumerate the services database.
When one or more When one or more
.I key .I key
is provided, passes each numeric arguments are provided, pass each numeric
.I key .I key
to to
.BR getservbynumber (3) .BR getservbynumber (3)
and each non-numeric and each nonnumeric
.I key .I key
to to
.BR getservbyname (3) .BR getservbyname (3)
and displays the result. and display the result.
.TP .TP
.B shadow .B shadow
When no When no
.I key .I key
is provided, uses is provided, use
.BR setspent (3), .BR setspent (3),
.BR getspent (3) .BR getspent (3),
and and
.BR endspent (3) .BR endspent (3)
to enumerate the shadow database. to enumerate the shadow database.
When one or more When one or more
.I key .I key
is provided, passes each arguments are provided, pass each
.I key .I key
in succession to in succession to
.BR getspnam (3) .BR getspnam (3)
and displays the result. and display the result.
.RE .RE
.SH "EXIT STATUS" .SH "EXIT STATUS"
One of the following exit values can be returned by One of the following exit values can be returned by
@ -361,4 +364,4 @@ Enumeration not supported on this
.IR database . .IR database .
.RE .RE
.SH "SEE ALSO" .SH "SEE ALSO"
.BR nsswitch.conf (5). .BR nsswitch.conf (5)