6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH GETENT 1M "Mar 14, 2014"
8 .SH NAME
9 getent \- get entries from administrative database
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBgetent\fR \fIdatabase\fR [\fIkey\fR]...
14 .fi
15
16 .SH DESCRIPTION
17 .sp
18 .LP
19 \fBgetent\fR gets a list of entries from the administrative database specified
20 by \fIdatabase\fR. The information generally comes from one or more of the
21 sources that are specified for the \fIdatabase\fR in \fB/etc/nsswitch.conf\fR.
22 .sp
23 .LP
24 \fIdatabase\fR is the name of the database to be examined. This can be
25 \fBpasswd\fR, \fBshadow\fR, \fBgroup\fR, \fBhosts\fR, \fBipnodes\fR, \fBservices\fR,
26 \fBprotocols\fR, \fBethers\fR, \fBproject\fR, \fBnetworks\fR, or
27 \fBnetmasks\fR. For each of these databases, \fBgetent\fR uses the appropriate
28 library routines described in \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), \fBgetgrnam\fR(3C),
29 \fBgethostbyaddr\fR(3NSL), \fBgethostbyname\fR(3NSL),
30 \fBgetipnodebyaddr\fR(3SOCKET), \fBgetipnodebyname\fR(3SOCKET),
31 \fBgetservbyname\fR(3SOCKET), \fBgetprotobyname\fR(3SOCKET),
32 \fBethers\fR(3SOCKET), \fBgetprojbyname\fR(3PROJECT) and
33 \fBgetnetbyname\fR(3SOCKET), respectively.
34 .sp
35 .LP
36 Each \fIkey\fR must be in a format appropriate for searching on the respective
37 database. For example, it can be a \fIusername\fR or \fInumeric-uid\fR for
38 \fBpasswd\fR; \fIhostname\fR or \fIIP\fR \fIaddress\fR for \fBhosts\fR; or
39 \fIservice\fR, \fIservice/protocol\fR, \fIport\fR, or \fIport/proto\fR for
40 \fBservices\fR.
41 .sp
42 .LP
43 \fBgetent\fR prints out the database entries that match each of the supplied
44 keys, one per line, in the format of the matching administrative file:
45 \fBpasswd\fR(4), \fBshadow\fR(4), \fBgroup\fR(4), \fBproject\fR(4), \fBhosts\fR(4),
46 \fBservices\fR(4), \fBprotocols\fR(4), \fBethers\fR(3SOCKET),
47 \fBnetworks\fR(4), or \fBnetmasks\fR(4). If no key is given, all entries
48 returned by the corresponding enumeration library routine, for example,
49 \fBgetpwent()\fR or \fBgethostent()\fR, are printed. Enumeration is not
50 supported on \fBipnodes\fR.
51 .SS "Key Interpretation for \fBpasswd\fR and \fBgroup\fR Databases"
52 .sp
53 .LP
|
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH GETENT 1M "Mar 14, 2014"
8 .SH NAME
9 getent \- get entries from administrative database
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBgetent\fR \fIdatabase\fR [\fIkey\fR]...
14 .fi
15
16 .SH DESCRIPTION
17 .sp
18 .LP
19 \fBgetent\fR gets a list of entries from the administrative database specified
20 by \fIdatabase\fR. The information generally comes from one or more of the
21 sources that are specified for the \fIdatabase\fR in \fB/etc/nsswitch.conf\fR.
22 .sp
23 .LP
24 \fIdatabase\fR is the name of the database to be examined. This can be
25 \fBpasswd\fR, \fBshadow\fR, \fBgroup\fR, \fBhosts\fR, \fBipnodes\fR, \fBservices\fR,
26 \fBprotocols\fR, \fBethers\fR, \fBproject\fR, \fBnetworks\fR,
27 \fBnetmasks\fR, or \fBnetgroup\fR.
28 For each of these databases, \fBgetent\fR uses the appropriate
29 library routines described in \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), \fBgetgrnam\fR(3C),
30 \fBgethostbyaddr\fR(3NSL), \fBgethostbyname\fR(3NSL),
31 \fBgetipnodebyaddr\fR(3SOCKET), \fBgetipnodebyname\fR(3SOCKET),
32 \fBgetservbyname\fR(3SOCKET), \fBgetprotobyname\fR(3SOCKET),
33 \fBethers\fR(3SOCKET), \fBgetprojbyname\fR(3PROJECT),
34 \fBgetnetbyname\fR(3SOCKET), or \fBgetnetgrent\fR(3C) respectively.
35 .sp
36 .LP
37 Each \fIkey\fR must be in a format appropriate for searching on the respective
38 database. For example, it can be a \fIusername\fR or \fInumeric-uid\fR for
39 \fBpasswd\fR; \fIhostname\fR or \fIIP\fR \fIaddress\fR for \fBhosts\fR; or
40 \fIservice\fR, \fIservice/protocol\fR, \fIport\fR, or \fIport/proto\fR for
41 \fBservices\fR.
42 .sp
43 .LP
44 \fBgetent\fR prints out the database entries that match each of the supplied
45 keys, one per line, in the format of the matching administrative file:
46 \fBpasswd\fR(4), \fBshadow\fR(4), \fBgroup\fR(4), \fBproject\fR(4), \fBhosts\fR(4),
47 \fBservices\fR(4), \fBprotocols\fR(4), \fBethers\fR(3SOCKET),
48 \fBnetworks\fR(4), or \fBnetmasks\fR(4). If no key is given, all entries
49 returned by the corresponding enumeration library routine, for example,
50 \fBgetpwent()\fR or \fBgethostent()\fR, are printed. Enumeration is not
51 supported on \fBipnodes\fR.
52 .SS "Key Interpretation for \fBpasswd\fR and \fBgroup\fR Databases"
53 .sp
54 .LP
|