Re: Adding users to groups in postinst
On Wed, 16 Apr 2003, Thomas Viehmann wrote:
> Now, if the dialout group entry contains nonexistent groups, above code fragment
> will die with
> gpasswd: unknown user nonexistent
> adduser: `/usr/bin/gpasswd -M nonexistent,chipcard dialout'
> returned error code 1. Aborting.
I was about to say "bug in gpasswd", but that fragment of code in adduser is
really weird. Why gpasswd -a wasn't used, I have no idea.
> - file a bug against adduser or gpasswd?
I'd ask Roland (adduser's maintainer) why he's using gpasswd -M. There's
gotta be a reasonable explanation, but there's no comment (apart from "there
is a race condition" a couple of lines up).
> - improve the postinsts handling of the situation
I think that your config script is in the right. You're not supposed to
know what the story is with users and groups - that's adduser's (and, by
extension, all the other utilities involved) problem.
> Note that access to the serial/usbtty ports is vital to the daemon in the
> package.
Heh. 'chmod 666 /dev/*' would work... <grin>
--
-----------------------------------------------------------------------
#include <disclaimer.h>
Matthew Palmer, Geek In Residence
http://ieee.uow.edu.au/~mjp16
Reply to: