Re: Adding and removing a user automatically
Adam P. Harris writes:
>
> [You (Martin Schulze)]
> >On Wed, Mar 04, 1998 at 10:28:08PM -0600, Zed Pobre wrote:
> >> Could someone point me in the direction of some sample shell script code
> >> that will let me check to see if a given username already exists with a
> >> given group ID? I'm trying to finesse my IRAF installation script, and
> >> just brute-force calling adduser on every install seems a little ugly.
> >> I've examined the adduser code and suspect that I might be able to write a
> >> similar custom routine manually in perl based upon it, but that's going to
> >> add a dependency to the package, and is also going to be hard on my nerves
> >> :)
> >
> >Take a look at the postinst script of msqld.
>
> Um! Adding users is a gross violation of policy. From section 3.2:
>
> No package except base-passwd may modify /etc/passwd, /etc/shadow, or /etc/group.
>
> Do we need to file an "important" level bug against msqld? Does that
> package actually create a user?
If you use an /etc/passwd from hamm, I guess no. The passwd
maintainer hasn't added the user for me for a long time, even in
bo it is non-existant. This means that the postinst has to
create it otherwise the package can't work. Period.
A package that needs a special user that wasn't included in old
/etc/passwd files can't rely on its existance. Nobody would update
his/her /etc/passwd after running the system for several months.
All the local users would get lost. This means no package may
rely on these users.
Regards,
Joey
--
/ Martin Schulze * joey@infodrom.north.de * 26129 Oldenburg /
/ A mathematician is a machine /
/ for converting coffee into theorems /
--
E-mail the word "unsubscribe" to debian-devel-request@lists.debian.org
TO UNSUBSCRIBE FROM THIS MAILING LIST. Trouble? E-mail to listmaster@debian.org .
Reply to: