home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1350 / readme < prev    next >
Text File  |  1990-12-28  |  3KB  |  75 lines

  1.                  MS-DOS passwd library
  2.                    Stephen C. Trier
  3.  
  4.      In the process of porting UNIX software to MS-DOS, especially news and
  5. mail packages, I've run into a need for the UNIX-style password file
  6. functions.  This time I couldn't find a different way out, so I whipped up
  7. these functions.  They aren't secure, and they aren't intended to be.  Instead,
  8. they are meant to access the second function of the UNIX passwd file, which is
  9. to contain information about various users.  This they should do well.
  10.  
  11.      I cannot guarantee that these functions are a wonderfully exact clone of
  12. the UNIX versions; there may even be some big differences.  This is because I
  13. have no real documentation available about the UNIX versions.  However, that
  14. also means that I am free to place my version in the public domain.  Use it as
  15. you wish, and I would be quite interested in hearing of any changes or
  16. improvements you make.
  17.  
  18.      There is a simple makefile included, but it is not capable of building
  19. more than one library at a time.  That's a bit beyond my makefile-writing
  20. ability, so if you want a fully-automated, whiz-bang makefile, you'll have to
  21. write it yourself.  (I'd be rather interested in such a beast, to tell the
  22. truth.)
  23.  
  24.      Hope these are useful to you.
  25.  
  26.           Stephen
  27.  
  28.  
  29.  
  30. How to reach me by email:
  31.    sct%seldon@scl.cwru.edu
  32.    sct@po.cwru.edu if your mailer doesn't undertand "%" syntax.
  33.  
  34.  
  35. Sample output from the test program:
  36.  
  37. ---------- cut here ----------
  38. Name: user1  Password: password1  User Num: 1  Group Num: 11
  39. Full Name: Joe User  Home Dir: \homes\user1  Shell: sh1
  40.  
  41. Name: user2  Password: password2  User Num: 2  Group Num: 12
  42. Full Name: Joe User Jr.  Home Dir: \homes\user2  Shell: sh2
  43.  
  44. Name: user3  Password: password3  User Num: 3  Group Num: 13
  45. Full Name: Joe User III  Home Dir: \homes\user3  Shell: sh3
  46.  
  47. setpwent returns 0
  48. Name: user1  Password: password1  User Num: 1  Group Num: 11
  49. Full Name: Joe User  Home Dir: \homes\user1  Shell: sh1
  50.  
  51. Name: user2  Password: password2  User Num: 2  Group Num: 12
  52. Full Name: Joe User Jr.  Home Dir: \homes\user2  Shell: sh2
  53.  
  54. Name: user3  Password: password3  User Num: 3  Group Num: 13
  55. Full Name: Joe User III  Home Dir: \homes\user3  Shell: sh3
  56.  
  57. setpwent returns 0
  58. Finding user3: user3
  59. Finding user1: user1
  60. Finding user2: user2
  61. Finding user4: NULL  (Should be NULL)
  62.  
  63. Finding user id 2: user2
  64. Finding user id 1: user1
  65. Finding user id 3: user3
  66. Finding user id 4: NULL  (Should be NULL)
  67.  
  68. endpwent returns 0
  69. --------- cut here ---------
  70.  
  71. Remember that in order to get this output, one of the following must be true:
  72. (1) the included "passwd" file is in \etc\passwd, or (2) the $PASSWD
  73. environment variable must point to its location.  (set PASSWD=passwd is
  74. probably sufficient.)
  75.