Bug 82

Summary: sudo useradd .... produces unexpected results
Product: Sudo Reporter: Torquil_Gault
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: normal    
Version: 1.6.5   
Hardware: HP   
OS: HP-UX   

Description Torquil_Gault 2002-05-13 00:53:13 MDT
if you run this command on HP-UX (v11.0) it adds all groups to the user and not
just what are specified:
   sudo useradd -m -d "/home/x/xxx" -c "XXX User" -g group1 xxx

if you run this as root then it only adds it to the right groups ......
Comment 1 Todd C. Miller 2002-12-13 11:01:25 MST
That sure sounds like a bug in useradd, not sudo.  Could it be taking the default for secondary groups from the invoking user?  If so, that would be very strange.  You might run "useradd -D" and see what your defaults are set to.
Comment 2 Todd C. Miller 2004-08-05 18:06:18 MDT
Unable to reproduce on a patched HP-UX 11.00 system.