'\" te .\" Copyright (c) 1994, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright 1989 AT&T .TH netid 4 "10 Dec 2009" "SunOS 5.11" "File Formats" .SH NAME netid \- netname database .SH SYNOPSIS .LP .nf \fB/etc/netid\fR .fi .SH DESCRIPTION .sp .LP The \fBnetid\fR file is a local source of information on mappings between netnames (see \fBsecure_rpc\fR(3NSL)) and user ids or hostnames in the local domain. The \fBnetid\fR file can be used in conjunction with, or instead of, the network source, \fBNIS\fR. The \fBpublickey\fR entry in the \fBnsswitch.conf\fR (see \fBnsswitch.conf\fR(4)) file determines which of these sources will be queried by the system to translate netnames to local user ids or hostnames. .sp .LP Each entry in the \fBnetid\fR file is a single line of the form: .sp .in +2 .nf \fInetname uid\fR\fB:\fR\fIgid, gid, gid\|.\|.\|.\fR .fi .in -2 .sp .sp .LP or .sp .in +2 .nf \fInetname\fR \fB 0:\fR\fBhostname\fR .fi .in -2 .sp .sp .LP The first entry associates a local user id with a netname. The second entry associates a hostname with a netname. .sp .LP The \fBnetid\fR file field descriptions are as follows: .sp .ne 2 .mk .na \fB\fInetname\fR\fR .ad .RS 12n .rt The operating system independent network name for the user or host. \fInetname\fR has one of two formats. The format used to specify a host is of the form: .sp \fBunix.\fR\fBhostname\fR\fB@\fR\fIdomain\fR .sp where \fBhostname\fR is the name of the host and \fIdomain\fR is the network domain name. .sp The format used to specify a user id is of the form: .sp \fBunix.\fR\fIuid\fR\fB@\fR\fIdomain\fR .sp where \fIuid\fR is the numerical id of the user and \fIdomain\fR is the network domain name. .RE .sp .ne 2 .mk .na \fB\fIuid\fR\fR .ad .RS 12n .rt The numerical id of the user (see \fBpasswd\fR(4)). When specifying a host name, \fIuid\fR is always zero. .RE .sp .ne 2 .mk .na \fB\fIgroup\fR\fR .ad .RS 12n .rt The numerical id of the group the user belongs to (see \fBgroup\fR(4)). Several groups, separated by commas, may be listed for a single \fIuid\fR. .RE .sp .ne 2 .mk .na \fB\fBhostname\fR\fR .ad .RS 12n .rt The local hostname (see \fBhosts\fR(4)). .RE .sp .LP Blank lines are ignored. Any part of a line to the right of a `\fB#\fR' symbol is treated as a comment. .SH EXAMPLES .LP \fBExample 1 \fRA sample \fBnetid\fR file. .sp .LP Here is a sample \fBnetid\fR file: .sp .in +2 .nf unix.789@West.Sun.COM 789:30,65 unix.123@Bldg_xy.Sun.COM 123:20,1521 unix.candlestick@campus1.bayarea.EDU 0:candlestick .fi .in -2 .sp .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/group\fR\fR .ad .RS 18n .rt groups file .RE .sp .ne 2 .mk .na \fB\fB/etc/hosts\fR\fR .ad .RS 18n .rt hosts database .RE .sp .ne 2 .mk .na \fB\fB/etc/netid\fR\fR .ad .RS 18n .rt netname database .RE .sp .ne 2 .mk .na \fB\fB/etc/passwd\fR\fR .ad .RS 18n .rt password file .RE .sp .ne 2 .mk .na \fB\fB/etc/publickey\fR\fR .ad .RS 18n .rt public key database .RE .SH SEE ALSO .sp .LP \fBnetname2user\fR(3NSL), \fBsecure_rpc\fR(3NSL), \fBgroup\fR(4), \fBhosts\fR(4), \fBnsswitch.conf\fR(4), \fBpasswd\fR(4), \fBpublickey\fR(4)