Date: Thu, 10 Apr 1997 11:54:25 +0800 (WST) From: Adrian Chadd <adrian@obiwan.aceonline.com.au> To: Tim Tsai <tim@futuresouth.com> Cc: dwhite@resnet.uoregon.edu, questions@freebsd.org Subject: Re: multi-user adduser Message-ID: <Pine.BSF.3.95q.970410115217.2157C-100000@obiwan.aceonline.com.au> In-Reply-To: <199704100321.WAA06433@shell.futuresouth.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I was about to say that :) The best way would be to write a script that took the relevant information, and appended it to a file (somewhere not world-readable:) Then every 5 minutes cron another script to run that goes though each line in the file, extracts the info, and runs adduser -batch per line. Then delete the file. :) Again, there might be some race problems (say youre about to add something or half way there when the script decides to add the users).. obviously a little thought is needed. Anyone? Or am I going to have to implement what I suggested (again? :) Cya -- Adrian Chadd | UNIX, MS-DOS and Windows ... <adrian@psinet.net.au> | (also known as the Good, the bad and the | ugly..) On Wed, 9 Apr 1997, Tim Tsai wrote: > > > Does anybody have an adduser script that's multi-user compatible? We > > > need a script where our staff members can run it simultaneously without > > > worrying about UID conflicts, etc. > > > Editing the password file simultaneously is asking for trouble. I don't > > think it is possible, as one person will spam the changes another makes. > > Actually we just need to add users. Only one person (me) would edit > the password file. I looked at the code some last night and it doesn't > seem too bad. All we really need is to make sure the UID/GID is unique > which can be done via an external lock file. The rest of the program > already handles locking, etc. correctly. Is there anything else I am > missing? > > > You have too many people adduser'ing ;) > > Well, it's convenient to be able to add new users while we're on the > phone with them and check for problems. We add users at multiple > locations so having one person to do it all isn't very practical. > > Our billing software has an Unix interface that would call adduser as > a daemon, actually. Perhaps it's time for us to install that. > > Thanks, > > Tim >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970410115217.2157C-100000>