home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume8 / mcp / part02 < prev    next >
Text File  |  1987-02-05  |  56KB  |  1,551 lines

  1. Subject:  v08i042:  Account creation/manipulation program, Part02/08
  2. Newsgroups: mod.sources
  3. Approved: mirror!rs
  4.  
  5. Submitted by: Kyle Jones <xanth!kyle>
  6. Mod.sources: Volume 8, Issue 42
  7. Archive-name: mcp/Part02
  8.  
  9. This is mcp, an account creation/manipulation program.
  10.  
  11. #! /bin/sh
  12. # This is a shell archive.  Remove anything before this line,
  13. # then unpack it by saving it in a file and typing "sh file".
  14. # If all goes well, you will see the message "End of archive 2 (of 8)."
  15. # Contents:  help/load-file.n help/range.n help/remove-alias.n
  16. #   help/remove-class.n help/remove-cryos.n help/remove-from-alias.n
  17. #   help/remove-from-class.n help/remove-from-group.n
  18. #   help/remove-from-sig.n help/remove-group.n help/remove-range.n
  19. #   help/remove-sig.n help/remove-user.n help/remove-vig.n
  20. #   help/save-and-exit.n help/save-changes.n help/shell-escape.n
  21. #   help/sig.n help/uid.n help/unbind-class.n help/unbind-group.n
  22. #   help/unbind-sig.n help/update-alias.n help/update-class.n
  23. #   help/update-group.n help/update-range.n help/update-sig.n
  24. #   help/update-user.n help/vig.n help/what-is.n man/Copyright
  25. #   man/Makefile man/accounts.n man/classes.n man/mcp.n man/ranges.n
  26. #   man/shells.n src/alias.h
  27. # Wrapped by rs@mirror on Fri Feb  6 15:55:48 1987
  28. PATH=/bin:/usr/bin:/usr/ucb; export PATH
  29. echo shar: extracting "'help/load-file.n'" '(2434 characters)'
  30. if test -f 'help/load-file.n' ; then 
  31.   echo shar: will not over-write existing file "'help/load-file.n'"
  32. else
  33. sed 's/^X//' >help/load-file.n <<'@//E*O*F help/load-file.n//'
  34. X.ce
  35. X.ul
  36. Xload-file [ file-name ... ]
  37. X.sp
  38. X.ul
  39. Xload-file
  40. Xallows a large number of user accounts to be created by loading the
  41. Xnecessary information from a file.  If
  42. X.ul
  43. Xfile-name
  44. Xarguments are provided, mcp will use these names as the names of the files
  45. Xthat it expects the user information to be in.  Otherwise mcp
  46. Xwill prompt you for the file names using Tenex-style file name
  47. Xcompletion.
  48. X.sp
  49. XThe load file must be in a particular format in order for mcp
  50. Xto be able to use its contents.  The format is given below.
  51. X.sp
  52. XThe first character of the first line should be either
  53. Xan 'n' or an 'i'.
  54. XAn 'n' signifies the
  55. X.ul
  56. X"name first format"
  57. Xwhile a 'i' indicates that the
  58. X.ul
  59. X"ID first format"
  60. Xwill be used.  These will become explained in a moment.
  61. X.sp
  62. XThe second line should contain a space separated list of the groups
  63. Xthe added users should be in.  The gid of the first group in the list
  64. Xwill serve as the base gid for all the users added from this load file
  65. Xso there must be at least one group listed.
  66. X.sp
  67. XThe third line should contain a space separated list of classes that the new
  68. Xusers should be put into.  This line must be present but it may be empty
  69. Xto indicate that the user shouldn't be placed into any classes.
  70. X.sp
  71. XThe fourth line should contain a space separated list of sigs that the new
  72. Xusers should be put into.  This line must be present but it may be empty
  73. Xto indicate that the user shouldn't be placed into any sigs.
  74. X.sp
  75. XThe fifth line should contain the full pathname of the shell that the new
  76. Xusers should use.  This line must be present but it may be left empty
  77. Xto indicate that the default shell should be used.
  78. X.sp
  79. XSuccessive lines should contain the real name and ID of users to be added.
  80. Xif using the 'n' format the real name should be first; the 'i' format
  81. Xrequires that the ID be first.  The ID and real name may be separated
  82. Xby any whitespace characters except newline.  The lines are parsed
  83. Xinto an argv-type array.  In format 'n' argv[argc-1] will be taken as
  84. Xthe ID and
  85. Xargv[0] and the rest of the args exempting the ID are taken to be parts of
  86. Xthe real name.  In format 'i', argv[0] is taken as the ID and the rest of
  87. Xthe args are used as parts of the real name.
  88. X.sp
  89. XMcp will emit vile vituperatives if you obviously have the file format wrong
  90. Xand will refuse to do the load.
  91. X.sp
  92. XRemember that these added users, just like any others, are not really added
  93. Xuntil a save-changes or a save-and-exit is done.
  94. @//E*O*F help/load-file.n//
  95. if test 2434 -ne "`wc -c <'help/load-file.n'`"; then
  96.     echo shar: error transmitting "'help/load-file.n'" '(should have been 2434 characters)'
  97. fi
  98. fi # end of overwriting check
  99. echo shar: extracting "'help/range.n'" '(828 characters)'
  100. if test -f 'help/range.n' ; then 
  101.   echo shar: will not over-write existing file "'help/range.n'"
  102. else
  103. sed 's/^X//' >help/range.n <<'@//E*O*F help/range.n//'
  104. X.in 3
  105. X.ti 0
  106. X.ul
  107. Xrange
  108. X\- is an mcp abstraction.  A
  109. X.ul
  110. Xrange
  111. Xis simply an list contiguous uids.  Each
  112. X.ul
  113. Xrange
  114. Xhas the following attributes:
  115. X.nf
  116. X.sp
  117. X.in +1
  118. X\(bu   Name
  119. X\(bu   First uid
  120. X\(bu   Last uid
  121. X\(bu   Mode (\fI"shared"\fR or \fI"exclusive"\fR)
  122. X.in -1
  123. X.sp
  124. X.fi
  125. XThe
  126. Xname corresponds to the name of an existing group.  New users that
  127. Xare created with a base gid that maps to the name of a group that has
  128. Xa corresponding
  129. X.ul
  130. Xrange
  131. Xwill have its uid chosen from that range of uids.  If there are no unused
  132. Xuids in the assigned
  133. X.ul
  134. Xrange
  135. Xthen a uid will be used from a range that has a
  136. X.ul
  137. X"shared"
  138. Xmode.  If still no free uid can be found then mcp will search for a free uid
  139. Xin the holes that no
  140. X.ul
  141. Xrange
  142. Xcovers.  If no unused uid can be found at this point, mcp will give
  143. Xup and cry out against you and your lousy planning.
  144. @//E*O*F help/range.n//
  145. if test 828 -ne "`wc -c <'help/range.n'`"; then
  146.     echo shar: error transmitting "'help/range.n'" '(should have been 828 characters)'
  147. fi
  148. fi # end of overwriting check
  149. echo shar: extracting "'help/remove-alias.n'" '(243 characters)'
  150. if test -f 'help/remove-alias.n' ; then 
  151.   echo shar: will not over-write existing file "'help/remove-alias.n'"
  152. else
  153. sed 's/^X//' >help/remove-alias.n <<'@//E*O*F help/remove-alias.n//'
  154. X.ce
  155. X.ul
  156. Xremove-alias <name>
  157. X.sp
  158. X.ul
  159. Xremove-alias
  160. Xremoves a particular alias.  Logically enough, any users that are members
  161. Xof the alias are quietly removed from the alias before the alias itself is
  162. Xremoved, as are all references to the alias.
  163. @//E*O*F help/remove-alias.n//
  164. if test 243 -ne "`wc -c <'help/remove-alias.n'`"; then
  165.     echo shar: error transmitting "'help/remove-alias.n'" '(should have been 243 characters)'
  166. fi
  167. fi # end of overwriting check
  168. echo shar: extracting "'help/remove-class.n'" '(243 characters)'
  169. if test -f 'help/remove-class.n' ; then 
  170.   echo shar: will not over-write existing file "'help/remove-class.n'"
  171. else
  172. sed 's/^X//' >help/remove-class.n <<'@//E*O*F help/remove-class.n//'
  173. X.ce
  174. X.ul
  175. Xremove-class <name>
  176. X.sp
  177. X.ul
  178. Xremove-class
  179. Xremoves a particular class.  Logically enough, any users that are members
  180. Xof the class are quietly removed from the class before the class itself is
  181. Xremoved, as are all references to the class.
  182. @//E*O*F help/remove-class.n//
  183. if test 243 -ne "`wc -c <'help/remove-class.n'`"; then
  184.     echo shar: error transmitting "'help/remove-class.n'" '(should have been 243 characters)'
  185. fi
  186. fi # end of overwriting check
  187. echo shar: extracting "'help/remove-cryos.n'" '(404 characters)'
  188. if test -f 'help/remove-cryos.n' ; then 
  189.   echo shar: will not over-write existing file "'help/remove-cryos.n'"
  190. else
  191. sed 's/^X//' >help/remove-cryos.n <<'@//E*O*F help/remove-cryos.n//'
  192. X.ce
  193. X.ul
  194. Xremove-cryos
  195. X.sp
  196. X.ul
  197. Xremove-cryos
  198. Xremoves all users that are frozen.
  199. X#ifdef DOFILES
  200. XAll the user home directories are set to be removed at the next
  201. X\fIsave-changes\fR or \fIsave-and-exit\fR.  Typically you will want to archive
  202. Xthe frozen accounts before doing a
  203. X.ul
  204. Xremove-cryos.
  205. X#endif
  206. X.sp
  207. XRemember that no actual changes are made until a \fIsave-changes\fR or
  208. X\fIsave-and-exit\fR is performed.
  209. @//E*O*F help/remove-cryos.n//
  210. if test 404 -ne "`wc -c <'help/remove-cryos.n'`"; then
  211.     echo shar: error transmitting "'help/remove-cryos.n'" '(should have been 404 characters)'
  212. fi
  213. fi # end of overwriting check
  214. echo shar: extracting "'help/remove-from-alias.n'" '(182 characters)'
  215. if test -f 'help/remove-from-alias.n' ; then 
  216.   echo shar: will not over-write existing file "'help/remove-from-alias.n'"
  217. else
  218. sed 's/^X//' >help/remove-from-alias.n <<'@//E*O*F help/remove-from-alias.n//'
  219. X.ce
  220. X.ul
  221. Xremove-from-alias <alias name>
  222. X.sp
  223. X.ul
  224. Xremove-from-alias
  225. Xallows you to remove users from a particular alias.  You will be prompted
  226. Xfor a list of user names, space separated.
  227. @//E*O*F help/remove-from-alias.n//
  228. if test 182 -ne "`wc -c <'help/remove-from-alias.n'`"; then
  229.     echo shar: error transmitting "'help/remove-from-alias.n'" '(should have been 182 characters)'
  230. fi
  231. fi # end of overwriting check
  232. echo shar: extracting "'help/remove-from-class.n'" '(302 characters)'
  233. if test -f 'help/remove-from-class.n' ; then 
  234.   echo shar: will not over-write existing file "'help/remove-from-class.n'"
  235. else
  236. sed 's/^X//' >help/remove-from-class.n <<'@//E*O*F help/remove-from-class.n//'
  237. X.ce
  238. X.ul
  239. Xremove-from-class <class name>
  240. X.sp
  241. X.ul
  242. Xremove-from-class
  243. Xallows you to remove users from a particular class.
  244. XThis does not mean that the users lose their accounts, it just means
  245. Xthat these users are no longer in the said class.   You will be prompted
  246. Xfor a list of user names, space separated.
  247. @//E*O*F help/remove-from-class.n//
  248. if test 302 -ne "`wc -c <'help/remove-from-class.n'`"; then
  249.     echo shar: error transmitting "'help/remove-from-class.n'" '(should have been 302 characters)'
  250. fi
  251. fi # end of overwriting check
  252. echo shar: extracting "'help/remove-from-group.n'" '(406 characters)'
  253. if test -f 'help/remove-from-group.n' ; then 
  254.   echo shar: will not over-write existing file "'help/remove-from-group.n'"
  255. else
  256. sed 's/^X//' >help/remove-from-group.n <<'@//E*O*F help/remove-from-group.n//'
  257. X.ce
  258. X.ul
  259. Xremove-from-group <group name>
  260. X.sp
  261. X.ul
  262. Xremove-from-group
  263. Xallows you to remove users from a particular group.
  264. XThis applies only to users that are members of the group via the /etc/group
  265. Xaccess list, NOT users that have a base gid that maps to the gid of the
  266. XYou will be prompted for a list of user names, space separated.
  267. X.ul
  268. X<group name>.
  269. XTo change a the base gid of a user, use \fIupdate-user\fR.
  270. @//E*O*F help/remove-from-group.n//
  271. if test 406 -ne "`wc -c <'help/remove-from-group.n'`"; then
  272.     echo shar: error transmitting "'help/remove-from-group.n'" '(should have been 406 characters)'
  273. fi
  274. fi # end of overwriting check
  275. echo shar: extracting "'help/remove-from-sig.n'" '(292 characters)'
  276. if test -f 'help/remove-from-sig.n' ; then 
  277.   echo shar: will not over-write existing file "'help/remove-from-sig.n'"
  278. else
  279. sed 's/^X//' >help/remove-from-sig.n <<'@//E*O*F help/remove-from-sig.n//'
  280. X.ce
  281. X.ul
  282. Xremove-from-sig <sig name>
  283. X.sp
  284. X.ul
  285. Xremove-from-sig
  286. Xallows you to remove users from a particular sig.
  287. XThis does not mean that the users lose their accounts, it just means
  288. Xthat these users are no longer in the said sig.   You will be prompted
  289. Xfor a list of user names, space separated.
  290. @//E*O*F help/remove-from-sig.n//
  291. if test 292 -ne "`wc -c <'help/remove-from-sig.n'`"; then
  292.     echo shar: error transmitting "'help/remove-from-sig.n'" '(should have been 292 characters)'
  293. fi
  294. fi # end of overwriting check
  295. echo shar: extracting "'help/remove-group.n'" '(559 characters)'
  296. if test -f 'help/remove-group.n' ; then 
  297.   echo shar: will not over-write existing file "'help/remove-group.n'"
  298. else
  299. sed 's/^X//' >help/remove-group.n <<'@//E*O*F help/remove-group.n//'
  300. X.ce
  301. X.ul
  302. Xremove-group <name>
  303. X.sp
  304. X.ul
  305. Xremove-group
  306. Xdeletes a group.  All users who are members of the group via the access list
  307. Xin GRPFILE will no longer have the privileges associated with this group.
  308. XHowever users having the base gid that corresponds to the gid of this group
  309. Xwill still have that base gid.  This may be construed as a bug but I could
  310. Xnot think of a consistent way of handling this except by demanding that the
  311. Xgroup be empty before it is removed.
  312. X.sp
  313. XNo actual changes are made until a \fIsave-changes\fR or \fIsave-and-exit\fR
  314. Xis performed.
  315. @//E*O*F help/remove-group.n//
  316. if test 559 -ne "`wc -c <'help/remove-group.n'`"; then
  317.     echo shar: error transmitting "'help/remove-group.n'" '(should have been 559 characters)'
  318. fi
  319. fi # end of overwriting check
  320. echo shar: extracting "'help/remove-range.n'" '(202 characters)'
  321. if test -f 'help/remove-range.n' ; then 
  322.   echo shar: will not over-write existing file "'help/remove-range.n'"
  323. else
  324. sed 's/^X//' >help/remove-range.n <<'@//E*O*F help/remove-range.n//'
  325. X.ce
  326. X.ul
  327. Xremove-range <name>
  328. X.sp
  329. X.ul
  330. Xremove-range
  331. Xtells mcp that the uid range that is now associated with a certain group
  332. Xshould not be used any longer.  This does not affect existing users
  333. Xin any way.
  334. @//E*O*F help/remove-range.n//
  335. if test 202 -ne "`wc -c <'help/remove-range.n'`"; then
  336.     echo shar: error transmitting "'help/remove-range.n'" '(should have been 202 characters)'
  337. fi
  338. fi # end of overwriting check
  339. echo shar: extracting "'help/remove-sig.n'" '(229 characters)'
  340. if test -f 'help/remove-sig.n' ; then 
  341.   echo shar: will not over-write existing file "'help/remove-sig.n'"
  342. else
  343. sed 's/^X//' >help/remove-sig.n <<'@//E*O*F help/remove-sig.n//'
  344. X.ce
  345. X.ul
  346. Xremove-sig <name>
  347. X.sp
  348. X.ul
  349. Xremove-sig
  350. Xremoves a particular sig.  Logically enough, any users that are members of
  351. Xthe sig are quietly removed from the sig before the sig itself is removed,
  352. Xas are all references to the sig.
  353. @//E*O*F help/remove-sig.n//
  354. if test 229 -ne "`wc -c <'help/remove-sig.n'`"; then
  355.     echo shar: error transmitting "'help/remove-sig.n'" '(should have been 229 characters)'
  356. fi
  357. fi # end of overwriting check
  358. echo shar: extracting "'help/remove-user.n'" '(278 characters)'
  359. if test -f 'help/remove-user.n' ; then 
  360.   echo shar: will not over-write existing file "'help/remove-user.n'"
  361. else
  362. sed 's/^X//' >help/remove-user.n <<'@//E*O*F help/remove-user.n//'
  363. X.ce
  364. X.ul
  365. Xremove-user <name>
  366. X.sp
  367. X.ul
  368. Xremove-user
  369. Xdeletes a user's account.
  370. X#ifdef DOFILES
  371. XYou are asked if you want the home directory of the user removed as well.
  372. X#endif
  373. X.sp
  374. XRemember that no actual changes are made until a \fIsave-changes\fR
  375. Xor \fIsave-and-exit\fR is performed.
  376. @//E*O*F help/remove-user.n//
  377. if test 278 -ne "`wc -c <'help/remove-user.n'`"; then
  378.     echo shar: error transmitting "'help/remove-user.n'" '(should have been 278 characters)'
  379. fi
  380. fi # end of overwriting check
  381. echo shar: extracting "'help/remove-vig.n'" '(190 characters)'
  382. if test -f 'help/remove-vig.n' ; then 
  383.   echo shar: will not over-write existing file "'help/remove-vig.n'"
  384. else
  385. sed 's/^X//' >help/remove-vig.n <<'@//E*O*F help/remove-vig.n//'
  386. X.ce
  387. X.ul
  388. Xremove-vig <name>
  389. X.sp
  390. X.ul
  391. Xremove-vig
  392. Xtells mcp that a particular group is no longer
  393. Xa \fIV\fRery \fII\fRmportant \fIG\fRroup.  Use \fIwhat-is vig\fR
  394. Xto see what being a vig entails.
  395. @//E*O*F help/remove-vig.n//
  396. if test 190 -ne "`wc -c <'help/remove-vig.n'`"; then
  397.     echo shar: error transmitting "'help/remove-vig.n'" '(should have been 190 characters)'
  398. fi
  399. fi # end of overwriting check
  400. echo shar: extracting "'help/save-and-exit.n'" '(157 characters)'
  401. if test -f 'help/save-and-exit.n' ; then 
  402.   echo shar: will not over-write existing file "'help/save-and-exit.n'"
  403. else
  404. sed 's/^X//' >help/save-and-exit.n <<'@//E*O*F help/save-and-exit.n//'
  405. X.ce
  406. X.ul
  407. Xsave-and-exit
  408. X.sp
  409. X.ul
  410. Xsave-and-exit
  411. Xdoes a save-changes and an exit-mcp, in that order.  See the help pages for
  412. Xthese commands for more information.
  413. @//E*O*F help/save-and-exit.n//
  414. if test 157 -ne "`wc -c <'help/save-and-exit.n'`"; then
  415.     echo shar: error transmitting "'help/save-and-exit.n'" '(should have been 157 characters)'
  416. fi
  417. fi # end of overwriting check
  418. echo shar: extracting "'help/save-changes.n'" '(1250 characters)'
  419. if test -f 'help/save-changes.n' ; then 
  420.   echo shar: will not over-write existing file "'help/save-changes.n'"
  421. else
  422. sed 's/^X//' >help/save-changes.n <<'@//E*O*F help/save-changes.n//'
  423. X.ce
  424. X.ul
  425. Xsave-changes
  426. X.sp
  427. X.ul
  428. Xsave-changes
  429. Xcauses all changes that have made to be written
  430. Xout to the accounting files.
  431. XAll checkpoint files will deleted as the real accounting
  432. Xfiles are written.
  433. X#ifdef DOFILES
  434. XAlso any other filesystem work such as creating, removing,
  435. Xand renaming user directories is done at this time.
  436. XAn important thing to remember is that mcp creates home directories
  437. Xwith group ownership corresponding to the base gid of user ONLY if
  438. Xthat gid maps to a vig; otherwise the gid of the directory is set to 0.
  439. X# ifdef sun
  440. X.sp
  441. XClient machines will by necessity use remote commands to accomplish this
  442. Xsince user directories are usually in a filesystem mounted on a directory on
  443. Xthe fileserver.
  444. X# endif
  445. XIf errors occur, mcp will put the particular change back  on
  446. Xthe job queue to be tried again on the next
  447. X.ul
  448. Xsave-changes.
  449. XThus if things go wronmg during a \fIsave-and-exit\fR
  450. Xyou will be notified and asked to confirm that you wish to leave while there
  451. Xare still outstanding changes.
  452. X# ifdef sun
  453. X.sp
  454. X(Note: Errors on remote commands are difficult to detect since no exit
  455. Xstatus is returned.  However if the command generate error messages, these
  456. Xwill be passed to you.  Mcp will behave as if the command succeeded.)
  457. X# endif
  458. X#endif
  459. @//E*O*F help/save-changes.n//
  460. if test 1250 -ne "`wc -c <'help/save-changes.n'`"; then
  461.     echo shar: error transmitting "'help/save-changes.n'" '(should have been 1250 characters)'
  462. fi
  463. fi # end of overwriting check
  464. echo shar: extracting "'help/shell-escape.n'" '(387 characters)'
  465. if test -f 'help/shell-escape.n' ; then 
  466.   echo shar: will not over-write existing file "'help/shell-escape.n'"
  467. else
  468. sed 's/^X//' >help/shell-escape.n <<'@//E*O*F help/shell-escape.n//'
  469. X.ce
  470. X.ul
  471. Xshell-escape [ command [ arg ... ] ]
  472. X.sp
  473. X.ul
  474. Xshell-escape
  475. Xwithout any arguments forks an interactive subshell.  The shell is taken
  476. Xfrom the your SHELL environmental variable, and in lieu of that a default
  477. Xshell (typically /bin/sh) is
  478. Xused.  If arguments are present mcp executes this command in place of the
  479. Xshell.
  480. X.sp
  481. XUpon command or subshell exit, you will be returned to mcp.
  482. @//E*O*F help/shell-escape.n//
  483. if test 387 -ne "`wc -c <'help/shell-escape.n'`"; then
  484.     echo shar: error transmitting "'help/shell-escape.n'" '(should have been 387 characters)'
  485. fi
  486. fi # end of overwriting check
  487. echo shar: extracting "'help/sig.n'" '(401 characters)'
  488. if test -f 'help/sig.n' ; then 
  489.   echo shar: will not over-write existing file "'help/sig.n'"
  490. else
  491. sed 's/^X//' >help/sig.n <<'@//E*O*F help/sig.n//'
  492. X.in 3
  493. X.ti 0
  494. X.ul
  495. Xsig
  496. X\- an mcp abstraction with the following attributes:
  497. X.nf
  498. X.sp
  499. X.in +1
  500. X\(bu   Name
  501. X\(bu   Expiration date (optional)
  502. X\(bu   Description
  503. X.in -1
  504. X.sp
  505. X.fi
  506. XSigs are created using
  507. X.ul
  508. Xadd-sig
  509. Xand users may be subsequently added to them via
  510. X.ul
  511. Xadd-to-sig.
  512. XSigs are not automatically deleted when they expire.  However the
  513. Xsystem administrator can use
  514. X.ul
  515. Xmcp -c
  516. Xto report any expired sigs.
  517. @//E*O*F help/sig.n//
  518. if test 401 -ne "`wc -c <'help/sig.n'`"; then
  519.     echo shar: error transmitting "'help/sig.n'" '(should have been 401 characters)'
  520. fi
  521. fi # end of overwriting check
  522. echo shar: extracting "'help/uid.n'" '(252 characters)'
  523. if test -f 'help/uid.n' ; then 
  524.   echo shar: will not over-write existing file "'help/uid.n'"
  525. else
  526. sed 's/^X//' >help/uid.n <<'@//E*O*F help/uid.n//'
  527. X.in 3
  528. X.ti 0
  529. X.ul
  530. Xuid
  531. X\- is the standard UNIX numerical user id that uniquely identifies
  532. Xeach user.  Since file ownerships are recognized by uid, a change in
  533. Xa user uid entails changing the ownership of all the files of that user
  534. Xto reflect the new uid.
  535. @//E*O*F help/uid.n//
  536. if test 252 -ne "`wc -c <'help/uid.n'`"; then
  537.     echo shar: error transmitting "'help/uid.n'" '(should have been 252 characters)'
  538. fi
  539. fi # end of overwriting check
  540. echo shar: extracting "'help/unbind-class.n'" '(358 characters)'
  541. if test -f 'help/unbind-class.n' ; then 
  542.   echo shar: will not over-write existing file "'help/unbind-class.n'"
  543. else
  544. sed 's/^X//' >help/unbind-class.n <<'@//E*O*F help/unbind-class.n//'
  545. X.ce
  546. X.ul
  547. Xunbind-class <class name>
  548. X.sp
  549. X.ul
  550. Xunbind-class
  551. Xunbinds an existing class from one or more aliases.  This means that all
  552. Xusers whose alias memberships depend solely on the class being bound to these
  553. Xaliases are removed from the aliases.  Subseqeunt changes in class
  554. Xmembership will be no longer be reflected in the addresses contained in the
  555. Xaliases.
  556. @//E*O*F help/unbind-class.n//
  557. if test 358 -ne "`wc -c <'help/unbind-class.n'`"; then
  558.     echo shar: error transmitting "'help/unbind-class.n'" '(should have been 358 characters)'
  559. fi
  560. fi # end of overwriting check
  561. echo shar: extracting "'help/unbind-group.n'" '(358 characters)'
  562. if test -f 'help/unbind-group.n' ; then 
  563.   echo shar: will not over-write existing file "'help/unbind-group.n'"
  564. else
  565. sed 's/^X//' >help/unbind-group.n <<'@//E*O*F help/unbind-group.n//'
  566. X.ce
  567. X.ul
  568. Xunbind-group <group name>
  569. X.sp
  570. X.ul
  571. Xunbind-group
  572. Xunbinds an existing group from one or more aliases.  This means that all
  573. Xusers whose alias memberships depend solely on the group being bound to these
  574. Xaliases are removed from the aliases.  Subseqeunt changes in group
  575. Xmembership will be no longer be reflected in the addresses contained in the
  576. Xaliases.
  577. @//E*O*F help/unbind-group.n//
  578. if test 358 -ne "`wc -c <'help/unbind-group.n'`"; then
  579.     echo shar: error transmitting "'help/unbind-group.n'" '(should have been 358 characters)'
  580. fi
  581. fi # end of overwriting check
  582. echo shar: extracting "'help/unbind-sig.n'" '(346 characters)'
  583. if test -f 'help/unbind-sig.n' ; then 
  584.   echo shar: will not over-write existing file "'help/unbind-sig.n'"
  585. else
  586. sed 's/^X//' >help/unbind-sig.n <<'@//E*O*F help/unbind-sig.n//'
  587. X.ce
  588. X.ul
  589. Xunbind-sig <sig name>
  590. X.sp
  591. X.ul
  592. Xunbind-sig
  593. Xunbinds an existing sig from one or more aliases.  This means that all
  594. Xusers whose alias memberships depend solely on the sig being bound to these
  595. Xaliases are removed from the aliases.  Subseqeunt changes in sig
  596. Xmembership will be no longer be reflected in the addresses contained in the
  597. Xaliases.
  598. @//E*O*F help/unbind-sig.n//
  599. if test 346 -ne "`wc -c <'help/unbind-sig.n'`"; then
  600.     echo shar: error transmitting "'help/unbind-sig.n'" '(should have been 346 characters)'
  601. fi
  602. fi # end of overwriting check
  603. echo shar: extracting "'help/update-alias.n'" '(161 characters)'
  604. if test -f 'help/update-alias.n' ; then 
  605.   echo shar: will not over-write existing file "'help/update-alias.n'"
  606. else
  607. sed 's/^X//' >help/update-alias.n <<'@//E*O*F help/update-alias.n//'
  608. X.ce
  609. X.ul
  610. Xupdate-alias <name>
  611. X.sp
  612. X.ul
  613. Xupdate-alias
  614. Xallows you the change the name of a particular alias.
  615. XBindings and addressees are changed with other commmands.
  616. @//E*O*F help/update-alias.n//
  617. if test 161 -ne "`wc -c <'help/update-alias.n'`"; then
  618.     echo shar: error transmitting "'help/update-alias.n'" '(should have been 161 characters)'
  619. fi
  620. fi # end of overwriting check
  621. echo shar: extracting "'help/update-class.n'" '(214 characters)'
  622. if test -f 'help/update-class.n' ; then 
  623.   echo shar: will not over-write existing file "'help/update-class.n'"
  624. else
  625. sed 's/^X//' >help/update-class.n <<'@//E*O*F help/update-class.n//'
  626. X.ce
  627. X.ul
  628. Xupdate-class <name>
  629. X.sp
  630. X.ul
  631. Xupdate-class
  632. Xallows you the change the attributes of a particular class.
  633. XYou will queried whether you wish to change each attribute.
  634. XDefault answers, if any, appear in brackets.
  635. @//E*O*F help/update-class.n//
  636. if test 214 -ne "`wc -c <'help/update-class.n'`"; then
  637.     echo shar: error transmitting "'help/update-class.n'" '(should have been 214 characters)'
  638. fi
  639. fi # end of overwriting check
  640. echo shar: extracting "'help/update-group.n'" '(214 characters)'
  641. if test -f 'help/update-group.n' ; then 
  642.   echo shar: will not over-write existing file "'help/update-group.n'"
  643. else
  644. sed 's/^X//' >help/update-group.n <<'@//E*O*F help/update-group.n//'
  645. X.ce
  646. X.ul
  647. Xupdate-group <name>
  648. X.sp
  649. X.ul
  650. Xupdate-group
  651. Xallows you the change the attributes of a particular group.
  652. XYou will queried whether you wish to change each attribute.
  653. XDefault answers, if any, appear in brackets.
  654. @//E*O*F help/update-group.n//
  655. if test 214 -ne "`wc -c <'help/update-group.n'`"; then
  656.     echo shar: error transmitting "'help/update-group.n'" '(should have been 214 characters)'
  657. fi
  658. fi # end of overwriting check
  659. echo shar: extracting "'help/update-range.n'" '(164 characters)'
  660. if test -f 'help/update-range.n' ; then 
  661.   echo shar: will not over-write existing file "'help/update-range.n'"
  662. else
  663. sed 's/^X//' >help/update-range.n <<'@//E*O*F help/update-range.n//'
  664. X.ce
  665. X.ul
  666. Xupdate-range <name>
  667. X.sp
  668. X.ul
  669. Xupdate-range
  670. Xallow you to change the limits and/or mode of a particular uid range.
  671. XDefault answers, if any, appear in brackets.
  672. @//E*O*F help/update-range.n//
  673. if test 164 -ne "`wc -c <'help/update-range.n'`"; then
  674.     echo shar: error transmitting "'help/update-range.n'" '(should have been 164 characters)'
  675. fi
  676. fi # end of overwriting check
  677. echo shar: extracting "'help/update-sig.n'" '(208 characters)'
  678. if test -f 'help/update-sig.n' ; then 
  679.   echo shar: will not over-write existing file "'help/update-sig.n'"
  680. else
  681. sed 's/^X//' >help/update-sig.n <<'@//E*O*F help/update-sig.n//'
  682. X.ce
  683. X.ul
  684. Xupdate-sig <name>
  685. X.sp
  686. X.ul
  687. Xupdate-sig
  688. Xallows you the change the attributes of a particular sig.
  689. XYou will queried whether you wish to change each attribute.
  690. XDefault answers, if any, appear in brackets.
  691. @//E*O*F help/update-sig.n//
  692. if test 208 -ne "`wc -c <'help/update-sig.n'`"; then
  693.     echo shar: error transmitting "'help/update-sig.n'" '(should have been 208 characters)'
  694. fi
  695. fi # end of overwriting check
  696. echo shar: extracting "'help/update-user.n'" '(700 characters)'
  697. if test -f 'help/update-user.n' ; then 
  698.   echo shar: will not over-write existing file "'help/update-user.n'"
  699. else
  700. sed 's/^X//' >help/update-user.n <<'@//E*O*F help/update-user.n//'
  701. X.ce
  702. X.ul
  703. Xupdate-user <name>
  704. X.sp
  705. X.ul
  706. Xupdate-user
  707. Xallows you to change these attributes of a particular user:
  708. X.nf
  709. X.sp
  710. X.in +1
  711. X\(bu   Login name
  712. X\(bu   Real name
  713. X\(bu   Uid
  714. X\(bu   Gid
  715. X\(bu   Password
  716. X\(bu   Id
  717. X\(bu   Home directory
  718. X\(bu   Shell
  719. X.in -1
  720. X.sp
  721. X.fi
  722. XMcp will ask you in turn what you want each of these attriutes to be.
  723. XDefault responses, if any, appear in brackets.
  724. X#ifdef DOFILES
  725. XNote: If you change a user uid, mcp will use find(1) and chown(8) to change
  726. Xthe ownerships of the user's files to the new uid.  Since this usually takes
  727. Xmore than a few seconds, mcp spawns these processes in the background (at
  728. Xlow priority).  So don't expect the file ownerships to be changed
  729. Ximmediately.
  730. X#endif
  731. @//E*O*F help/update-user.n//
  732. if test 700 -ne "`wc -c <'help/update-user.n'`"; then
  733.     echo shar: error transmitting "'help/update-user.n'" '(should have been 700 characters)'
  734. fi
  735. fi # end of overwriting check
  736. echo shar: extracting "'help/vig.n'" '(326 characters)'
  737. if test -f 'help/vig.n' ; then 
  738.   echo shar: will not over-write existing file "'help/vig.n'"
  739. else
  740. sed 's/^X//' >help/vig.n <<'@//E*O*F help/vig.n//'
  741. X.in 3
  742. X.ti 0
  743. X.ul
  744. Xvig
  745. X\- an acronym for \fIV\fRery \fII\fRmportant \fIG\fRroup.
  746. X.ul
  747. XVigs
  748. Xare just attributes of existings groups.  Members of such groups
  749. Xare treated specially;
  750. X.ul
  751. Xvig
  752. Xmembers are never considered deadbeats or inactives.  Also
  753. Xthe freeze-user command will request confirmation before freezing
  754. Xa
  755. X.ul
  756. Xvig
  757. Xmember.
  758. @//E*O*F help/vig.n//
  759. if test 326 -ne "`wc -c <'help/vig.n'`"; then
  760.     echo shar: error transmitting "'help/vig.n'" '(should have been 326 characters)'
  761. fi
  762. fi # end of overwriting check
  763. echo shar: extracting "'help/what-is.n'" '(233 characters)'
  764. if test -f 'help/what-is.n' ; then 
  765.   echo shar: will not over-write existing file "'help/what-is.n'"
  766. else
  767. sed 's/^X//' >help/what-is.n <<'@//E*O*F help/what-is.n//'
  768. X.ce
  769. X.ul
  770. Xwhat-is <term>
  771. X.sp
  772. X.ul
  773. Xwhat-is
  774. Xgives the definition of
  775. X.ul
  776. X<term>.
  777. XDefinitions are provided for various bits of jargon used by system gurus
  778. Xwhen dealing with accounts.  To see the list of defined terms, type
  779. X\fIwhat-is ?\fR.
  780. @//E*O*F help/what-is.n//
  781. if test 233 -ne "`wc -c <'help/what-is.n'`"; then
  782.     echo shar: error transmitting "'help/what-is.n'" '(should have been 233 characters)'
  783. fi
  784. fi # end of overwriting check
  785. echo shar: extracting "'man/Copyright'" '(385 characters)'
  786. if test -f 'man/Copyright' ; then 
  787.   echo shar: will not over-write existing file "'man/Copyright'"
  788. else
  789. sed 's/^X//' >man/Copyright <<'@//E*O*F man/Copyright//'
  790. X(c) 1986 by Kyle E. Jones
  791. X
  792. XAll sources and documentation of this mcp distribution are
  793. Xincluded in this copyright, but permission is granted to
  794. Xcopy and redistribute any part of this distribution, provided
  795. Xthat this notice is a conspicuous part of the redistribution,
  796. Xand that no part of this distribution is sold.
  797. X
  798. XThis software is distributed 'as is', without warranties of any kind.
  799. @//E*O*F man/Copyright//
  800. if test 385 -ne "`wc -c <'man/Copyright'`"; then
  801.     echo shar: error transmitting "'man/Copyright'" '(should have been 385 characters)'
  802. fi
  803. fi # end of overwriting check
  804. echo shar: extracting "'man/Makefile'" '(1104 characters)'
  805. if test -f 'man/Makefile' ; then 
  806.   echo shar: will not over-write existing file "'man/Makefile'"
  807. else
  808. sed 's/^X//' >man/Makefile <<'@//E*O*F man/Makefile//'
  809. X# Change this if your C preprocessor is elsewhere
  810. XCPP    = /lib/cpp
  811. X
  812. X# what section the mcp manual should go under
  813. XMCPSECTION    = n
  814. X# what section the file format manuals should go under
  815. XFILESECTION    = 5
  816. X
  817. XPAGES    = accounts.t classes.t ranges.t shells.t sigs.t vigs.t
  818. XMATTES    = accounts.n classes.n ranges.n shells.n sigs.n vigs.n
  819. X
  820. Xall:    $(PAGES) mcp.t
  821. X
  822. X$(PAGES):    Defs
  823. X
  824. XDefs:    ../src/sysdep.h
  825. X    sed -e 's/"//g' -e "s/[     ][     ]*/ /g" ../src/sysdep.h > Defs
  826. X
  827. Xmcp.t:    mcp.n
  828. X    tbl mcp.n > mcp.t
  829. X
  830. Xinstall:    all
  831. X    @echo Installing manual pages...
  832. X    @cp mcp.t /usr/man/man$(MCPSECTION)/mcp.$(MCPSECTION)
  833. X    @cp accounts.t /usr/man/man$(FILESECTION)/accounts.$(FILESECTION)
  834. X    @cp classes.t /usr/man/man$(FILESECTION)/classes.$(FILESECTION)
  835. X    @cp ranges.t /usr/man/man$(FILESECTION)/ranges.$(FILESECTION)
  836. X    @cp shells.t /usr/man/man$(FILESECTION)/shells.$(FILESECTION)
  837. X    @cp sigs.t /usr/man/man$(FILESECTION)/sigs.$(FILESECTION)
  838. X    @cp vigs.t /usr/man/man$(FILESECTION)/vigs.$(FILESECTION)
  839. X
  840. Xclean:
  841. X    @echo Removing cpp output and other flotsam...
  842. X    @rm -f $(PAGES) Defs mcp.t
  843. X
  844. X.n.t:    ; cat Defs $< | $(CPP) -P | cat -s > $@
  845. X
  846. X.SUFFIXES:    .n .t
  847. @//E*O*F man/Makefile//
  848. if test 1104 -ne "`wc -c <'man/Makefile'`"; then
  849.     echo shar: error transmitting "'man/Makefile'" '(should have been 1104 characters)'
  850. fi
  851. fi # end of overwriting check
  852. echo shar: extracting "'man/accounts.n'" '(1099 characters)'
  853. if test -f 'man/accounts.n' ; then 
  854.   echo shar: will not over-write existing file "'man/accounts.n'"
  855. else
  856. sed 's/^X//' >man/accounts.n <<'@//E*O*F man/accounts.n//'
  857. X.TH ACCOUNTS 5
  858. X.SH NAME
  859. Xaccounts \- mcp accounts file
  860. X.SH DESCRIPTION
  861. X.I Accounts
  862. Xis a data file used by the
  863. X.I mcp(l)
  864. Xprogram to store user specific information.
  865. XIn some places information in
  866. X.I accounts
  867. Xoverlaps information in
  868. X.B /etc/passwd.
  869. XThis is done for clarity.
  870. X.PP
  871. X.I Accounts
  872. Xcontains for each user the following information:
  873. X.sp
  874. Xlogin name
  875. X.br
  876. Xreal name
  877. X.br
  878. Xunique ID string (e.g. Social Security Number)
  879. X.br
  880. Xnumerical user ID (corresponds to
  881. X.B /etc/passwd)
  882. X.br
  883. Xnumerical group ID (corresponds to
  884. X.B /etc/passwd)
  885. X.br
  886. Xlist of groups
  887. X.br
  888. Xlist of classes
  889. X.br
  890. Xlist of sigs (Special Interest Groups)
  891. X.br
  892. Xlist of aliases
  893. X.PP
  894. XInformation is stored one line per user.
  895. XFields are separated by colons and list members are comma separated.
  896. XAll fields must be present, however the list fields may be empty.
  897. X.SH SEE ALSO
  898. X.I mcp(l), passwd(5)
  899. X.SH BUGS
  900. XProbably should have used
  901. X.I dbx(3X)
  902. Xbut at present it lacks the flexibility of stdio (i.e. multiple databases
  903. Xopen simultaneously).  This has been remedied in 4.3BSD by the
  904. X.I ndbm(3X)
  905. Xfaciclities but using these would not be backward compatible.
  906. @//E*O*F man/accounts.n//
  907. if test 1099 -ne "`wc -c <'man/accounts.n'`"; then
  908.     echo shar: error transmitting "'man/accounts.n'" '(should have been 1099 characters)'
  909. fi
  910. fi # end of overwriting check
  911. echo shar: extracting "'man/classes.n'" '(597 characters)'
  912. if test -f 'man/classes.n' ; then 
  913.   echo shar: will not over-write existing file "'man/classes.n'"
  914. else
  915. sed 's/^X//' >man/classes.n <<'@//E*O*F man/classes.n//'
  916. X.TH CLASSES 5
  917. X.SH NAME
  918. Xclasses \- mcp classes
  919. X.SH SYNOPSIS
  920. XCSFILE
  921. X.SH DESCRIPTION
  922. X.I Classes
  923. Xcontains the names and descriptions of all the 
  924. X.I mcp(l)
  925. Xclasses.
  926. XThe format for the file is
  927. X.sp
  928. Xname<sp>description length<sp>expiration time<nl>
  929. X.br
  930. Xdescription...
  931. X.sp
  932. XThe description length is the number of characters in the description
  933. Xwhich beigns immedaitely after the name line.
  934. XThe expiration date is given in the number of seconds since Jan. 1, 1970.
  935. XUnless this file is munged by some calamity, it need never be edited manually
  936. Xas
  937. X.I mcp
  938. Xhandles all modification of it.
  939. X.SH SEE ALSO
  940. X.I mcp(l)
  941. @//E*O*F man/classes.n//
  942. if test 597 -ne "`wc -c <'man/classes.n'`"; then
  943.     echo shar: error transmitting "'man/classes.n'" '(should have been 597 characters)'
  944. fi
  945. fi # end of overwriting check
  946. echo shar: extracting "'man/mcp.n'" '(18435 characters)'
  947. if test -f 'man/mcp.n' ; then 
  948.   echo shar: will not over-write existing file "'man/mcp.n'"
  949. else
  950. sed 's/^X//' >man/mcp.n <<'@//E*O*F man/mcp.n//'
  951. X.pi /usr/bin/col
  952. X.TH MCP ODU
  953. X.SH NAME
  954. Xmcp \- autoMated acCounts Program
  955. X.SH SYNOPSIS
  956. X/etc/mcp [ options ]
  957. X.SH DESCRIPTION
  958. X\fIMcp\fR is a program designed to organize and simplify the creation,
  959. Xmodification and removal of user accounts.  Complete support for the locking
  960. Xand modification of \fB/etc/passwd\fR and \fB/etc/group\fR is provided; thus
  961. X\fImcp\fR can (and should) be used in preference to \fIvipw(8)\fR.
  962. X\fIMcp\fR may also be configured to handle updating the \fIsendmail(8)\fR
  963. Xaliases database as well as creating/removing user home directories and mail.
  964. X.SH OVERVIEW
  965. X\fIMcp\fR should be considered an account \fIeditor\fR.  Like most
  966. Xeditors, \fImcp\fR copies all the files to be edited into buffers, and then
  967. Xedits the buffers rather than the actual files.  However one of \fImcp\fR's
  968. Xfunctions is to take away the tedium of editing sensitive files like
  969. X\fB/etc/passwd\fR with a normal text editor.
  970. X.sp
  971. XSo instead of forcing the user to graphically edit the various account data
  972. Xfiles, \fImcp\fR interprets the data and allows the user to change the data
  973. Xin terms of logical units such as users, groups, classes, aliases, etc.
  974. XSuch logical units can be manipulated interactively using simple commands;
  975. Xno changes are made to the actual data files until specifically requested
  976. Xvia a \fBsave-changes\fR or \fBsave-and-exit\fR command.  You can see what
  977. Xchanges \fImcp\fR will make beforehand by using the \fBdescribe-changes\fR
  978. Xcommand.
  979. X.sp
  980. XIn order to affect changes, \fImcp\fR must be invoked as the super-user.
  981. XWhen \fImcp\fR is invoked by a non-privileged user, none of the commands
  982. Xwhich would cause change are available.  The latter is useful when you want
  983. Xto peruse the account files without altering them.
  984. X.SH INTERACTION
  985. XWhen \fImcp\fR is invoked without arguments it will start an interactive
  986. Xsession.  Various startup messages are printed, followed by the command
  987. Xprompt.  The prompt is ``(   )'' for normal users, ``(mcp)'' for the
  988. Xsuper-user.  \fIMcp\fR then loops, accepting and executing various commands
  989. Xfrom the keyboard, until a \fBexit-mcp\fR or \fBsave-and-exit\fR is
  990. Xencountered.  Don't be disturbed if the startup messages disappear too
  991. Xfast to be read; \fImcp\fR displays them only as reassurance that all is well
  992. Xduring its sometimes lengthy startup phase.
  993. X.sp
  994. X\fIMcp\fR commands are meant to be descriptive and easy to understand.
  995. XUnfortunately this makes them long and cumbersome to type.  To ease typing,
  996. X\fImcp\fR offers Tenex-style name and command completion, which condenses most
  997. Xcommands to no more than three keystrokes.
  998. X.sp
  999. XBecause of the Tenex input editor
  1000. Xsome characters are treated specially.
  1001. X.TP 8
  1002. X.B ?
  1003. X\fIMcp\fR displays the current completion list.  This is a good way to figure
  1004. Xout what sort of thing \fImcp\fR is asking for, if it's not immediately apparent.
  1005. X.TP
  1006. X.B <ESC>
  1007. XCauses \fImcp\fR to try to complete the word preceding the cursor using the
  1008. Xcurrent completion list.
  1009. X.TP
  1010. X.B <TAB>
  1011. XSame as
  1012. X.B <ESC>
  1013. Xabove.
  1014. X.TP
  1015. X.B <BS>
  1016. XDelete the character preceding the cursor.
  1017. X.TP
  1018. X.B <DEL>
  1019. XSame as
  1020. X.B <BS>
  1021. Xabove.
  1022. X.TP
  1023. X.B ^W
  1024. XWord delete.  Deletes the word preceding the cursor.
  1025. X.TP
  1026. X.B ^U, ^X
  1027. XLine kill.  Deletes everything on the current line.
  1028. X.TP
  1029. X.B ^T
  1030. XTransposes (swaps) the two characters immediately preceding the cursor.
  1031. X.TP
  1032. X.B ^R
  1033. XRedraws the current line.
  1034. X.PP
  1035. XAt \fImcp\fR's command prompt (either ``(   )'' or ``(mcp)'') a few other keys
  1036. Xhave meanings.
  1037. X.TP 8
  1038. X.B <SPC>
  1039. XActivates word completion \fIiff\fR this is the first word on the line.  The
  1040. Xfirst word restriction is needed to insure that you are permitted to use
  1041. Xspaces for other purposes (like delimiting words that
  1042. X\fIaren't\fR in the the completion list!)
  1043. X.TP
  1044. X.B ^P
  1045. XGoes back one command in the history list.
  1046. XRepeated
  1047. X.B ^P's
  1048. Xgo back further in the history.
  1049. X\fIMcp\fR keeps a history list of commands similar to that of
  1050. X.I csh(1).
  1051. XHowever this is a bare-bones facility: none of the fancy
  1052. X.I csh
  1053. Xsubstitutions are supported.
  1054. X.TP
  1055. X.B ^N
  1056. XGoes forward one command in the history list.  Using
  1057. X.B ^P
  1058. Xand
  1059. X.B ^N
  1060. Xyou may freely traverse the history list; upon finding the command
  1061. Xyou want, press
  1062. X.B <cr>
  1063. Xand the command will be passed to \fImcp\fR to be executed, just as if you
  1064. Xhad re-typed it manually.  The history list will contain at most the last 40
  1065. Xcommands.
  1066. X.PP
  1067. XOther than the special keys, \fImcp\fR resolutely ignores control
  1068. Xcharacters.  Also \fImcp\fR disallows colons since these will corrupt
  1069. X\fB/etc/passwd\fR.
  1070. X.sp
  1071. XDocumentation of all \fImcp\fR commands and terminology is available from
  1072. Xwithin the program via the \fBdescribe-command\fR and what-is commands.
  1073. X\fBDescribe-command\fR describes any \fImcp\fR command, and what-is gives an
  1074. Xexplanation of \fImcp\fR terminology (jargon).
  1075. X.SH ADDING USERS
  1076. XAccount creation is the primary function of \fImcp\fR.  There are only two
  1077. Xcommands that create accounts: \fBadd-user\fR and \fBload-file\fR.
  1078. X.sp
  1079. X\fBAdd-user\fR takes a single optional argument which, if present, should be
  1080. Xlogin name of the new user.  If no login name is specified, \fImcp\fR will
  1081. Xgenerate one using a predetermined set of rules.  (These rules may be viewed
  1082. Xwith \fBdescribe-command add-user\fR.)
  1083. X.sp
  1084. X\fIMcp\fR will ask you various questions about the new user.  Most of these
  1085. Xquestions will have default answers that you can agree with by typing
  1086. Xreturn, or override by typing a response of your own.  If you specify the
  1087. Xword ``generate'' when \fImcp\fR asks for a password for the new user,
  1088. X\fImcp\fR will generate a random password for the user and display it.
  1089. X.sp
  1090. XA typical \fBadd-user\fR sequence might look like this:
  1091. X.sp
  1092. X.nf
  1093. X\fB(mcp) add-user
  1094. XReal Name: \fIAngus George Michaels\fB
  1095. Xlogin name is "agm"
  1096. XId: \fI229983397\fB
  1097. XPassword [229983397]: \fIgenerate\fB
  1098. Xpassword is "GC558h"
  1099. XGroup [student]: \fIfaculty\fB
  1100. XUid [63]: 
  1101. XShell [/bin/csh]: 
  1102. XHome [/usr1/fac/agm]: 
  1103. Xadded
  1104. X(mcp) \fR
  1105. X.fi
  1106. X.sp
  1107. X\fIMcp\fR output is shown in \fBbold face\fR while user responses are shown in
  1108. X\fIitalics\fR.
  1109. X.sp
  1110. XNote that \fImcp\fR supplied correct default home, shell, and uid
  1111. Xinformation so the user only needed to press return.  The \fBId\fR entry
  1112. Xshould be something that uniquely identifies the user.  The idea behind this
  1113. Xis that if the user already has an account, \fImcp\fR will be able to detect
  1114. Xit and warn the system administrator.  For non-human accounts the special Id
  1115. X``exception'' is permitted.  The default password would have been the
  1116. X\fBId\fR entry if the user had not overridden this with the
  1117. X\fBgenerate\fR command.
  1118. X.sp
  1119. X\fBLoad-file\fR allows you to add a number of accounts directly from a
  1120. Xfile.  The file must begin with short header that consists of a series of
  1121. Xlines that dictate what groups, classes, and sigs the new users will be put
  1122. Xinto, what shell they will use, etc.  The precise format for these files is
  1123. Xgiven in the help page for \fBload-file\fR.
  1124. X.SH REMOVING USERS
  1125. XAccounts are deleted with the \fBremove-cryos\fR, and \fBremove-user\fR commands.
  1126. X.sp
  1127. X\fBRemove-user\fR takes one argument which should be the login name of the
  1128. Xuser to be deleted.  All references to this user are removed.  Depending on
  1129. Xhow the program was configured, \fImcp\fR may also ask whether the user's
  1130. Xhome directory should be removed, and also make a note to remove the user's
  1131. Xmail, and secretmail.
  1132. X.sp
  1133. X\fBRemove-cryos\fR removes users that are ``frozen''.  Freezing is explained below.
  1134. X.SH FREEZING USERS
  1135. XTypically when the time comes to delete accounts, it is desired to archive
  1136. Xthe victim users' files to tape before deleting them.  The \fBfreeze-user\fR
  1137. Xcommand changes a user's shell to /usr/misc/freeze, which is usually a
  1138. Xscript that outputs a explanatory message and exits.  This keeps the user
  1139. Xout of the account while it is (presumably) being archived.  This also can
  1140. Xserve as a simple way to warn a user that his account has been deemed
  1141. Xexpendable and give a grace period for (heh) appeal.
  1142. X.sp
  1143. XThe \fBfreeze-inactives\fR command takes an argument \fIn\fR which should be
  1144. Xnumber of days inactivity.  Users that have been inactive (haven't logged
  1145. Xin) for \fIn\fR days are frozen with this command.  \fIVig\fR (\fIV\fRery
  1146. X\fII\fRmportant \fIG\fRroup) members are never considered inactive and are
  1147. Xtherefore exempt from being victims of this command.  Vigs are described
  1148. Xin the next section.
  1149. X.sp
  1150. X\fBFreeze-deadbeats\fR freezes users that are not members of any \fIclass\fR,
  1151. X\fIsig\fR, or vig.  Classes and sigs are described two sections hence.
  1152. X.SH GROUPS
  1153. XManipulation of standard UNIX groups (see \fIgroup(5)\fR) is supported.
  1154. XGroups are added with \fBadd-group\fR and removed with \fBremove-group\fR.
  1155. XExisting users may be added and removed from groups via the
  1156. X\fBadd-to-group\fR and \fBremove-from-group\fR commands.
  1157. X.sp
  1158. XIn addition, groups can be marked as \fIvigs\fR.  Users with base group IDs
  1159. Xthat correspond to a vig are exempt from being considered as inactives or
  1160. Xdeadbeats.  System accounts such as \fBuucp\fR, and \fBnews\fR should made
  1161. Xmembers of a vig to prevent accidental freezing via \fBfreeze-deadbeats.
  1162. X.SH OTHER USER GROUPINGS
  1163. XBesides the standard UNIX groups, \fImcp\fR supports two other group
  1164. Xabstractions:  classes and sigs (\fIS\fRpecial \fII\fRnterest
  1165. X\fIG\fRroups).  Classes and sigs are identical in attributes, which are
  1166. Xname, expiration date and description.  \fIMcp\fR was developed on a machine used
  1167. Xto support both college courses and research groups; thus the purely
  1168. Xtechnical distinction between classes and sigs.
  1169. X.sp
  1170. XClasses and sigs are added with \fBadd-class\fR and \fBadd-sig\fR and
  1171. Xremoved with \fBremove-class\fR and \fBremove-sig\fR.  Existing users are
  1172. Xadded to classes and sigs via the \fBadd-to-class\fR and \fBadd-to-sig\fR
  1173. Xcommands and removed from the same with the \fBremove-from-class\fR and
  1174. X\fBremove-from-sig\fR commands.
  1175. X.sp
  1176. XClasses and sigs may have an optional expiration date.  Nothing spectacular
  1177. Xhappens when this date passes; it is just a convenient way to remind the
  1178. Xsystem administrator when the accounts associated with a particular project
  1179. Xmay be removed.  \fIMcp\fR will report expired classes and sigs (among other
  1180. Xthings) when invoked with the \fB-c\fR flag.
  1181. X.sp
  1182. XThe usual scenario here at ODU is: the system administrator uses \fImcp
  1183. X-c\fR to see which classes and sigs have expired and removes them.  He then
  1184. Xissues a \fBfreeze-deadbeats\fR to freeze those users whose accounts need no
  1185. Xlonger exist, due to the vanished classes and sigs.  A grace period of about
  1186. Xa week is given and then the frozen accounts are archived to tape and
  1187. Xremoved.
  1188. X.SH UID RANGES
  1189. XSome sites bundle users that are in the same base group into set ranges of
  1190. Xuids to allow rapid scanning of the password file.  Although \fImcp\fR is
  1191. Xdesigned to minimize human contact with \fB/etc/passwd\fR, uid ranges are
  1192. Xsupported.
  1193. X.sp
  1194. X\fBAdd-range\fR takes as an argument the name of a group to which a uid range
  1195. Xshould be assigned.  \fIMcp\fR will prompt you for the bounds of the range and
  1196. Xwhether the range is to be \fIshared\fR or \fIexclusive\fR.  If the range is
  1197. Xexclusive, only new users with base group IDs correspoding to the range will
  1198. Xbe given uids in that range.  If the range is shared, new users may be given
  1199. Xa uid in that range without being members of the corresponding group.  Thus
  1200. Xshared ranges automatically are fodder for new users with base groups that
  1201. Xdo not correspond to a range.
  1202. X.sp
  1203. XOnce a range has been assigned to a group, new users with base group IDs
  1204. Xthat correspond this group have their uids chosen from the corresponding
  1205. Xrange.  If there are no available uids left in the range, \fImcp\fR will
  1206. Xsearch though the shared ranges for a free uid.  If still none are found,
  1207. X\fImcp\fR will search the uids not covered by any range.  If \fImcp\fR still
  1208. Xcannot find a uid, you probably have BIG problems.  Think about it.
  1209. X.sp
  1210. X.SH MAINTAINING SENDMAIL ALIASES
  1211. XOptionally, \fImcp\fR can be configured to manage the sendmail aliases database
  1212. X(see \fIaliases(5)\fR).  Aliases are added and deleted with the \fBadd-alias\fR
  1213. Xand \fBremove-alias\fR commands.  Addresses can be added and removed from existing
  1214. Xaliases via the \fBadd-to-alias\fR and \fBremove-from-alias\fR commands.
  1215. X.sp
  1216. XAs an aid to managing mailing lists, \fImcp\fR supports \fIbinding\fR
  1217. Xclasses, sigs, and groups to aliases.  Once a class, sig or group is bound
  1218. Xto an alias any members of the class, sig or group are immediately a member
  1219. Xof the alias.  If the class, sig or group is subsequently unbound from the
  1220. Xalias (or removed) its members are removed from the alias unless they have
  1221. Xanother reason to be in it.  Being a member of another class, sig or group
  1222. Xthat is bound to the same alias suffices, as does having been a member of
  1223. Xthe alias before the class, sig or group was bound.  An example will clarify
  1224. Xthis.
  1225. X.nf
  1226. X.sp
  1227. X\fB(mcp) \fIdescribe-class sp200\fB
  1228. XClass: sp200
  1229. XInstructor: Rich Little
  1230. X.sp
  1231. XPublic Speaking, lecture, 3 hours, 3 credits.
  1232. X.sp
  1233. X.TS
  1234. X;
  1235. Xl3 l21 l .
  1236. Xreagan    Ronald Reagan    128
  1237. Xbresh_l    Leonid Breshnev    183
  1238. Xbeebl_z    Zaphod Beeblebrox    184
  1239. Xkhan    Genghis Khan    185
  1240. Xkirk    James T. Kirk    186
  1241. X.TE
  1242. X.sp
  1243. X5 members.
  1244. X(mcp) \fIdescribe-alias leaders\fB
  1245. XName: leaders
  1246. X        - Addressees -
  1247. Xreagan   
  1248. X1 addressee
  1249. X(mcp) \fIbind-class sp200\fB
  1250. XTo-Aliases: leaders
  1251. X1 bound
  1252. X(mcp) \fIdescribe-alias leaders\fB
  1253. XName: leaders
  1254. XBound to class  : sp200 
  1255. X        - Addressees -
  1256. Xbeebl_z   bresh_l   khan      kirk      reagan    
  1257. X5 addressees
  1258. X(mcp) \fIunbind-class sp200\fB
  1259. XFrom-Aliases: \fIleaders\fB
  1260. X1 unbound
  1261. X(mcp) \fIdescribe-alias leaders\fB
  1262. XName: leaders
  1263. X        - Addressees -
  1264. Xreagan   
  1265. X1 addressee
  1266. X(mcp) \fR
  1267. X.fi
  1268. X.sp
  1269. XNote that the user ``reagan'' remained in the alias ``leaders'' regardless
  1270. Xof the bindings because his membership was not dependent on that binding.
  1271. X.SH OPTIONS
  1272. X\fIMcp\fR has very few command line options:
  1273. X.TP 4
  1274. X.B -B
  1275. XWhen invoked with \fB-B\fR, \fImcp\fR will create or rebuild account
  1276. Xdata files that are missing or disturbed.  This should be used
  1277. Xwhenever \fImcp\fR is 
  1278. Xre-configured and \fImust\fR be used when \fImcp\fR is first installed.
  1279. X\fIMcp\fR keeps /etc/passwd sorted by uid for efficiency, and if this order is
  1280. Xdisturbed (e.g. by someone using \fIvipw\fR) \fImcp\fR will complain.  If
  1281. Xthis happens you can use \fImcp -B\fR to reorder /etc/passwd.
  1282. X.TP
  1283. X.B -c
  1284. XGoop and glop checker.  Some checks are done only if \fImcp\fR is invoked as
  1285. Xthe super-user.  Reports the existence of:
  1286. X.sp 0.5
  1287. X.in +3
  1288. X.ti -3
  1289. X\(bu  references to nonexistent
  1290. Xclasses, sigs, and users
  1291. X.br
  1292. X.ti -3
  1293. X\(bu  empty aliases
  1294. X.br
  1295. X.ti -3
  1296. X\(bu  empty classes and sigs
  1297. X.br
  1298. X.ti -3
  1299. X\(bu  expired classes and sigs
  1300. X.br
  1301. X.ti -3
  1302. X\(bu  nonexistent home directories and shells (super-user only)
  1303. X.br
  1304. X.ti -3
  1305. X\(bu  home directories owned by wrong user (super-user only)
  1306. X.br
  1307. X.ti -3
  1308. X\(bu  references to gids that have no corresponding group
  1309. X.br
  1310. X.ti -3
  1311. X\(bu  super-user and vig login names with no password
  1312. X.TP
  1313. X.B -l
  1314. X\fIMcp\fR lists each group, sig, and class and the number of members
  1315. Xin each.  The expiration dates are displayed for classes and sigs.
  1316. X.TP
  1317. X.B -s
  1318. X\fIMcp\fR will print a brief summary of the accounting information: the
  1319. Xnumber of users, groups, classes, sigs and aliases.
  1320. X.TP
  1321. X.B -v
  1322. XPrints the current \fImcp\fR version and patchlevel.
  1323. X.SH MISCELLANEOUS
  1324. XSome important things to remember when interacting with \fImcp\fR:
  1325. X.TP 3
  1326. X\(bu
  1327. XChanges are made to the accounting files ONLY when a \fBsave-changes\fR or
  1328. X\fBsave-and-exit\fR is executed.  If you have made some ghastly error and just
  1329. Xwant to abort the \fImcp\fR session, use \fBexit-mcp\fR; you will be asked
  1330. Xif you really want to exit without saving.  If you want to see what
  1331. X\fImcp\fR will do when \fBsave-changes\fR is invoked, use
  1332. X\fBdescribe-changes\fR.
  1333. X.TP
  1334. X\(bu
  1335. X\fIMcp\fR backs up each account data file (e.g. \fB/etc/passwd.bak\fR) before
  1336. Xoverwriting it.  This is only done once per \fImcp\fR session, thus the
  1337. Xbackup will represent the file before the session began, regardless of how
  1338. Xmany saves were done.
  1339. X.TP
  1340. X\(bu
  1341. X\fIMcp\fR can be configured to checkpoint all account data files (e.g.
  1342. X\fB/etc/passwd.mcp\fR) that have changed periodically during a session.
  1343. XAlso a checkpoint can be forced with the \fBcheckpoint-changes\fR command.
  1344. X.TP
  1345. X\(bu
  1346. XAt any point within a command, if \fImcp\fR is prompting you for input, you can
  1347. Xtype the interrrupt character to abort the command, without the command
  1348. Xtaking effect.
  1349. X.TP
  1350. X\(bu
  1351. X\fIMcp\fR expects lists of things to be separated by spaces, NOT commas.
  1352. XSince \fImcp\fR must handle sendmail's aliases file, words surrounded by double
  1353. Xquotes ``"'' are considered to be a single argument.  \fINote that the quotes
  1354. Xare considered part of the word, not just a delimiter.\fR
  1355. X.TP
  1356. X\(bu
  1357. XDefault responses to \fImcp\fR requests, if any, are shown in brackets
  1358. X``[]''.  If you just type return when a default response is provided, the
  1359. Xdefault response is assumed.
  1360. X.TP
  1361. X\(bu
  1362. XWhen \fImcp\fR is prompting you for information, if you are in doubt
  1363. Xabout what you are being asked, type a ? and \fImcp\fR will print the
  1364. Xcompletion list for this query, if there is one.
  1365. X.TP
  1366. X\(bu
  1367. X\fIMcp\fR tries to output only useful information to standard output.
  1368. XKeyboard input is taken through standard input but the keystrokes are echoed
  1369. Xto /dev/tty as are '?' completion list requests (see below).  What this
  1370. Xmeans is that you can re-direct \fImcp\fR's output into a file to create neat
  1371. Xclass rolls.  Just:
  1372. X.sp
  1373. X.ul
  1374. X% mcp > roll
  1375. X.sp
  1376. X\fRUse \fBdescribe-class\fR to get the roll and then \fBexit-mcp\fR
  1377. Xand you will
  1378. Xhave the class description devoid of cursor motion sequences and other
  1379. Xgarbage you would get had you used \fIscript(1)\fR.
  1380. X.SH CAVEATS
  1381. X\fIMcp\fR discards all comments in the sendmail aliases file.
  1382. X.sp
  1383. XMake sure ALL your system and daemon accounts (human or otherwise) are vig
  1384. Xmembers, lest you unwittingly freeze and later remove them.
  1385. X.SH ENVIRONMENT
  1386. X.TS
  1387. X;
  1388. Xl1 l .
  1389. XPAGER    \- pager to use instead of the default
  1390. XVISUAL    \- visual editor to use instead of the default
  1391. XEDITOR    \- for dumb terminals, editor to use instead of the default
  1392. XTERM    \- terminal type
  1393. XSHELL    \- shell to use on shell-escapes instead of the default
  1394. X.TE
  1395. X.SH SEE ALSO
  1396. X.I accounts(5), adduser(8), classes(5), group(5), passwd(5), ranges(5),
  1397. X.I shells(l), sigs(5), vigs(5), vipw(8)
  1398. X.SH BUGS
  1399. XPerhaps \fB/etc/termcap\fR should be searched to make \fImcp\fR work on odd
  1400. Xterminals.
  1401. X.sp
  1402. X\fIMcp\fR should allow the user to specify a series of productions
  1403. Xto create default user names and home directory names, instead of inflicting
  1404. XODU conventions upon all.
  1405. X.SH AUTHOR
  1406. XKyle Jones, ODU Computer Science, Norfolk, VA
  1407. X.br
  1408. X.in +4
  1409. X(with many, many helpful suggestions from Tad Guy)
  1410. @//E*O*F man/mcp.n//
  1411. if test 18435 -ne "`wc -c <'man/mcp.n'`"; then
  1412.     echo shar: error transmitting "'man/mcp.n'" '(should have been 18435 characters)'
  1413. fi
  1414. fi # end of overwriting check
  1415. echo shar: extracting "'man/ranges.n'" '(1012 characters)'
  1416. if test -f 'man/ranges.n' ; then 
  1417.   echo shar: will not over-write existing file "'man/ranges.n'"
  1418. else
  1419. sed 's/^X//' >man/ranges.n <<'@//E*O*F man/ranges.n//'
  1420. X.TH RANGES 5
  1421. X.SH NAME
  1422. Xranges \- mcp numerical user ID ranges file
  1423. X.SH SYNOPSIS
  1424. XRANGEFILE
  1425. X.SH DESCRIPTION
  1426. X.I Ranges
  1427. Xcontain the default user ID (uid) ranges that
  1428. X.I mcp(l)
  1429. Xwill use when creating accounts either in
  1430. X.B add-user
  1431. Xor
  1432. X.B load-file.
  1433. XThese ranges are indexed by group.  The file format is:
  1434. X.sp
  1435. Xgroup-name <sep> from <sep> to <sep> mode <nl>
  1436. X.sp
  1437. X.I <sep>
  1438. Xis 1 or more
  1439. Xwhitespace characters (exempting newline).
  1440. X.PP
  1441. X.I Group-name
  1442. Xis the name of the
  1443. Xgroup (in
  1444. X.B /etc/group).
  1445. X.PP
  1446. X.I From
  1447. Xand
  1448. X.I to
  1449. Xare integers which give the uid range,
  1450. X.I from \- to
  1451. Xinclusive.
  1452. XUids are searched
  1453. X.I from
  1454. Xto
  1455. X.I to,
  1456. Xso the direction of uid searches may be reversed by making
  1457. X.I from > to.
  1458. X.PP
  1459. X.I Mode
  1460. Xis either
  1461. X.I shared
  1462. Xor
  1463. X.I exclusive.
  1464. XIf the mode is
  1465. X.I shared
  1466. Xwhen another group runs out of uids or a uid is needed for a user in a group
  1467. Xwhich has no assigned range, uids in
  1468. X.I shared
  1469. Xranges may be used.  If the mode is
  1470. X.I exclusive
  1471. Xonly users in that particular group
  1472. Xmay use uids from that range.
  1473. X.SH SEE ALSO
  1474. X.I mcp(l)
  1475. @//E*O*F man/ranges.n//
  1476. if test 1012 -ne "`wc -c <'man/ranges.n'`"; then
  1477.     echo shar: error transmitting "'man/ranges.n'" '(should have been 1012 characters)'
  1478. fi
  1479. fi # end of overwriting check
  1480. echo shar: extracting "'man/shells.n'" '(653 characters)'
  1481. if test -f 'man/shells.n' ; then 
  1482.   echo shar: will not over-write existing file "'man/shells.n'"
  1483. else
  1484. sed 's/^X//' >man/shells.n <<'@//E*O*F man/shells.n//'
  1485. X.TH SHELLS ODU
  1486. X.SH NAME
  1487. Xshells \- mcp list of command interpreters
  1488. X.SH SYNOPSIS
  1489. XSHELLFILE
  1490. X.SH DESCRIPTION
  1491. X.I Shells
  1492. Xcontains a list of the available shells on this system, one per line.
  1493. XComments are delimited by `#' and newline.
  1494. XThis list will be read by the
  1495. X.I mcp(l)
  1496. Xprogram on startup and used to build a completion list during the provess
  1497. Xof adding users.  The shells should be listed as full pathnames, e.g.
  1498. X.I csh(1)
  1499. Xwould be listed as
  1500. X.B /bin/csh.
  1501. X.PP
  1502. XThe first shell given in the file is special because it is
  1503. Xconsidered to be the
  1504. X.B default shell
  1505. Xby
  1506. X.I mcp
  1507. Xand will be used whenever the user opts not to specify a shell.
  1508. X.SH SEE ALSO
  1509. X.I mcp(l)
  1510. @//E*O*F man/shells.n//
  1511. if test 653 -ne "`wc -c <'man/shells.n'`"; then
  1512.     echo shar: error transmitting "'man/shells.n'" '(should have been 653 characters)'
  1513. fi
  1514. fi # end of overwriting check
  1515. echo shar: extracting "'src/alias.h'" '(173 characters)'
  1516. if test -f 'src/alias.h' ; then 
  1517.   echo shar: will not over-write existing file "'src/alias.h'"
  1518. else
  1519. sed 's/^X//' >src/alias.h <<'@//E*O*F src/alias.h//'
  1520. Xstruct    alias {
  1521. X    char        *al_name;
  1522. X    struct list    al_addresses;
  1523. X    struct list    al_groups;
  1524. X    struct list    al_classes;
  1525. X    struct list    al_sigs;
  1526. X};
  1527. X
  1528. Xstruct    alias *getalent(), *getalnam();
  1529. @//E*O*F src/alias.h//
  1530. if test 173 -ne "`wc -c <'src/alias.h'`"; then
  1531.     echo shar: error transmitting "'src/alias.h'" '(should have been 173 characters)'
  1532. fi
  1533. fi # end of overwriting check
  1534. echo shar: "End of archive 2 (of 8)."
  1535. cp /dev/null ark2isdone
  1536. DONE=true
  1537. for I in 1 2 3 4 5 6 7 8; do
  1538.     if test -! f ark${I}isdone; then
  1539.         echo "You still need to run archive ${I}."
  1540.         DONE=false
  1541.     fi
  1542. done
  1543. case $DONE in
  1544.     true)
  1545.         echo "You have run all 8 archives."
  1546.         echo 'See the README file'
  1547.         ;;
  1548. esac
  1549. ##  End of shell archive.
  1550. exit 0
  1551.