Operating System - HP-UX
1833151 Members
3362 Online
110051 Solutions
New Discussion

usermod different from system to system

 
Matt Hearn
Regular Advisor

usermod different from system to system

Hi! I'm trying to remove the secondary groups from various users. On some servers, this works:

usermod -G "" user

But on others, that gives me:
"Group does not exist
Group list specified with -G is invalid"

On those boxes I have to do:

usermod -g currentprimarygroup user

And it wipes out the secondaries. Why is this? Did something get patched, and I missed it? I'm not going to say that all of our systems are patched EXACTLY the same, but they should be pretty close. If someone knows what patch would have done this I can get it applied universally.

2 REPLIES 2
Matt Hearn
Regular Advisor

Re: usermod different from system to system

Ah, this is telling; a "what /usr/sbin/usermod" gives me different stuff:

/usr/sbin/usermod:
usermod.c $Date: 2006/02/27 07:01:41 $Revision: r11.11/16 PATCH_11.11 (PHCO_33142)
ugm_cmn.c $Date: 2006/02/27 07:01:46 $Revision: r11.11/18 PATCH_11.11 (PHCO_33142)
$Revision: jazz @ 20060228.07:57:57PST; jmkvw -proj integ -RW PHCO_33142 r11.11(R11.11_BL2006_0228_1) ;

/usr/sbin/usermod:
usermod.c $Date: 2008/06/25 01:52:11 $Revision: r11.11/18 PATCH_11.11 (PHCO_38492)
ugm_cmn.c $Date: 2008/06/25 01:44:07 $Revision: r11.11/20 PATCH_11.11 (PHCO_38492)
$Revision: jazz @ 20081106.00:28:37PST; jmkvw -proj integ -RW PHCO_38492 r11.11(R11.11_BL2008_1106_1) ;
James R. Ferguson
Acclaimed Contributor

Re: usermod different from system to system

Hi Matt:

I would apply PHCO_38492 .

Regards!

...JRF...