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 re‐
17       quire more sophisticated measures should implement the user-based mech‐
18       anism or use the hooks in the protocol for passing other authentication
19       data to the server.
20

OPTIONS

22       Xhost accepts the following command line options described below.   For
23       security,  the  options that affect 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 complete name (See NAMES for more details).
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 complete  name
35               (See  NAMES  for  more  details).  Existing connections are not
36               broken, but new connection attempts will be denied.  Note  that
37               the  current machine is allowed to be removed; however, further
38               connections (including attempts to add it  back)  will  not  be
39               permitted.   Resetting the server (thereby breaking all connec‐
40               tions) is the only way to 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  as‐
76       sumed  to  be Internet addresses. If compiled to support IPv6, then all
77       IPv4 and IPv6 addresses returned by getaddrinfo(3) are added to the ac‐
78       cess list in the appropriate inet or inet6 family.
79
80       The  local family specifies all the local connections at once. However,
81       the server interpreted address "si:localuser:username" can be  used  to
82       specify a single local user. (See the Xsecurity(7) manual page for more
83       details.)
84
85       Server interpreted addresses consist of a case-sensitive type tag and a
86       string  representing a given value, separated by a colon.  For example,
87       "si:hostname:almas" is a server interpreted address of  type  hostname,
88       with a value of almas.   For more information on the available forms of
89       server interpreted addresses, see the Xsecurity(7) manual page.
90
91       The initial access control list for display number n may be set by  the
92       file  /etc/Xn.hosts,  where n is the display number of the server.  See
93       Xserver(1) for details.
94

DIAGNOSTICS

96       For each name added to the access control list,  a  line  of  the  form
97       "name  being  added  to access control list" is printed.  For each name
98       removed from the access control list, a line of the  form  "name  being
99       removed from access control list" is printed.
100

SEE ALSO

102       X(7), Xsecurity(7), Xserver(1), xdm(1), xauth(1), getaddrinfo(3)
103

ENVIRONMENT

105       DISPLAY to get the default host and display to use.
106

BUGS

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

AUTHORS

119       Bob Scheifler, MIT Laboratory for Computer Science,
120       Jim Gettys, MIT Project Athena (DEC).
121
122
123
124X Version 11                      xhost 1.0.9                         XHOST(1)
Impressum