[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.8

1.8     ! jmc         1: .\"    $OpenBSD: getent.1,v 1.7 2010/01/03 14:31:01 schwarze 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: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
                     20: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
                     21: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
                     22: .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
                     23: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
                     24: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
                     25: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
                     26: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
                     27: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
                     28: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     29: .\" POSSIBILITY OF SUCH DAMAGE.
                     30: .\"
1.8     ! jmc        31: .Dd $Mdocdate: January 3 2010 $
1.1       otto       32: .Dt GETENT 1
                     33: .Os
                     34: .Sh NAME
                     35: .Nm getent
                     36: .Nd get entries from administrative database
                     37: .Sh SYNOPSIS
                     38: .Nm
                     39: .Ar database
                     40: .Op Ar key ...
                     41: .Sh DESCRIPTION
                     42: The
                     43: .Nm
                     44: program retrieves and displays entries from the administrative
                     45: database specified by
1.4       jmc        46: .Ar database .
                     47: The order in which entries are looked up
                     48: is defined by the specific database
                     49: (for example, the lookup order for the
                     50: .Dq hosts
                     51: database is determined by
                     52: .Xr resolv.conf 5 ) .
1.1       otto       53: The display format for a given
                     54: .Ar database
                     55: is as per the
                     56: .Dq traditional
                     57: file format for that database.
                     58: .Pp
                     59: .Ar database
                     60: may be one of:
1.4       jmc        61: .Pp
1.1       otto       62: .Bl -column "netgroup" -offset indent -compact
1.7       schwarze   63: .It Sy Database Ta Sy Display format
1.1       otto       64: .It ethers Ta address name
                     65: .It group Ta group:passwd:gid:[member[,member]...]
                     66: .It hosts Ta address name [alias ...]
                     67: .It networks Ta name network [alias ...]
                     68: .It passwd Ta user:passwd:uid:gid:gecos:home_dir:shell
                     69: .It protocols Ta name protocol [alias ...]
                     70: .It rpc Ta name number [alias ...]
                     71: .It services Ta name port/protocol [alias ...]
                     72: .It shells Ta /path/to/shell
                     73: .El
                     74: .Pp
                     75: If one or more
                     76: .Ar key
                     77: arguments are provided, they will be looked up in
                     78: .Ar database
                     79: using the appropriate function.
                     80: For example,
                     81: .Sy passwd
                     82: supports a numeric UID or user name;
                     83: .Sy hosts
                     84: supports an IPv4 address, IPv6 address, or host name;
                     85: and
                     86: .Sy services
                     87: supports a service name, service name/protocol name, numeric port, or
                     88: numeric port/protocol name.
                     89: .Pp
                     90: If no
                     91: .Ar key
                     92: is provided and
                     93: .Ar database
                     94: supports enumeration, all entries for
                     95: .Ar database
                     96: will be retrieved using the appropriate enumeration function and printed.
1.8     ! jmc        97: .Sh EXIT STATUS
        !            98: The
1.1       otto       99: .Nm
1.8     ! jmc       100: utility exits with one of the following value:
        !           101: .Pp
        !           102: .Bl -tag -width Ds -offset indent -compact
        !           103: .It 0
        !           104: Success.
        !           105: .It 1
        !           106: There was an error in the command syntax.
        !           107: .It 2
        !           108: One of the specified key names was not found in
1.1       otto      109: .Ar database .
1.8     ! jmc       110: .It 3
        !           111: There is no support for enumeration on
        !           112: .Ar database .
        !           113: .El
1.1       otto      114: .Sh SEE ALSO
                    115: .Xr ethers 5 ,
                    116: .Xr group 5 ,
                    117: .Xr hosts 5 ,
                    118: .Xr networks 5 ,
                    119: .Xr passwd 5 ,
                    120: .Xr protocols 5 ,
                    121: .Xr rpc 5 ,
                    122: .Xr services 5 ,
                    123: .Xr shells 5
                    124: .Sh HISTORY
                    125: A
                    126: .Nm
1.4       jmc       127: command first appeared in
1.3       otto      128: .Ox 3.9 .
1.1       otto      129: It was based on the command of the same name in
                    130: .Tn Solaris
                    131: and
                    132: .Tn Linux .