[Pkg-shadow-devel] usermod & LDAP

Nicolas François nicolas.francois at centraliens.net
Fri Jul 11 21:50:46 UTC 2008

Hi Dan,

On Fri, Jul 04, 2008 at 05:02:36PM +0200, dkopecek at redhat.com wrote:
> Hi,
>  we have recently received a bug report for shadow-utils, here is the
> description: When trying to add LDAP users to local groups, the utility
> usermod errors out with "usermod: <username> not found in /etc/passwd".
> Other utilities, like gpasswd, include support for LDAP users.  This
> should also work for usermod.
> The attached patch contains a possible solution for
> this issue. The problem is that usr_update() fails if the specified user
> has no record in passwd db.

Thanks for the patch, and sorry for the delay.

Yes, usr_update() does not have to be called is those cases. I checked
 * the user is already checked in process_flags with getpwnam()
 * usr_update() does something (in addition to checking the user against
   the passwd file) only if the flags you listed are set.

I just made some changes in the list of options you used: I removed
aflg and mflg.

Best Regards,

More information about the Pkg-shadow-devel mailing list