Change CDE version info for 2.3.1 release
[oweals/cde.git] / cde / lib / tt / bin / ttauth / ttauth.man
1 .\" $TOG: ttauth.man /main/3 1999/10/12 13:33:52 mgreess $
2 .\" Copyright 1993, 1998  The Open Group
3 .\" 
4 .\" All Rights Reserved.
5 .\" 
6 .\" The above copyright notice and this permission notice shall be included
7 .\" in all copies or substantial portions of the Software.
8 .\" 
9 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12 .\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
13 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
14 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
15 .\" OTHER DEALINGS IN THE SOFTWARE.
16 .\" 
17 .\" Except as contained in this notice, the name of The Open Group shall
18 .\" not be used in advertising or otherwise to promote the sale, use or
19 .\" other dealings in this Software without prior written authorization
20 .\" from The Open Group.
21 .TH TTAUTH 1 "Release 2.3.1" "CDE"
22 .SH NAME
23 ttauth \- ToolTalk authority file utility
24 .SH SYNOPSIS
25 .B ttauth
26 [ \fB\-f\fP \fIauthfile\fP ] [ \fB\-vqib\fP ] [ \fIcommand arg ...\fP ]
27 .SH DESCRIPTION
28 .PP
29 The \fIttauth\fP program is used to edit and display the authorization 
30 information used in connecting to ToolTalk.  This program is usually
31 used to extract authorization records from one machine and merge them in on 
32 another (as is the case when using remote logins or granting access to
33 other users).  Commands (described below) may be entered interactively,
34 on the \fIttauth\fP command line, or in scripts.  Note that this program
35 does \fBnot\fP contact the ToolTalk server, \fIttsession\fP.
36 Normally \fIttauth\fP is not used to create the authority file entry in
37 the first place; \fIttsession\fP does that.
38 .SH OPTIONS
39 The following options may be used with \fIttauth\fP.  They may be given 
40 individually (e.g., \fI\-q \-i\|\fP) or may combined (e.g., \fI\-qi\|\fP).
41 .TP 8
42 .B "\-f \fIauthfile\fP"
43 This option specifies the name of the authority file to use.  By default,
44 \fIttauth\fP will use the file specified by the TTAUTHORITY environment variable
45 or \fI\.TTauthority\fP in the user's home directory.
46 .TP 8
47 .B \-q
48 This option indicates that \fIttauth\fP should operate quietly and not print
49 unsolicited status messages.  This is the default if an \fIttauth\fP command is
50 is given on the command line or if the standard output is not directed to a
51 terminal.
52 .TP 8
53 .B \-v
54 This option indicates that \fIttauth\fP should operate verbosely and print
55 status messages indicating the results of various operations (e.g., how many
56 records have been read in or written out).  This is the default if \fIttauth\fP
57 is reading commands from its standard input and its standard output is
58 directed to a terminal.
59 .TP 8
60 .B \-i
61 This option indicates that \fIttauth\fP should ignore any authority file
62 locks.  Normally, \fIttauth\fP will refuse to read or edit any authority files
63 that have been locked by other programs (usually \fIttsession\fP or another 
64 \fIttauth\fP).
65 .TP 8
66 .B \-b
67 This option indicates that \fIttauth\fP should attempt to break any authority
68 file locks before proceeding.  Use this option only to clean up stale locks.
69 .SH COMMANDS
70 The following commands may be used to manipulate authority files:
71 .TP 8
72 .B "add \fIprotoname protodata netid authname authdata"
73 An authorization entry for the indicated ToolTalk session using the given
74 protocol name (\fIprotoname\fP), protocol data (\fIprotodata\fP), ToolTalk
75 session id (\fInetid\fP), authentication name (\fIauthname\fP), and
76 authentication data (\fIauthdata\fP) is added to the authorization file.
77 The protocol name should always be the string \fITT\fP.  The protocol data
78 should always be the empty string \fI""\fP.  The ToolTalk session id is
79 formatted string consisting of the ttsession program number, the ttsession
80 authorization level, the IP address of the host running ttsession, and the
81 RPC version number of the ttsession.  See the section
82 \fITTSESSION IDENTIFIERS\fP below for information on constructing ToolTalk
83 session id's for the authority file. 
84 The authentication name should always be the string
85 \fIMIT-MAGIC-COOKIE-1\fP.  The authentication data is specified as
86 an even-lengthed string of hexadecimal digits, each pair representing 
87 one octet.  The first digit of each pair gives the most significant 4 bits
88 of the octet, and the second digit of the pair gives the least significant 4
89 bits.  For example, a 32 character hexkey would represent a 128-bit value.
90
91 .TP 8
92 .B "[n]extract \fIfilename <protoname=$> <protodata=$> <netid=$> <authname=$>\fP"
93 Authorization entries which match the specified fields are written to the 
94 indicated file.  If the \fInextract\fP command is used, the entries are written
95 in a numeric format suitable for non-binary transmission (such as secure
96 electronic mail).  The extracted entries can be read back in using the 
97 \fImerge\fP and \fInmerge\fP commands.  If the filename consists of 
98 just a single dash, the entries will be written to the standard output.
99 .TP 8
100 .B "[n]list \fR\fI<protoname=$> <protodata=$> <netid=$> <authname=$>\fP"
101 Authorization entries which match the specified fields (or all if nothing
102 is specified) are printed on the standard output.  If the \fInlist\fP
103 command is used, entries will be shown in the numeric format used by 
104 the \fInextract\fP command; otherwise, they are shown in a textual format.
105 Key data is always displayed in the hexadecimal format given in the
106 description of the \fIadd\fP command.
107 .TP 8
108 .B "[n]merge \fR[\fIfilename1 <filename2> <filename3>\fP...]"
109 Authorization entries are read from the specified files and are merged into
110 the authorization database, superceding any matching existing entries. If
111 the \fInmerge\fP command is used, the numeric format given in the description
112 of the \fIextract\fP command is used.  If a filename consists of just a single
113 dash, the standard input will be read if it hasn't been read before.
114 .TP 8
115 .B "remove \fI<protoname=$> <protodata=$> <netid=$> <authname=$>\fR"
116 Authorization entries which match the specified fields are removed from the
117 authority file.
118 .TP 8
119 .B "source \fIfilename"
120 The specified file is treated as a script containing \fIttauth\fP commands
121 to execute.  Blank lines and lines beginning with a sharp sign (#) are 
122 ignored.  A single dash may be used to indicate the standard input, if it
123 hasn't already been read.
124 .TP 8
125 .B "info"
126 Information describing the authorization file, whether or not any changes
127 have been made, and from where \fIttauth\fP commands are being read
128 is printed on the standard output. 
129 .TP 8
130 .B "exit"
131 If any modifications have been made, the authority file is written out (if
132 allowed), and the program exits.  An end of file is treated as an implicit
133 \fIexit\fP command.
134 .TP 8
135 .B "quit"
136 The program exits, ignoring any modifications.  This may also be accomplished
137 by pressing the interrupt character.
138 .TP 8
139 .B "help [\fIstring\fP]"
140 A description of all commands that begin with the given string (or all
141 commands if no string is given) is printed on the standard output.
142 .TP 8
143 .B "?"
144 A short list of the valid commands is printed on the standard output.
145 .SH "TTSESSION IDENTIFIERS"
146 The ToolTalk session identifiers (\fInetid\fP) in the authority file and
147 used by the \fIadd\fP, \fI[n]extract\fP, \fI[n]list\fP, and \fIremove\fP
148 commands are derived from the TT_SESSION identifier constructed by
149 ttsession at startup.  Ttsession rendezvous with clients by writing the
150 TT_SESSION identifier as a property on the root window or as an environment
151 variable in the client's environment (see ttsession -c).  In addition, 
152 ttsession creates an entry in the user's authority file.  The authority
153 file entry has a \fInetid\fP component which is derived from the TT_SESSION
154 identifier.
155 .PP
156 The TT_SESSION identifier is composed of the following elements:
157 .sp
158 .nf
159     e.g.:  TT_SESSION(STRING) = "01 1433 1342177279 1 1 2002 130.105.9.22 4"
160            <Dummy Number>                    = 01
161            <ttsession Process Id>            = 1433
162            <ttsession Program Number>        = 1342177279
163            <DummyNumber>                     = 1
164            <ttsession Authorization Level>   = 1
165            <ttsession UID>                   = 2002
166            <Host IP Address>                 = 130.105.9.22
167            <RPC Version Number>              = 4
168 .fi
169 .PP
170 The ToolTalk session identifiers (\fInetid\fP) in the authority file are
171 composed of the <\fIttsession Program Number\fP>,
172 <\fIttsession Authorization Level\fP>,
173 <\fIHost IP Address\fP>, and
174 <\fIRPC Version Number\fP> fields of the TT_SESSION identifier as follows:
175 .sp
176 .nf
177     e.g:  1342177279/1/130.105.9.22/4
178 .fi
179 .SH EXAMPLE
180 .PP
181 The most common use for \fIttauth\fP is to extract the entry for the 
182 current ttsession, copy it to another machine, and merge it into the 
183 user's authority file on the remote machine:
184 .sp
185 .nf
186     %  xprop -root | grep TT_SESSION
187     TT_SESSION(STRING) = "01 1433 1342177279 1 1 2002 130.105.9.22 4"
188     _SUN_TT_SESSION(STRING) = "01 1433 1342177279 1 1 2002 130.105.9.22 4"
189     %  ttauth extract \- netid=1342177279/1/130.105.9.22/4 | rsh otherhost ttauth merge \-
190 .fi
191 .SH ENVIRONMENT
192 This \fIttauth\fP program uses the following environment variables:
193 .TP 8
194 .B TTAUTHORITY
195 to get the name of the authority file to use if the \fI\-f\fP option isn't
196 used.
197 .TP 8
198 .B HOME
199 to get the user's home directory if TTAUTHORITY isn't defined.
200 .SH FILES
201 .TP 8
202 .I $HOME/.TTauthority
203 default authority file if TTAUTHORITY isn't defined.
204 .SH BUGS
205 .PP
206 Users that have unsecure networks should take care to use encrypted 
207 file transfer mechanisms to copy authorization entries between machines.  
208 Similarly, the \fIMIT-MAGIC-COOKIE-1\fP protocol is not very useful in
209 unsecure environments.  Sites that are interested in additional security
210 may need to use encrypted authorization mechanisms such as Kerberos.
211 .PP
212 Spaces are currently not allowed in the protocol name.  Quoting could be
213 added for the truly perverse.
214 .SH AUTHORS
215 Jim Fulton, MIT X Consortium, and
216 Mitchell Greess, Solutions Atlantic