[BACK]Return to getent.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / getent

Annotation of src/usr.bin/getent/getent.1, Revision 1.5

1.5     ! jmc         1: .\"    $OpenBSD: getent.1,v 1.4 2005/11/11 10:59:22 jmc Exp $
1.1       otto        2: .\"    $NetBSD: getent.1,v 1.13 2005/09/11 23:16:15 wiz Exp $
                      3: .\"
                      4: .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
                      5: .\" All rights reserved.
                      6: .\"
                      7: .\" This code is derived from software contributed to The NetBSD Foundation
                      8: .\" by Luke Mewburn.
                      9: .\"
                     10: .\" Redistribution and use in source and binary forms, with or without
                     11: .\" modification, are permitted provided that the following conditions
                     12: .\" are met:
                     13: .\" 1. Redistributions of source code must retain the above copyright
                     14: .\"    notice, this list of conditions and the following disclaimer.
                     15: .\" 2. Redistributions in binary form must reproduce the above copyright
                     16: .\"    notice, this list of conditions and the following disclaimer in the
                     17: .\"    documentation and/or other materials provided with the distribution.
                     18: .\" 3. All advertising materials mentioning features or use of this software
                     19: .\"    must display the following acknowledgement:
                     20: .\"    This product includes software developed by the NetBSD
                     21: .\"    Foundation, Inc. and its contributors.
                     22: .\" 4. Neither the name of The NetBSD Foundation nor the names of its
                     23: .\"    contributors may be used to endorse or promote products derived
                     24: .\"    from this software without specific prior written permission.
                     25: .\"
                     26: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
                     27: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     28: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
                     29: .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
                     30: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                     31: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     32: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     33: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     34: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     35: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     36: .\" POSSIBILITY OF SUCH DAMAGE.
                     37: .\"
1.5     ! jmc        38: .Dd $Mdocdate$
1.1       otto       39: .Dt GETENT 1
                     40: .Os
                     41: .Sh NAME
                     42: .Nm getent
                     43: .Nd get entries from administrative database
                     44: .Sh SYNOPSIS
                     45: .Nm
                     46: .Ar database
                     47: .Op Ar key ...
                     48: .Sh DESCRIPTION
                     49: The
                     50: .Nm
                     51: program retrieves and displays entries from the administrative
                     52: database specified by
1.4       jmc        53: .Ar database .
                     54: The order in which entries are looked up
                     55: is defined by the specific database
                     56: (for example, the lookup order for the
                     57: .Dq hosts
                     58: database is determined by
                     59: .Xr resolv.conf 5 ) .
1.1       otto       60: The display format for a given
                     61: .Ar database
                     62: is as per the
                     63: .Dq traditional
                     64: file format for that database.
                     65: .Pp
                     66: .Ar database
                     67: may be one of:
1.4       jmc        68: .Pp
1.1       otto       69: .Bl -column "netgroup" -offset indent -compact
                     70: .Sy Database Ta Sy Display format
                     71: .It ethers Ta address name
                     72: .It group Ta group:passwd:gid:[member[,member]...]
                     73: .It hosts Ta address name [alias ...]
                     74: .It networks Ta name network [alias ...]
                     75: .It passwd Ta user:passwd:uid:gid:gecos:home_dir:shell
                     76: .It protocols Ta name protocol [alias ...]
                     77: .It rpc Ta name number [alias ...]
                     78: .It services Ta name port/protocol [alias ...]
                     79: .It shells Ta /path/to/shell
                     80: .El
                     81: .Pp
                     82: If one or more
                     83: .Ar key
                     84: arguments are provided, they will be looked up in
                     85: .Ar database
                     86: using the appropriate function.
                     87: For example,
                     88: .Sy passwd
                     89: supports a numeric UID or user name;
                     90: .Sy hosts
                     91: supports an IPv4 address, IPv6 address, or host name;
                     92: and
                     93: .Sy services
                     94: supports a service name, service name/protocol name, numeric port, or
                     95: numeric port/protocol name.
                     96: .Pp
                     97: If no
                     98: .Ar key
                     99: is provided and
                    100: .Ar database
                    101: supports enumeration, all entries for
                    102: .Ar database
                    103: will be retrieved using the appropriate enumeration function and printed.
                    104: .Sh DIAGNOSTICS
                    105: .Nm
                    106: exits 0 on success,
                    107: 1 if there was an error in the command syntax,
                    108: 2 if one of the specified key names was not found in
                    109: .Ar database ,
                    110: or 3 if there is no support for enumeration on
                    111: .Ar database .
                    112: .Sh SEE ALSO
                    113: .Xr ethers 5 ,
                    114: .Xr group 5 ,
                    115: .Xr hosts 5 ,
                    116: .Xr networks 5 ,
                    117: .Xr passwd 5 ,
                    118: .Xr protocols 5 ,
                    119: .Xr rpc 5 ,
                    120: .Xr services 5 ,
                    121: .Xr shells 5
                    122: .Sh HISTORY
                    123: A
                    124: .Nm
1.4       jmc       125: command first appeared in
1.3       otto      126: .Ox 3.9 .
1.1       otto      127: It was based on the command of the same name in
                    128: .Tn Solaris
                    129: and
                    130: .Tn Linux .