1XHOST(1)                    General Commands Manual                   XHOST(1)
2
3
4

NAME

6       xhost - server access control program for X
7

SYNOPSIS

9       xhost [[+-]name ...]
10

DESCRIPTION

12       The xhost program is used to add and delete host names or user names to
13       the list allowed to make connections to the X server.  In the  case  of
14       hosts,  this  provides  a rudimentary form of privacy control and secu‐
15       rity.  It is only sufficient for a workstation (single  user)  environ‐
16       ment,  although  it  does  limit  the worst abuses.  Environments which
17       require more sophisticated measures  should  implement  the  user-based
18       mechanism  or use the hooks in the protocol for passing other authenti‐
19       cation data to the server.
20

OPTIONS

22       Xhost accepts the following command line options described below.   For
23       security,  the  options that effect access control may only be run from
24       the "controlling host".  For workstations, this is the same machine  as
25       the server.  For X terminals, it is the login host.
26
27       -help   Prints a usage message.
28
29       [+]name The given name (the plus sign is optional) is added to the list
30               allowed to connect to the X server.  The name  can  be  a  host
31               name or a user name.
32
33       -name   The  given  name is removed from the list of allowed to connect
34               to the server.  The name can be a host name  or  a  user  name.
35               Existing   connections  are  not  broken,  but  new  connection
36               attempts will be denied.  Note  that  the  current  machine  is
37               allowed  to be removed; however, further connections (including
38               attempts to add it back) will not be permitted.  Resetting  the
39               server  (thereby  breaking  all connections) is the only way to
40               allow local connections again.
41
42       +       Access is granted to everyone, even if they aren't on the  list
43               (i.e., access control is turned off).
44
45       -       Access  is  restricted  to only those on the list (i.e., access
46               control is turned on).
47
48       nothing If no command line arguments are given,  a  message  indicating
49               whether  or not access control is currently enabled is printed,
50               followed by the list of those allowed to connect.  This is  the
51               only  option that may be used from machines other than the con‐
52               trolling host.
53

NAMES

55       A complete name has the syntax ``family:name'' where the  families  are
56       as follows:
57
58       inet      Internet host (IPv4)
59       inet6     Internet host (IPv6)
60       dnet      DECnet host
61       nis       Secure RPC network name
62       krb       Kerberos V5 principal
63       local     contains only one name, the empty string
64       si        Server Interpreted
65
66       The family is case insensitive.  The format of the name varies with the
67       family.
68
69       When Secure RPC is being used, the network independent  netname  (e.g.,
70       "nis:unix.uid@domainname")  can  be  specified,  or a local user can be
71       specified  with  just  the  username  and  a  trailing  at-sign  (e.g.,
72       "nis:pat@").
73
74       For backward compatibility with pre-R6 xhost, names that contain an at-
75       sign (@) are assumed to be in  the  nis  family.   Otherwise  they  are
76       assumed to be Internet addresses. If compiled to support IPv6, then all
77       IPv4 and IPv6 addresses returned by getaddrinfo(3)  are  added  to  the
78       access list in the appropriate inet or inet6 family.
79
80       Server interpreted addresses consist of a case-sensitive type tag and a
81       string representing a given value, separated by a colon.  For  example,
82       "si:hostname:almas"  is  a server interpreted address of type hostname,
83       with a value of almas.
84

DIAGNOSTICS

86       For each name added to the access control list,  a  line  of  the  form
87       "name  being  added  to access control list" is printed.  For each name
88       removed from the access control list, a line of the  form  "name  being
89       removed from access control list" is printed.
90

FILES

92       /etc/X*.hosts
93

SEE ALSO

95       X(7), Xsecurity(7), Xserver(1), xdm(1), xauth(1), getaddrinfo(3)
96

ENVIRONMENT

98       DISPLAY to get the default host and display to use.
99

BUGS

101       You  can't  specify a display on the command line because -display is a
102       valid command line argument (indicating that you  want  to  remove  the
103       machine named ``display'' from the access list).
104
105       The  X  server stores network addresses, not host names, unless you use
106       the server-interpreted hostname type address.  If somehow you change  a
107       host's  network  address while the server is still running, and you are
108       using a network-address based form of  authentication,  xhost  must  be
109       used to add the new address and/or remove the old address.
110

AUTHORS

112       Bob Scheifler, MIT Laboratory for Computer Science,
113       Jim Gettys, MIT Project Athena (DEC).
114
115
116
117X Version 11                      xhost 1.0.1                         XHOST(1)
Impressum