NAME

xauth - X authority file utility

SYNOPSIS

xauth [ --ff _a_u_t_h_f_i_l_e ] [ --vvqqiibbnn ] [ _c_o_m_m_a_n_d _a_r_g _._._. ]

DESCRIPTION

The _x_a_u_t_h program is used to edit and display the authorization information used in connecting to the X server. This program is usually used to extract authorization records from one machine and merge them in on another (as is the case when using remote logins or granting access to other users). Commands (described below) may be entered interactively, on the _x_a_u_t_h command line, or in scripts. Note that this program does nnoott contact the X server except when the generate command is used. Normally _x_a_u_t_h is not used to create the authority file entry in the first place; _x_d_m does that.

OPTIONS

The following options may be used with _x_a_u_t_h. They may be given individually (e.g., _-_q _-_i) or may combined (e.g., _-_q_i).
-f _a_u_t_h_f_i_l_e
This option specifies the name of the authority file to use. By default, _x_a_u_t_h will use the file specified by the XAUTHORITY environment variable or _._X_a_u_t_h_o_r_i_t_y in the user's home directory.
-q
This option indicates that _x_a_u_t_h should operate quietly and not print unsolicited status messages. This is the default if an _x_a_u_t_h command is given on the command line or if the standard output is not directed to a terminal.
-v
This option indicates that _x_a_u_t_h should operate verbosely and print status messages indicating the results of various operations (e.g., how many records have been read in or written out). This is the default if _x_a_u_t_h is reading commands from its standard input and its standard output is directed to a terminal.
-i
This option indicates that _x_a_u_t_h should ignore any authority file locks. Normally, _x_a_u_t_h will refuse to read or edit any authority files that have been locked by other programs (usually _x_d_m or another _x_a_u_t_h).
-b
This option indicates that _x_a_u_t_h should attempt to break any authority file locks before proceeding. Use this option only to clean up stale locks.
-n
This option indicates that _x_a_u_t_h should not attempt to resolve any hostnames, but should simply always print the host address as stored in the authority file.

COMMANDS

The following commands may be used to manipulate authority files:
add _d_i_s_p_l_a_y_n_a_m_e _p_r_o_t_o_c_o_l_n_a_m_e _h_e_x_k_e_y_<_/_b_> _<_d_d_> _A_n _a_u_t_h_o_r_i_z_a_t_i_o_n _e_n_t_r_y _f_o_r _t_h_e _i_n_d_i_c_a_t_e_d _d_i_s_p_l_a_y _u_s_i_n_g _t_h_e _g_i_v_e_n _p_r_o_t_o_c_o_l _a_n_d _k_e_y _d_a_t_a _i_s _a_d_d_e_d _t_o _t_h_e _a_u_t_h_o_r_i_z_a_t_i_o_n _f_i_l_e_. _T_h_e _d_a_t_a _i_s _s_p_e_c_i_f_i_e_d _a_s _a_n _e_v_e_n_-_l_e_n_g_t_h_e_d _s_t_r_i_n_g _o_f _h_e_x_a_d_e_c_i_m_a_l _d_i_g_i_t_s_, _e_a_c_h _p_a_i_r _r_e_p_r_e_s_e_n_t_i_n_g _o_n_e _o_c_t_e_t_. _T_h_e _f_i_r_s_t _d_i_g_i_t _o_f _e_a_c_h _p_a_i_r _g_i_v_e_s _t_h_e _m_o_s_t _s_i_g_n_i_f_i_c_a_n_t _4 _b_i_t_s _o_f _t_h_e _o_c_t_e_t_, _a_n_d _t_h_e _s_e_c_o_n_d _d_i_g_i_t _o_f _t_h_e _p_a_i_r _g_i_v_e_s _t_h_e _l_e_a_s_t _s_i_g_n_i_f_i_c_a_n_t _4 _b_i_t_s_. _F_o_r _e_x_a_m_p_l_e_, _a _3_2 _c_h_a_r_a_c_t_e_r _h_e_x_k_e_y _w_o_u_l_d _r_e_p_r_e_s_e_n_t _a _1_2_8_-_b_i_t _v_a_l_u_e_. _A _p_r_o_t_o_c_o_l _n_a_m_e _c_o_n_s_i_s_t_i_n_g _o_f _j_u_s_t _a _s_i_n_g_l_e _p_e_r_i_o_d _i_s _t_r_e_a_t_e_d _a_s _a_n _a_b_b_r_e_v_i_a_t_i_o_n _f_o_r _M_I_T_-_M_A_G_I_C_-_C_O_O_K_I_E_-_1_. _<_p_> _<_d_t_> _<_b_>_g_e_n_e_r_a_t_e _d_i_s_p_l_a_y_n_a_m_e _p_r_o_t_o_c_o_l_n_a_m_e [_t_r_u_s_t_e_d_|_u_n_t_r_u_s_t_e_d]_<_/_b_> _<_d_d_> _<_b_>[_t_i_m_e_o_u_t _s_e_c_o_n_d_s] [_g_r_o_u_p _g_r_o_u_p_-_i_d] [ddaattaa _h_e_x_d_a_t_a]

