home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1475 / README < prev   
Encoding:
Text File  |  1990-12-28  |  3.7 KB  |  100 lines

  1.  
  2. This program was written from inspiration I got at the UNIX System V release 4.0
  3. Software Developer's conference I attended back in 1988 in Chicago, Il.
  4. During the "Q&A" session I asked the following question:
  5.  
  6. Q:    "Will the previously undocumented feature of /bin/login for
  7.      Dialup Passwords be documented, as well as, having appropriate
  8.      utilities to manage adding and removing dialup passwords?"
  9.  
  10. A:     No, it will remain undocumented and therefore will have nothing
  11.      on the system to manage those passwords.
  12.  
  13. Spending about 20 minutes, I decided to write my own.  Previously I had to
  14. kludge it by adding the program/pathname to /etc/passwd, executing the
  15. "passwd" command and then moving the encrypted password to /etc/d_passwd.
  16. This was quite a pain, especially as a system administrator.  Enclosed
  17. is a program I call, "dpasswd".  It basically handles the undocumented feature
  18. that was in AT&T's UNIX System V release 2.0 and beyond (/bin/login).
  19.  
  20. For those who are unsure what I'm talking about, here's a brief explanation.
  21. /bin/login will look in a file called /etc/dialups for tty devices that
  22. are to be declared as "dialups".  The format of the file is /dev/tty names
  23. terminated by newline.   If the login tty is found in /etc/dialups, it will
  24. then go to /etc/d_passwd, and look for your "login-default shell" in there.
  25. The format of this file is:
  26.     login_default_shell_path:encrypted_passwd:
  27.  
  28. If your terminal is in the /etc/dialups file and you are logging in on that
  29. terminal, you will then prompt you for "Dialup Password:" after you enter 
  30. your initial password correctly.  If you enter the dialup password
  31. incorrectly, you will be denied login.
  32.  
  33. Programs like /usr/lib/uucp/uucico should be placed in the /etc/d_passwd file,
  34. but should have null passwords (using the -n flag).  (This will prevent having 
  35. to give people with uucp logins another password -- you can give them one, 
  36. if you so desire).
  37.  
  38. Sample files are as follows:
  39.  
  40. /etc/dialups:
  41. -------------
  42. /dev/tty000
  43. /dev/ph1
  44.  
  45. /etc/d_passwd:
  46. --------------
  47. /bin/sh:5N2JYZGqf8wnM:
  48. /bin/ksh:UeH0wlIpW0gyQ:
  49.  
  50. Usage:  dpasswd [-q] [-n] [-d] -p program -t terminal
  51.  
  52. -q        be silent about changes
  53. -n        make the password null
  54. -d        delete restriction
  55. -p program    add (or delete) restriction for program (use full pathname)
  56. -t terminal    add (or delete) restriction for terminal (don't use "/dev/")
  57.  
  58. eg.
  59.  
  60. # dpasswd -q -t tty001 -p /bin/sh
  61. # dpasswd -q -t /dev/ph1
  62. # dpasswd -q -p /bin/ksh
  63.  
  64. # dpasswd -t tty001
  65. dpasswd: Dialup terminal restriction added for /dev/tty001.
  66.  
  67. # dpasswd -t tty001
  68. dpasswd: Terminal /dev/tty001 already found in /etc/dialups.
  69.  
  70. # dpasswd -t ph1 -p /bin/ksh
  71. New Dialup Password:
  72. Retype Dialup Password:
  73. dpasswd: Dialup terminal restriction added for /dev/ph1.
  74. dpasswd: Dialup program restriction added for /bin/ksh.
  75.  
  76. # dpasswd -d -t ph1 -p /bin/ksh
  77. dpasswd: Dialup terminal restriction removed for /dev/ph1.
  78. dpasswd: Dialup program restriction removed for /bin/ksh.
  79.  
  80. # dpasswd -n -t ph1 -p /bin/ksh
  81. dpasswd: Dialup terminal restriction added for /dev/ph1.
  82. dpasswd: Dialup program restriction added for /bin/ksh.
  83.  
  84. Appropriate "messages" will be given for all cases.  
  85.  
  86. If the program is compiled with the -DDEBUG flag, then diagnostic output 
  87. will accompany the normal output.
  88.  
  89. If the program is compiled with the -DTEST flag, then the program will be
  90. placed in testing mode, and the pathnames for the dialup password files
  91. will be your current directory.
  92.  
  93. Any problems, corrections, criticisms, and modifications, should be directed
  94. to me.
  95.  
  96. ===
  97. | Lenny Tropiano           ICUS Software Systems        lenny@icus.ICUS.COM |
  98. | {ames,pacbell,decuac,sbcs,hombre,rayssd}!icus!lenny   attmail!icus!lenny  |
  99. +------ ICUS Software Systems --  PO Box 1;  Islip Terrace, NY  11752 ------+
  100.