[Pkg-shadow-devel] Configuring shadow utilities to work with/without shadowed files?

Scott Garman scott.a.garman at intel.com
Wed May 25 23:30:20 UTC 2011

On 05/23/2011 06:01 PM, Scott Garman wrote:
> Hi there,
> I tried searching for this question in your list archives but they do
> not seem to be accessible:
> http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/
> The Yocto Project is making use of shadow in its embedded build system.
> We'd like to support both shadowed and non-shadowed system
> configurations. The behavior we're looking for is for the user/group
> management utilities to modify the shadow/gshadow files if they exist,
> but continue to work if they are not found.
> Is this something currently supported by this project? I'm encountering
> errors when trying to use the utilities against non-shadowed
> passwd/group files. And I see one build-time option to enable/disable
> gshadow support (--enable-shadowgrp).

Sorry, this was my mistake.

In our build system we maintain target sysroot environments, and I have 
patched the shadow utilities to chroot() into the sysroot by adding 
another command-line parameter. I put the chroot() within the 
process_flags() function. However, the is_shadow_pwd/grp booleans get 
set in main() before process_flags() is entered. So the utilities were 
checking my host environment for shadow files, not the sysroot. I have 
now been able to work around this.

My apologies for the noise. :)


Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center

More information about the Pkg-shadow-devel mailing list