From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076337821782.tru64-unix-managers.marc@archive.invalid> From: Craig Makin Date: Fri, 30 Aug 1996 17:03:21 +0000 To: tru64-unix-managers Subject: SUMMARY: Non-privileged user to reset passwords? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076337821782 APPOLOGIES FOR NOT RESPONDING SOONER........ THANKS TO ALL OF YOU THAT RESPONDED, GREAT HELP I ended up testing and implementing "sudo". It works well, I has allowed me to setup a script/menu system for the helpdesk and get them to do the "hack" work or resetting passwords. I have also implemented a system to expire passwords under C2 using permissions gained under "sudo". One good feature is its logging of allowed and denied accesses. Once again thanks to all of you. Regards, Craig Makin System Administrator Ferntree Computer Corp. Perth, Australia PS. Thanks to Kent Arnott for reminding me to post this summary=20 COMPLETE LIST OF REPLIES FOLLOWS: From: rosenblg @ nyu.edu =20 we wrote exactly that thing; let me know if you want it - it's not great, it works by allowing users in a specified group to reset passwords. however it works for us, and it works with C2-level security. gary From: yakoshi @ osa.dec.com ("Akihito 'ycos' Yakoshi") =20 Hi Craig, Do you want run a shell-script with stikey? then try use wrappiner program. main() { setuid(0); system( "YOUR SCRIPT HERE" ); } * SCRIPT name FULL-PATH only! for security. and use this wrapper. +----------------------------------------------------------------------+ | Akihito Yakoshi | Digital Equipment Co. Japan | | EMail to: yakoshi@osa.dec.com | PSC/SI WJ4 Ext. 8+682-9400 | | or yakoshi@osa.dec-j.co.jp | KTOSWS::YAKOSHI(EASYnet,VAXmail) | +----------------------------------------------------------------------+ From: smadden @ csu.EDU.AU ("Steve Madden (Unix Systems Programmer)") =20 Hi Craig, Yes I have an operator menu that activates when operator logs in. One of the options is change password, upon selecting that they are=20 prompted for a username, then for a change password password (so they can= =20 leave the menu up all day and not worry about abuse at lunch or whatever)= =20 so an admin passwd must be supplied for each change. Then I check the=20 group of the user they are trying to change, they are only allowed to=20 change gid 7000 and the whole occurance is logged in /var/adm. It is=20 secure, captures all sigs, and logs them out if they try anything tricky. Sounds good doesn't it? Well this is how I did it... 1) I wrote the menu program in Perl, which resides in their home directo= ry. 2) The menu option that calls for a password change, gets the user=20 information, checks the validity (they are allowed), and calls a=20 passwd.pl program - also written in perl. 3) The passwd.pl program first takes in the username parameter and then=20 asks for the supervisor password. 4) If the given password is correct and a valid userid is passed, the sc= ript (This part is cute) writes its own little (5 line) c program to force= the execution of passwd as root for that user only. 5) Then it compiles it, runs it and removes it. 6) The user only sees enter username, and if valid enter new password an= d verify new password and then returns to the menu.=20 7) It sounds slow, but its actually so fast no-one believed thats how I = was doing it. Scripts and Code to those genuinely impressed and willing to leave my=20 name intact in the scripts. Steve.. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Steve Madden Phone: 61 (069) 332823 Unix Systems Programmer Email: smadden@csu.edu.au Charles Sturt University - Australia=20 Riverina Campus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "The BEST way to accelerate a Mac is at 9.8 metres/sec (/sec)"=20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From: haymanr @ icefog.sois.alaska.edu ("Randy M. Hayman") =20 I've got some code to do just this sort of thing, but the change-password utility (user_cpw) among others comes as part of an account maintenance package. If you're interested, you can get the source, docs, and setld installable package via anonymous ftp or point your browser at: ftp://raven.alaska.edu/pub/randy/zuausr/zuausr-1.08a.tar.gz Randy M. Hayman haymanr@icefog.alaska.edu From: henckens @ luc.ac.be (Andres Henckens) =20 I haven't tried it out on a DU system, but SUDO is a program to give=20 partial root access to users. You have to define what program a user=20 should have access to in it's conf file and..tadaa.. I don't know if it=20 will work together with DU/C2. Maybe worth a shot ? Greetz, Andres Algemene Informatica Service 'Nostalgie schenkt ons dromen Limburgs Universitair Centrum wetend dat je nooit alleen =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D je gedachten hoeft te behouden' phone : +32-11-268130 +32-11-268131 fax : +32-11-268199 From: nicolis @ chiral.phys.univ-tours.fr (Stam Nicolis) =20 Hi, normally (i.e. under non-C2 conditions) sudo wiould do the trick--I don't= =20 know whether C2 has some extra stuff that need to be tweaked to make this possible at all (under sudo at least).=20 Hope this helps :) Stam From: kjell.andresen @ usit.uio.no (Kjell Andresen) =20 Is sudo what you look for? Kjell Andresen Systems administrator, University of Oslo, Norway Center for Information Technology Services and Department of Geophysics From: vanhelde @ odo.msoe.edu (Phil VanHelden) =20 A small C program that runs setuid root should do it. It would ask for the name of the user, and then fork a process, exec'ing passwd. If you want a specific implementation example, let me know. \|/ ####### / ~ ~ \ (| 0 0 |) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D/ \=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D _|____ (___) ____|_ (____(_) Phil VanHelden (_)____) (______(_) System Administrator MSOE Comp. & Comm. Services (_)______) (_____(_) (414) 277-7286 1025 N. Broadway (_)_____) (___(_) vanhelde@msoe.edu Milwaukee WI 53202 (_)___) | "'Good enough' is my least favorite phrase." - Tom Scholz | =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D From: xxfdh @ omega.uta.edu ("Mr. Dustin Fu") =20 Graig, There is a program call 'sudo' (from University of Colorado) you may find= =20 that helpful. ftp://boulder.colorado.edu/pub/mnt/source/doc/sa-book/sudo. Dustin Fu Software Systems Specialist Academic Computing Services University of Texas at Arlington xxfdh@omega.uta.edu 817-272-2208 From: de5 @ sws5.ctd.ornl.gov (Dave Sill) =20 1) Sticky bit <> setuid bit. 2) Setuid scripts, even if they work, are a *very* bad idea. 3) You probably want a setuid wrapper written in C to call the script. -Dave =20 From: webster @ i5142311.mdc.com (Tom Webster) =20 Craig, Speaking as someone who hasn't actually done it: Try sudo. Sudo is a pac= kage that lets you deligate root authority for selected commands to selected u= sers. Which commands individual users are allowed to run as root are configured= via a text tile. The user has to enter their own password before the command = is=20 run as root, to verify their identity. In your case the command would lo= ok=20 something like: sudo passwd joeluser Sudo is available on most of the security sites. I know it works with DU with the 'BASE' security set. I don't remember if everything that is nee= ded to make it work with DU and C2 is 'in the box' of if you need a patch. I= f=20 it doesn't work, this mailing list would be where to find out. (If you do find that you need a seperate patch to ame it work, please send me an e-mail -- or post a pointer to the patch in your summary. I will be migr= ating some if not all of our DU boxes to C2 in the near future.) Hope this helps, Tom -- +--------------------------------+------------------------------+ | Tom Webster | "Funny, I've never seen it | | webster@kaiwan.com (home) | do THAT before...." | | webster@ssdgwy.mdc.com (work) | - Any user support person | +--------------------------------+------------------------------+ | finger -l webster@kaiwan.com to get my PGP Public Key. | +---------------------------------------------------------------+ =20 From: abs @ osfulsa.ulsa.mx ("Alejandro Arturo Barrera Sanchez(ZOR)") =20 I have never worked with C2 but have you tried installing sudo. Sudo lets you execute programs with real root privilegs, i know that it a= =20 security hole, but maybe you can try. Alejandro A. Barrera Sanchez(ZOR) abs@osfulsa.ulsa.mx Universidad La Salle abs@hpuxulsa.ulsa.mx=20 Cibernetica X11=20 Tel=02=ACfono: 389-4599=20 SistAcad:728-0500 ext.2069=20 From: trevor.stott @ sheridanc.on.ca (Trevor Stott) =20 You could write a program (expect is a good choice) to trap certain=20 usernames then calls passwd. Once that is done you could compile sudo an= d=20 use "sudo program-name". I'm sorry I can't remember where I got sudo=20 originally but it works great! Trevor. -------------------------------------------------------------------------= ----- Trevor Stott Trevor.Stott@sheridanc.on.= ca Information Technology Sheridan College Phone: (905) 845-9430 ext. 2148 Oakville, Ontario Fax: (905) 815-4011 -------------------------------------------------------------------------= ----- From: win @ tukan.ffb.eunet.de (Winfried Huber) =20 Hi Craig, the reason why your attempt to change other users passwords via a setuid-script is that for security reasons the setuid-bit for shell scripts is ignored. Two ways out of the jungle: 1. Write and compile a wrapper program with the setuid bit set that calls passwd. You can make sure only your helpdesk operators run this program simply by checking their uid from within the wrapper or make it executable for members of their group only. 2. perhaps the better way: get sudo. This is program that allows you to maintain a (easy managable) data base that allows you to give some privileges to specific users. All you have to do is install sudo and edit the file /etc/sudoers. You can get sudo from ftp://ftp.cs.colorado.edu/pub/sysadmin/utilities/cu-sudo.v1.4.tar.Z it's free. hope this helps, Winfried --=20 Winfried Huber, Softwarehaus Huber & Boehm, voice: +49 8142 13038 Illerweg 6, D-82140 Olching, Germany fax: +49 8142 18612 win@tukan.ffb.eunet.de =3D=3D win@tukan.m.isar.de =20