ttauth.man 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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.0a" "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. .TP 8
  91. .B "[n]extract \fIfilename <protoname=$> <protodata=$> <netid=$> <authname=$>\fP"
  92. Authorization entries which match the specified fields are written to the
  93. indicated file. If the \fInextract\fP command is used, the entries are written
  94. in a numeric format suitable for non-binary transmission (such as secure
  95. electronic mail). The extracted entries can be read back in using the
  96. \fImerge\fP and \fInmerge\fP commands. If the filename consists of
  97. just a single dash, the entries will be written to the standard output.
  98. .TP 8
  99. .B "[n]list \fR\fI<protoname=$> <protodata=$> <netid=$> <authname=$>\fP"
  100. Authorization entries which match the specified fields (or all if nothing
  101. is specified) are printed on the standard output. If the \fInlist\fP
  102. command is used, entries will be shown in the numeric format used by
  103. the \fInextract\fP command; otherwise, they are shown in a textual format.
  104. Key data is always displayed in the hexadecimal format given in the
  105. description of the \fIadd\fP command.
  106. .TP 8
  107. .B "[n]merge \fR[\fIfilename1 <filename2> <filename3>\fP...]"
  108. Authorization entries are read from the specified files and are merged into
  109. the authorization database, superceding any matching existing entries. If
  110. the \fInmerge\fP command is used, the numeric format given in the description
  111. of the \fIextract\fP command is used. If a filename consists of just a single
  112. dash, the standard input will be read if it hasn't been read before.
  113. .TP 8
  114. .B "remove \fI<protoname=$> <protodata=$> <netid=$> <authname=$>\fR"
  115. Authorization entries which match the specified fields are removed from the
  116. authority file.
  117. .TP 8
  118. .B "source \fIfilename"
  119. The specified file is treated as a script containing \fIttauth\fP commands
  120. to execute. Blank lines and lines beginning with a sharp sign (#) are
  121. ignored. A single dash may be used to indicate the standard input, if it
  122. hasn't already been read.
  123. .TP 8
  124. .B "info"
  125. Information describing the authorization file, whether or not any changes
  126. have been made, and from where \fIttauth\fP commands are being read
  127. is printed on the standard output.
  128. .TP 8
  129. .B "exit"
  130. If any modifications have been made, the authority file is written out (if
  131. allowed), and the program exits. An end of file is treated as an implicit
  132. \fIexit\fP command.
  133. .TP 8
  134. .B "quit"
  135. The program exits, ignoring any modifications. This may also be accomplished
  136. by pressing the interrupt character.
  137. .TP 8
  138. .B "help [\fIstring\fP]"
  139. A description of all commands that begin with the given string (or all
  140. commands if no string is given) is printed on the standard output.
  141. .TP 8
  142. .B "?"
  143. A short list of the valid commands is printed on the standard output.
  144. .SH "TTSESSION IDENTIFIERS"
  145. The ToolTalk session identifiers (\fInetid\fP) in the authority file and
  146. used by the \fIadd\fP, \fI[n]extract\fP, \fI[n]list\fP, and \fIremove\fP
  147. commands are derived from the TT_SESSION identifier constructed by
  148. ttsession at startup. Ttsession rendezvous with clients by writing the
  149. TT_SESSION identifier as a property on the root window or as an environment
  150. variable in the client's environment (see ttsession -c). In addition,
  151. ttsession creates an entry in the user's authority file. The authority
  152. file entry has a \fInetid\fP component which is derived from the TT_SESSION
  153. identifier.
  154. .PP
  155. The TT_SESSION identifier is composed of the following elements:
  156. .sp
  157. .nf
  158. e.g.: TT_SESSION(STRING) = "01 1433 1342177279 1 1 2002 130.105.9.22 4"
  159. <Dummy Number> = 01
  160. <ttsession Process Id> = 1433
  161. <ttsession Program Number> = 1342177279
  162. <DummyNumber> = 1
  163. <ttsession Authorization Level> = 1
  164. <ttsession UID> = 2002
  165. <Host IP Address> = 130.105.9.22
  166. <RPC Version Number> = 4
  167. .fi
  168. .PP
  169. The ToolTalk session identifiers (\fInetid\fP) in the authority file are
  170. composed of the <\fIttsession Program Number\fP>,
  171. <\fIttsession Authorization Level\fP>,
  172. <\fIHost IP Address\fP>, and
  173. <\fIRPC Version Number\fP> fields of the TT_SESSION identifier as follows:
  174. .sp
  175. .nf
  176. e.g: 1342177279/1/130.105.9.22/4
  177. .fi
  178. .SH EXAMPLE
  179. .PP
  180. The most common use for \fIttauth\fP is to extract the entry for the
  181. current ttsession, copy it to another machine, and merge it into the
  182. user's authority file on the remote machine:
  183. .sp
  184. .nf
  185. % xprop -root | grep TT_SESSION
  186. TT_SESSION(STRING) = "01 1433 1342177279 1 1 2002 130.105.9.22 4"
  187. _SUN_TT_SESSION(STRING) = "01 1433 1342177279 1 1 2002 130.105.9.22 4"
  188. % ttauth extract \- netid=1342177279/1/130.105.9.22/4 | rsh otherhost ttauth merge \-
  189. .fi
  190. .SH ENVIRONMENT
  191. This \fIttauth\fP program uses the following environment variables:
  192. .TP 8
  193. .B TTAUTHORITY
  194. to get the name of the authority file to use if the \fI\-f\fP option isn't
  195. used.
  196. .TP 8
  197. .B HOME
  198. to get the user's home directory if TTAUTHORITY isn't defined.
  199. .SH FILES
  200. .TP 8
  201. .I $HOME/.TTauthority
  202. default authority file if TTAUTHORITY isn't defined.
  203. .SH BUGS
  204. .PP
  205. Users that have unsecure networks should take care to use encrypted
  206. file transfer mechanisms to copy authorization entries between machines.
  207. Similarly, the \fIMIT-MAGIC-COOKIE-1\fP protocol is not very useful in
  208. unsecure environments. Sites that are interested in additional security
  209. may need to use encrypted authorization mechanisms such as Kerberos.
  210. .PP
  211. Spaces are currently not allowed in the protocol name. Quoting could be
  212. added for the truly perverse.
  213. .SH AUTHORS
  214. Jim Fulton, MIT X Consortium, and
  215. Mitchell Greess, Solutions Atlantic