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 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 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.   For more information on the available forms of
84       server interpreted addresses, see the Xsecurity(7) manual page.
85
86       The  initial access control list for display number n may be set by the
87       file /etc/Xn.hosts, where n is the display number of the  server.   See
88       Xserver(1) for details.
89

DIAGNOSTICS

91       For  each  name  added  to  the access control list, a line of the form
92       "name being added to access control list" is printed.   For  each  name
93       removed  from  the  access control list, a line of the form "name being
94       removed from access control list" is printed.
95

SEE ALSO

97       X(7), Xsecurity(7), Xserver(1), xdm(1), xauth(1), getaddrinfo(3)
98

ENVIRONMENT

100       DISPLAY to get the default host and display to use.
101

BUGS

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

AUTHORS

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