linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* New man page: getent(1)
@ 2011-10-31 14:30 Mark R Bannister
       [not found] ` <18640.1320071456-/K+B3afwL8Jt0JrxVvvTASp2UmYkHbXO@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Mark R Bannister @ 2011-10-31 14:30 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hi,

As previously noted on this mailing list, although the GNU C Library provides the
getent.c source code, the getent(1) man page is missing from the Linux man-pages
project.  The existing getent(1) man page found on common Linux distributions is
very short, and says very little.  I am not sure where it comes from (Debian?),
but should really be part of the man-pages project as it is functionality
provided by glibc.

I hope you will accept the following into the Linux man-pages project.  I have
written this from scratch to be much more informative and using the latest glibc
nss/getent.c as a reference.

Best regards,
Mark Bannister.

----------

.\" Copyright (c) 2011, Mark R. Bannister <cambridge-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.TH GETENT 1 2011-10-31 "Linux" "User Commands"
.SH NAME
getent \- get entries from Name Service Switch libraries
.SH SYNOPSIS
.BI "getent " database " [ " key " ... ]"
.SH DESCRIPTION
Displays entries from databases supported by the Name Service Switch libraries,
which are configured in
.IR /etc/nsswitch.conf .
If one or more
.I key
is provided, then only the entries that match the supplied keys will be
displayed.
Otherwise, if no
.I key
is provided, all entries will be displayed (unless the database does not
support enumeration).
.LP
The
.I database
may be any supported by the GNU C Library, listed below:
.RS 3
.TP 10
.B ahosts
When no
.I key
is provided, uses
.BR sethostent (3),
.BR gethostent (3)
and
.BR endhostent (3)
to enumerate the hosts database.
This is identical to using
.BR hosts .
When one or more
.I key
is provided, passes each
.I key
in succession to
.BR getaddrinfo (3)
with the address family
.BR AF_UNSPEC ,
enumerating each socket address structure returned.
.TP
.B ahostsv4
Same as
.B ahosts
except for the address family
.BR AF_INET .
.TP
.B ahostsv6
Same as
.B ahosts
except for the address family
.BR AF_INET6 .
The call to
.BR getaddrinfo (3)
in this case includes the
.B AI_V4MAPPED
flag.
.TP
.B aliases
When no
.I key
is provided, uses
.BR setaliasent (3),
.BR getaliasent (3)
and
.BR endaliasent (3)
to enumerate the aliases database.
When one or more
.I key
is provided, passes each
.I key
in succession to
.BR getaliasbyname (3)
and displays the result.
.TP
.B ethers
When one or more
.I key
is provided, passes each
.I key
in succession to
.BR ether_aton (3)
and
.BR ether_hostton (3)
until a result is obtained, and displays the result.
Enumeration is not supported on
.BR ethers ,
so a
.I key
must be provided.
.TP
.B group
When no
.I key
is provided, uses
.BR setgrent (3),
.BR getgrent (3)
and
.BR endgrent (3)
to enumerate the group database.
When one or more
.I key
is provided, passes each numeric
.I key
to
.BR getgrgid (3)
and each non-numeric
.I key
to
.BR getgrnam (3)
and displays the result.
.TP
.B gshadow
When no
.I key
is provided, uses
.BR setsgent (3),
.BR getsgent (3)
and
.BR endsgent (3)
to enumerate the gshadow database.
When one or more
.I key
is provided, passes each
.I key
in succession to
.BR getsgnam (3)
and displays the result.
.TP
.B hosts
When no
.I key
is provided, uses
.BR sethostent (3),
.BR gethostent (3)
and
.BR endhostent (3)
to enumerate the hosts database.
When one or more
.I key
is provided, passes each
.I key
to
.BR gethostbyaddr (3)
or
.BR gethostbyname2 (3),
depending on whether a call to
.BR inet_pton (3)
indicates that the
.I key
is an IPv6 or IPv4 address or not, and displays the result.
.TP
.B initgroups
When one or more
.I key
is provided, passes each
.I key
in succession to
.BR getgrouplist (3)
and displays the result.
Enumeration is not supported on
.BR initgroups ,
so a
.I key
must be provided.
.TP
.B netgroup
When one
.I key
is provided, passes the
.I key
to
.BR setnetgrent (3)
and, using
.BR getnetgrent (3)
displays the resulting string triple
.RI ( hostname ", " username ", " domainname ).
Alternatively, three
.I keys
may be provided, which are interpreted as the
.IR hostname ,
.I username
and
.I domainname
to match to a netgroup name via
.BR innetgr (3).
Enumeration is not supported on
.BR initgroups ,
so either one or three
.I keys
must be provided.
.TP
.B networks
When no
.I key
is provided, uses
.BR setnetent (3),
.BR getnetent (3)
and
.BR endnetent (3)
to enumerate the networks database.
When one or more
.I key
is provided, passes each numeric
.I key
to
.BR getnetbyaddr (3)
and each non-numeric
.I key
to
.BR getnetbyname (3)
and displays the result.
.TP
.B passwd
When no
.I key
is provided, uses
.BR setpwent (3),
.BR getpwent (3)
and
.BR endpwent (3)
to enumerate the passwd database.
When one or more
.I key
is provided, passes each numeric
.I key
to
.BR getpwuid (3)
and each non-numeric
.I key
to
.BR getpwnam (3)
and displays the result.
.TP
.B protocols
When no
.I key
is provided, uses
.BR setprotoent (3),
.BR getprotoent (3)
and
.BR endprotoent (3)
to enumerate the protocols database.
When one or more
.I key
is provided, passes each numeric
.I key
to
.BR getprotobynumber (3)
and each non-numeric
.I key
to
.BR getprotobyname (3)
and displays the result.
.TP
.B rpc
When no
.I key
is provided, uses
.BR setrpcent (3),
.BR getrpcent (3)
and
.BR endrpcent (3)
to enumerate the rpc database.
When one or more
.I key
is provided, passes each numeric
.I key
to
.BR getrpcbynumber (3)
and each non-numeric
.I key
to
.BR getrpcbyname (3)
and displays the result.
.TP
.B services
When no
.I key
is provided, uses
.BR setservent (3),
.BR getservent (3)
and
.BR endservent (3)
to enumerate the services database.
When one or more
.I key
is provided, passes each numeric
.I key
to
.BR getservbynumber (3)
and each non-numeric
.I key
to
.BR getservbyname (3)
and displays the result.
.TP
.B shadow
When no
.I key
is provided, uses
.BR setspent (3),
.BR getspent (3)
and
.BR endspent (3)
to enumerate the shadow database.
When one or more
.I key
is provided, passes each
.I key
in succession to
.BR getspnam (3)
and displays the result.
.RE
.SH "EXIT STATUS"
One of the following exit values can be returned by
.BR getent :
.RS 3
.TP 10
.B 0
Command completed successfully.
.TP
.B 1
Missing arguments, or
.I database
unknown.
.TP
.B 2
One or more supplied
.I key
could not be found in the
.IR database .
.TP
.B 3
Enumeration not supported on this
.IR database .
.RE
.SH "SEE ALSO"
.BR nsswitch.conf (5).


--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New man page: getent(1)
@ 2011-10-31 14:34 Mark R Bannister
  0 siblings, 0 replies; 4+ messages in thread
From: Mark R Bannister @ 2011-10-31 14:34 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

I should add that you can preview my getent(1) man page submission from the
following URL:

http://prose.sourceforge.net/man/linux/getent.1.html

Regards,
Mark.

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New man page: getent(1)
       [not found] ` <18640.1320071456-/K+B3afwL8Jt0JrxVvvTASp2UmYkHbXO@public.gmane.org>
