home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / sysadmin / 4371 < prev    next >
Encoding:
Text File  |  1992-07-25  |  3.1 KB  |  68 lines

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!news
  3. From: lga@sandman.stanford.edu(Laurent Amon)
  4. Subject: Re: A non-root user running UserManager?
  5. Message-ID: <1992Jul25.194016.3331@leland.Stanford.EDU>
  6. Sender: news@leland.Stanford.EDU (Mr News)
  7. Reply-To: amon@cs.stanford.edu
  8. Organization: DSO, Stanford University
  9. References: <BryC9r.Ksr@ux1.cso.uiuc.edu>
  10. Distribution: na
  11. Date: Sat, 25 Jul 92 19:40:16 GMT
  12. Lines: 54
  13.  
  14. In article <BryC9r.Ksr@ux1.cso.uiuc.edu> lemson@ux1.cso.uiuc.edu (David Lemson)  
  15. writes:
  16. >  gungner@cs.ucla.edu (David Gungner) writes:
  17. >  
  18. >  >Does anybody know of a way to reconfigure UserManager so that a few
  19. >  >non-root users (but they are in the group "wheel") can add new users?
  20. >  >I want to grant a few maintenance people the ability to add new users
  21. >  >without giving out the root password.
  22. >  
  23. >  Couple ways to do it:
  24. >  Theoretically, if you make UserManager mode 4750, and make its group
  25. >  'wheel', then anyone in wheel can run it and it should think that
  26. >  you are root (it's setuid).  I haven't tried this, though.  It's
  27. >  possible that this won't work, though (as a security precaution
  28. >  inside UserManager).
  29.  
  30. UserManager is already set-uid root. It couldn't function if it were not.
  31. So it is not possible, I think, to make it functional for the whole wheel
  32. group. It would in fact enable anybody in the wheel group to go root by 
  33. modifying the root account (removing the password, for instance) or
  34. creating a user entry with 0:1 as its user and group number, effectively
  35. creating another root entry. This is definitely not secure.
  36.  
  37. > Another way to do it would be to whip up a little perl script that
  38. > takes userid, name, uid, password in from the user and then does a
  39. > call to nu -A that creates users from the command line.  The perl
  40. > script would have to be setuid.  That ought to work, too.
  41. > (I say do a Perl script because it's more secure than a shell
  42. > script - or put a C wrapper around a shell script and that would be
  43. > OK too)
  44.  
  45. Use a Perl script. A shell SUID script is not secure. A wrapper, if 
  46. correctly done should be OK, but Perl is perfect for that kind of things.
  47. What you want is a script that does the above, but with the following
  48. restrictions:
  49. - Do not allow modification of an existing account.
  50. - Do not take the uid from the command line, but assign one (i.e. not
  51. 0 or any duplicate uid).
  52. - Do not take a gid, but a list of groups you want the new user to belong to.
  53. Once again, test and forbid all ``dangerous'' accounts, like wheel, staff,
  54. daemon, sys, bin, uucp, kmem, news, tty, operator, ingres.
  55. - Put any other restrictions you like so as not to rule over an anarchic 
  56. system.
  57.  
  58. Like that it should work. However, if you do anything less than that, you 
  59. might as well give the root passwd to the wheel people. It's less hassle. 
  60.  
  61. Lga.
  62. ---
  63.                                        |"I don't know what it's called, but
  64. Laurent Amon                           | we're doing one about going to see 
  65.        e-mail: amon@cs.stanford.edu    | a wizard. Something about following
  66.            lga@sandman.stanford.edu    | a yellow sick toad. (Moving Pictures)
  67.