home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume21 / uoodoo / part01 / README < prev    next >
Text File  |  1991-07-27  |  7KB  |  156 lines

  1. WHAT IT IS
  2.  
  3. uoodoo - build a directory of symbolic links so that each user's home
  4. directory can be referenced as "/u/user".
  5.  
  6. Report bugs to sls@cs.duke.edu.
  7.  
  8.  
  9. HOW IT WORKS
  10.  
  11. uoodoo (rhymes with voodoo) will create and update a directory of symbolic
  12. links which point to users' home directories.  By using a scheme where home
  13. directories are referenced indirectly, a user's home directory may be moved
  14. without requiring a user to make any changes to his code.  Instead, the
  15. symbolic link which points to a user's home directory is changed.
  16.  
  17. Normal operation of uoodoo uses /u as the directory which contains the
  18. symbolic links.  First uoodoo reads in the user information via the
  19. getpwent(3) library routine and stores the login-id and the user's home
  20. directory in an internal table.  The argument directories are then searched
  21. for entries which match the login-ids in the user table.  Based on the
  22. contents of the argument directories and the user's home directory field
  23. uoodoo determines what action should be performed.
  24.  
  25. There are three different sets of rules used to determine what action uoodoo
  26. should perform which are based on the user's home directory field in the
  27. password file.  This entry normally contains a string which "is the pathname
  28. to the directory in which the user is initially positioned upon logging in."
  29. uoodoo looks to see if this string points to a user's /u entry.  That is, it
  30. either matches "/u/login-id" (referred to as a symbolic link entry) or it
  31. doesn't (referred to as an absolute path).
  32.  
  33. If the home directory field is an absolute path (ie, does not contain a
  34. reference to the user's symbolic link entry) the following rules apply:
  35.     The symbolic link entry, "/u/login-id" will point to the absolute
  36.     path whether or not this path exists.  The number of entries named
  37.     login-id found in the argument directories is irrelevant.
  38.  
  39. If the home directory field contains a symbolic link entry (a reference to
  40. "/u/login-id") the following rules apply:
  41.     If an entry "login-id" is found in only one argument directory,
  42.     "/u/login-id" will point to this path.  If there is more than one
  43.     such entry (referred to as a conflict), there can be two different
  44.     actions.  In the first case, if there is no existing "/u/login-id"
  45.     entry, one is created which points to the first path found in the
  46.     argument directories.  In the second case, there is an existing
  47.     "/u/login-id" entry, and it is not updated.  In both instances,
  48.     however, an error message is printed as uoodoo expects there to be a
  49.     single directory encountered for each user.
  50.  
  51. Entries in /u are removed if there is no corresponding "login-id" entry in
  52. the password file.
  53.  
  54. There are no changes required to the password file to make uoodoo
  55. functional.  There is the option for a system administrator to use
  56. "/u/login-id" as the home directory in the password file.  The underlying
  57. design of uoodoo is based on this choice.  If the usual absolute path is used
  58. in the password file, then uoodoo blindly uses this path in maintaining the
  59. symbolic link entry.  If, however, the password file points to the symbolic
  60. link entry, then uoodoo relies on the contents of the argument directories
  61. to update /u entries.  There are disadvantages as well as advantages to
  62. following the latter course of action.  The advantage is that no change is
  63. required to the password file to move a home directory.  As soon as the
  64. directory is moved and uoodoo is run, the link will point to the new home
  65. directory.  This scheme, though, will not be well suited in an environment
  66. where users have directories in many of the argument directories as uoodoo
  67. needs to find a single entry for a login-id in order to unambiguously update
  68. the symbolic link entry.
  69.  
  70.  
  71. OPTIONS
  72.  
  73. -a 
  74.     Action mode.  The actions performed by uoodoo are reported to the
  75.     standard output.  Actions are creating, updating or removing a /u
  76.     entry.
  77.  
  78. -c
  79.     Check mode.  Output from uoodoo is generated but no actions are
  80.     actually performed.
  81.  
  82. -d
  83.     Debug mode.  Lots of intermediate output is generated.
  84.  
  85. -w
  86.     Warning mode.  Conflicts which are not errors are reported in
  87.     addition to multiple password file entries for a user, entries in
  88.     argument directories which do not correspond to a login-id, and
  89.     bogus entries in the /u directory which are not symbolic links.
  90.  
  91. -u "u-directory"
  92.     Use u-directory as the directory which contains the symbolic links.
  93.     If none is specified, "/u" is used.
  94.  
  95. -p "link-pathname"
  96.     When attempting to determine whether the home directory field in the
  97.     password file is a symbolic link entry or an absolute path,
  98.     recognize "link-pathname/login-id" as a symbolic link entry.  If
  99.     none is specified, "u-directory/login-id" is used.  This flag will
  100.     probably be useful only when testing.  An arbitrary "u-directory"
  101.     can thus be specified without having to change the symbolic link home
  102.     directories in the password file to "u-directory/login-id".
  103.  
  104. The actions performed can be be different depending on the order of the
  105. argument directories, especially when creating new /u entries since new
  106. entries point to the first directory encountered while reading the argument
  107. directories. 
  108.  
  109.  
  110. ERRORS
  111.  
  112. uoodoo simply performs its tasks and does not inform the user of anything it
  113. does, unless specifically asked, via the warning (-w) and action (-a)
  114. flags.  It does, however, generate output if there is an error.  A failed
  115. I/O operation (read/write/open..) and failed system calls are all errors.  
  116.  
  117. One of the important goals is to properly deal with a failed NFS server.  It
  118. would not be prudent to remove or update entries from /u because a server is
  119. down.  uoodoo will hang indefinitely if a hard mounted NFS server is
  120. unavailable.  If there is an unmounted NFS filesystem, the mount point will
  121. contain an empty directory and uoodoo will stop and report an error after
  122. looking through all of the remaining argument directories.
  123.  
  124.  
  125. INSTALLATION
  126.  
  127. The only changes necessary should be in the Makefile.  Choose either the
  128. "BSD_LIKE" or "SYSV_LIKE" variable in the Makefile to include the proper
  129. header files for the directory libraries.  Also add the proper library to
  130. link if your system requires a library to access a YP/NIS version of
  131. getpwent(3).  Then make the binaries and install them.  Create /u before
  132. running uoodoo.
  133.  
  134. It is convenient to run uoodoo out of cron daily to keep the /u directory up
  135. to date.  This is preferable than relying on a human to run uoodoo properly
  136. by hand as accounts are added or deleted.  Users may be inconvenienced,
  137. however, during the time that the /u directory is out of date.
  138.  
  139. Inform users that they should now use /u/login-id to reference their home
  140. directory to avoid aggravation should their home directory be moved.
  141.  
  142.  
  143. COPYRIGHT
  144.  
  145. Copyright (c) 1991 by Shelley L. Shostak.
  146. All rights reserved.
  147.  
  148. Redistribution and use in source and binary forms are permitted provided
  149. that the above copyright notice and this paragraph are duplicated in all
  150. such forms and that any documentation, advertising materials, and other
  151. materials related to such distribution and use acknowledge that the software
  152. was developed by Shelley L. Shostak.
  153.  
  154. Any use of this software is at the user's own risk.
  155.  
  156.