Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 1997 21:01:34 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        Tim Tsai <tim@futuresouth.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: multi-user adduser
Message-ID:  <Pine.BSF.3.96.970409205959.4997c-100000@localhost>
In-Reply-To: <199704100321.WAA06433@shell.futuresouth.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

What happens if you need to edit the password file?  You need a way of
completely freezing out adduser while you use vipw (if someone messes up
their shell, for instance).  (same for chpass, chsh, etc...)

> > 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.

If you can queue the adduser requests (or even roll your own that handles
concurrent password database acces) that would work better than fighting
one another.

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970409205959.4997c-100000>