[Adduser-devel] Bug#410366: adduser: adduser --group --gid <GID> <GROUP> advertised but fails

Justin Pryzby justinpryzby at users.sourceforge.net
Sat Feb 10 05:12:12 CET 2007


Package: adduser
Version: 3.102
Severity: normal
Tags: patch

/usr/sbin/adduser -h
adduser --group [--gid ID] GROUP
addgroup [--gid ID] GROUP
   Add a user group

/usr/sbin/adduser --group --gid 12345 foo
adduser: The --group, --ingroup, and --gid options are mutually exclusive.

Included is a patch which Fixes the Glitch in an intuitive way.  I've
not analyzed the consequencses or implications, however.

--- /usr/sbin/adduser	2007-02-09 23:07:17.000000000 -0500
+++ /tmp/adduser	2007-02-09 23:07:27.000000000 -0500
@@ -137,7 +137,7 @@
 if( defined($configfile) ) { @defaults = ($configfile); }
 
 # detect the right mode
-my $action = $0 eq "addgroup" ? "addgroup" : "adduser";
+my $action = ($0 eq "addgroup" || defined($found_group_opt)) ? "addgroup" : "adduser";
 if (defined($found_sys_opt)) {
   $action = "addsysuser" if ($action eq "adduser");
   $action = "addsysgroup" if ($action eq "addgroup");




More information about the Adduser-devel mailing list