@ 2012-03-05 18:51   ` Michael Kerrisk (man-pages)
       [not found]     ` <CAKgNAkj_VE+jKs8rspdw9=AwneQND9n+AWccw3JqX+CvDqX_+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-03-05 18:51 UTC (permalink / raw)
  To: mark-/K+B3afwL8Jt0JrxVvvTASp2UmYkHbXO; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

Hello Mark,

Sorry for the long delay in responding to your mail(s).

On Tue, Nov 1, 2011 at 3:30 AM, Mark R Bannister
<mark-/K+B3afwL8Jt0JrxVvvTASp2UmYkHbXO@public.gmane.org> wrote:
> Hi,
>
> As previously noted on this mailing list, although the GNU C Library provides the
> getent.c source code, the getent(1) man page is missing from the Linux man-pages
> project.  The existing getent(1) man page found on common Linux distributions is
> very short, and says very little.

Indeed.

> I am not sure where it comes from (Debian?),

Looks like it.

> but should really be part of the man-pages project as it is functionality
> provided by glibc.

Yes, I am inclined to agree.

> I hope you will accept the following into the Linux man-pages project.  I have
> written this from scratch to be much more informative and using the latest glibc
> nss/getent.c as a reference.

I've added this page for the upcoming man-pages-3.37 release.

The formatting was fine (thanks for paying close attention to the
formatting!) and I made a very few wording and grammar changes  (these
were not to fix errors, just to bring the page into consistency with
common practice in man-pages),

Thank you for contributing this page!

Cheers,

Michael


> ----------
>
> .\" Copyright (c) 2011, Mark R. Bannister <cambridge-Rn4VEauK+AKRv+LV9MX5ug@public.gmane.orge.net>
> .\"
> .\" This is free documentation; you can redistribute it and/or
> .\" modify it under the terms of the GNU General Public License as
> .\" published by the Free Software Foundation; either version 2 of
> .\" the License, or (at your option) any later version.
> .\"
> .\" The GNU General Public License's references to "object code"
> .\" and "executables" are to be interpreted as the output of any
> .\" document formatting or typesetting system, including
> .\" intermediate and printed output.
> .\"
> .\" This manual is distributed in the hope that it will be useful,
> .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
> .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> .\" GNU General Public License for more details.
> .\"
> .\" You should have received a copy of the GNU General Public
> .\" License along with this manual; if not, write to the Free
> .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
> .\" USA.
> .\"
> .TH GETENT 1 2011-10-31 "Linux" "User Commands"
> .SH NAME
> getent \- get entries from Name Service Switch libraries
> .SH SYNOPSIS
> .BI "getent " database " [ " key " ... ]"
> .SH DESCRIPTION
> Displays entries from databases supported by the Name Service Switch libraries,
> which are configured in
> .IR /etc/nsswitch.conf .
> If one or more
> .I key
> is provided, then only the entries that match the supplied keys will be
> displayed.
> Otherwise, if no
> .I key
> is provided, all entries will be displayed (unless the database does not
> support enumeration).
> .LP
> The
> .I database
> may be any supported by the GNU C Library, listed below:
> .RS 3
> .TP 10
> .B ahosts
> When no
> .I key
> is provided, uses
> .BR sethostent (3),
> .BR gethostent (3)
> and
> .BR endhostent (3)
> to enumerate the hosts database.
> This is identical to using
> .BR hosts .
> When one or more
> .I key
> is provided, passes each
> .I key
> in succession to
> .BR getaddrinfo (3)
> with the address family
> .BR AF_UNSPEC ,
> enumerating each socket address structure returned.
> .TP
> .B ahostsv4
> Same as
> .B ahosts
> except for the address family
> .BR AF_INET .
> .TP
> .B ahostsv6
> Same as
> .B ahosts
> except for the address family
> .BR AF_INET6 .
> The call to
> .BR getaddrinfo (3)
> in this case includes the
> .B AI_V4MAPPED
> flag.
> .TP
> .B aliases
> When no
> .I key
> is provided, uses
> .BR setaliasent (3),
> .BR getaliasent (3)
> and
> .BR endaliasent (3)
> to enumerate the aliases database.
> When one or more
> .I key
> is provided, passes each
> .I key
> in succession to
> .BR getaliasbyname (3)
> and displays the result.
> .TP
> .B ethers
> When one or more
> .I key
> is provided, passes each
> .I key
> in succession to
> .BR ether_aton (3)
> and
> .BR ether_hostton (3)
> until a result is obtained, and displays the result.
> Enumeration is not supported on
> .BR ethers ,
> so a
> .I key
> must be provided.
> .TP
> .B group
> When no
> .I key
> is provided, uses
> .BR setgrent (3),
> .BR getgrent (3)
> and
> .BR endgrent (3)
> to enumerate the group database.
> When one or more
> .I key
> is provided, passes each numeric
> .I key
> to
> .BR getgrgid (3)
> and each non-numeric
> .I key
> to
> .BR getgrnam (3)
> and displays the result.
> .TP
> .B gshadow
> When no
> .I key
> is provided, uses
> .BR setsgent (3),
> .BR getsgent (3)
> and
> .BR endsgent (3)
> to enumerate the gshadow database.
> When one or more
> .I key
> is provided, passes each
> .I key
> in succession to
> .BR getsgnam (3)
> and displays the result.
> .TP
> .B hosts
> When no
> .I key
> is provided, uses
> .BR sethostent (3),
> .BR gethostent (3)
> and
> .BR endhostent (3)
> to enumerate the hosts database.
> When one or more
> .I key
> is provided, passes each
> .I key
> to
> .BR gethostbyaddr (3)
> or
> .BR gethostbyname2 (3),
> depending on whether a call to
> .BR inet_pton (3)
> indicates that the
> .I key
> is an IPv6 or IPv4 address or not, and displays the result.
> .TP
> .B initgroups
> When one or more
> .I key
> is provided, passes each
> .I key
> in succession to
> .BR getgrouplist (3)
> and displays the result.
> Enumeration is not supported on
> .BR initgroups ,
> so a
> .I key
> must be provided.
> .TP
> .B netgroup
> When one
> .I key
> is provided, passes the
> .I key
> to
> .BR setnetgrent (3)
> and, using
> .BR getnetgrent (3)
> displays the resulting string triple
> .RI ( hostname ", " username ", " domainname ).
> Alternatively, three
> .I keys
> may be provided, which are interpreted as the
> .IR hostname ,
> .I username
> and
> .I domainname
> to match to a netgroup name via
> .BR innetgr (3).
> Enumeration is not supported on
> .BR initgroups ,
> so either one or three
> .I keys
> must be provided.
> .TP
> .B networks
> When no
> .I key
> is provided, uses
> .BR setnetent (3),
> .BR getnetent (3)
> and
> .BR endnetent (3)
> to enumerate the networks database.
> When one or more
> .I key
> is provided, passes each numeric
> .I key
> to
> .BR getnetbyaddr (3)
> and each non-numeric
> .I key
> to
> .BR getnetbyname (3)
> and displays the result.
> .TP
> .B passwd
> When no
> .I key
> is provided, uses
> .BR setpwent (3),
> .BR getpwent (3)
> and
> .BR endpwent (3)
> to enumerate the passwd database.
> When one or more
> .I key
> is provided, passes each numeric
> .I key
> to
> .BR getpwuid (3)
> and each non-numeric
> .I key
> to
> .BR getpwnam (3)
> and displays the result.
> .TP
> .B protocols
> When no
> .I key
> is provided, uses
> .BR setprotoent (3),
> .BR getprotoent (3)
> and
> .BR endprotoent (3)
> to enumerate the protocols database.
> When one or more
> .I key
> is provided, passes each numeric
> .I key
> to
> .BR getprotobynumber (3)
> and each non-numeric
> .I key
> to
> .BR getprotobyname (3)
> and displays the result.
> .TP
> .B rpc
> When no
> .I key
> is provided, uses
> .BR setrpcent (3),
> .BR getrpcent (3)
> and
> .BR endrpcent (3)
> to enumerate the rpc database.
> When one or more
> .I key
> is provided, passes each numeric
> .I key
> to
> .BR getrpcbynumber (3)
> and each non-numeric
> .I key
> to
> .BR getrpcbyname (3)
> and displays the result.
> .TP
> .B services
> When no
> .I key
> is provided, uses
> .BR setservent (3),
> .BR getservent (3)
> and
> .BR endservent (3)
> to enumerate the services database.
> When one or more
> .I key
> is provided, passes each numeric
> .I key
> to
> .BR getservbynumber (3)
> and each non-numeric
> .I key
> to
> .BR getservbyname (3)
> and displays the result.
> .TP
> .B shadow
> When no
> .I key
> is provided, uses
> .BR setspent (3),
> .BR getspent (3)
> and
> .BR endspent (3)
> to enumerate the shadow database.
> When one or more
> .I key
> is provided, passes each
> .I key
> in succession to
> .BR getspnam (3)
> and displays the result.
> .RE
> .SH "EXIT STATUS"
> One of the following exit values can be returned by
> .BR getent :
> .RS 3
> .TP 10
> .B 0
> Command completed successfully.
> .TP
> .B 1
> Missing arguments, or
> .I database
> unknown.
> .TP
> .B 2
> One or more supplied
> .I key
> could not be found in the
> .IR database .
> .TP
> .B 3
> Enumeration not supported on this
> .IR database .
> .RE
> .SH "SEE ALSO"
> .BR nsswitch.conf (5).
>
>



-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: New man page: getent(1)
       [not found]     ` <CAKgNAkj_VE+jKs8rspdw9=AwneQND9n+AWccw3JqX+CvDqX_+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-03-05 18:53       ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Kerrisk (man-pages) @ 2012-03-05 18:53 UTC (permalink / raw)
  To: mark-/K+B3afwL8Jt0JrxVvvTASp2UmYkHbXO; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA

For completeness, here was the patch I applied.

Cheers,

Michael

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


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Author of "The Linux Programming Interface"; http://man7.org/tlpi/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-03-05 18:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-31 14:34 New man page: getent(1) Mark R Bannister
  -- strict thread matches above, loose matches on Subject: below --
2011-10-31 14:30 Mark R Bannister
     [not found] ` <18640.1320071456-/K+B3afwL8Jt0JrxVvvTASp2UmYkHbXO@public.gmane.org>
2012-03-05 18:51   ` Michael Kerrisk (man-pages)
     [not found]     ` <CAKgNAkj_VE+jKs8rspdw9=AwneQND9n+AWccw3JqX+CvDqX_+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-03-05 18:53       ` Michael Kerrisk (man-pages)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).