This command is similar to add. The main difference is that instead of requiring the user to supply the key data, it connects to the server specified in _d_i_s_p_l_a_y_n_a_m_e and uses the SECURITY extension in order to get the key data to store in the authorization file. If the server cannot be contacted or if it does not support the SECURITY extension, the command fails. Otherwise, an authorization entry for the indicated display using the given protocol is added to the authorization file. A protocol name consisting of just a single period is treated as an abbreviation for _M_I_T_-_M_A_G_I_C_-_C_O_O_K_I_E_-_1.

If the ttrruusstteedd option is used, clients that connect using this authorization will have full run of the display, as usual. If uunnttrruusstteedd is used, clients that connect using this authorization will be considered untrusted and prevented from stealing or tampering with data belonging to trusted clients. See the SECURITY extension specification for full details on the restrictions imposed on untrusted clients. The default is uunnttrruusstteedd.

The ttiimmeeoouutt option specifies how long in seconds this authorization will be valid. If the authorization remains unused (no clients are connected with it) for longer than this time period, the server purges the authorization, and future attempts to connect using it will fail. Note that the purging done by the server does nnoott delete the authorization entry from the authorization file. The default timeout is 60 seconds.

The ggrroouupp option specifies the application group that clients connecting with this authorization should belong to. See the application group extension specification for more details. The default is to not belong to an application group.

The ddaattaa option specifies data that the server should use to generate the authorization. Note that this is nnoott the same data that gets written to the authorization file. The interpretation of this data depends on the authorization protocol. The _h_e_x_d_a_t_a is in the same format as the _h_e_x_k_e_y described in the add command. The default is to send no data.

[n]extract _f_i_l_e_n_a_m_e _d_i_s_p_l_a_y_n_a_m_e_._._._<_/_b_> _<_d_d_> _A_u_t_h_o_r_i_z_a_t_i_o_n _e_n_t_r_i_e_s _f_o_r _e_a_c_h _o_f _t_h_e _s_p_e_c_i_f_i_e_d _d_i_s_p_l_a_y_s _a_r_e _w_r_i_t_t_e_n _t_o _t_h_e _i_n_d_i_c_a_t_e_d _f_i_l_e_. _I_f _t_h_e _n_e_x_t_r_a_c_t _c_o_m_m_a_n_d _i_s _u_s_e_d_, _t_h_e _e_n_t_r_i_e_s _a_r_e _w_r_i_t_t_e_n _i_n _a _n_u_m_e_r_i_c _f_o_r_m_a_t _s_u_i_t_a_b_l_e _f_o_r _n_o_n_-_b_i_n_a_r_y _t_r_a_n_s_m_i_s_s_i_o_n _(_s_u_c_h _a_s _s_e_c_u_r_e _e_l_e_c_t_r_o_n_i_c _m_a_i_l_)_. _T_h_e _e_x_t_r_a_c_t_e_d _e_n_t_r_i_e_s _c_a_n _b_e _r_e_a_d _b_a_c_k _i_n _u_s_i_n_g _t_h_e _m_e_r_g_e _a_n_d _n_m_e_r_g_e _c_o_m_m_a_n_d_s_. _I_f _t_h_e _f_i_l_e_n_a_m_e _c_o_n_s_i_s_t_s _o_f _j_u_s_t _a _s_i_n_g_l_e _d_a_s_h_, _t_h_e _e_n_t_r_i_e_s _w_i_l_l _b_e _w_r_i_t_t_e_n _t_o _t_h_e _s_t_a_n_d_a_r_d _o_u_t_p_u_t_. _<_d_t_> _<_b_>_[_n_]_l_i_s_t [_d_i_s_p_l_a_y_n_a_m_e...]
Authorization entries for each of the specified displays (or all if no displays are named) are printed on the standard output. If the _n_l_i_s_t command is used, entries will be shown in the numeric format used by the _n_e_x_t_r_a_c_t command; otherwise, they are shown in a textual format. Key data is always displayed in the hexadecimal format given in the description of the _a_d_d command.
[n]merge [_f_i_l_e_n_a_m_e...]
Authorization entries are read from the specified files and are merged into the authorization database, superceding any matching existing entries. If the _n_m_e_r_g_e command is used, the numeric format given in the description of the _e_x_t_r_a_c_t command is used. If a filename consists of just a single dash, the standard input will be read if it hasn't been read before.
remove _d_i_s_p_l_a_y_n_a_m_e...
Authorization entries matching the specified displays are removed from the authority file.
source _f_i_l_e_n_a_m_e_<_/_b_> _<_d_d_> _T_h_e _s_p_e_c_i_f_i_e_d _f_i_l_e _i_s _t_r_e_a_t_e_d _a_s _a _s_c_r_i_p_t _c_o_n_t_a_i_n_i_n_g _x_a_u_t_h _c_o_m_m_a_n_d_s _t_o _e_x_e_c_u_t_e_. _B_l_a_n_k _l_i_n_e_s _a_n_d _l_i_n_e_s _b_e_g_i_n_n_i_n_g _w_i_t_h _a _s_h_a_r_p _s_i_g_n _(_#_) _a_r_e _i_g_n_o_r_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