[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getpwnam under chroot



On Mon, Oct 28, 2002 at 12:33:47PM -0500, Don Hayward wrote:
> I'm trying to set up an arrangement that requires an application
> (samba/smbd) to run under chroot.  It fails to find users, failing at
> getpwnam.  Also under chroot 'getent passwd user' and a perl script
> that calls getpwnam return null.  All these work as expected when not
> under chroot.
> 
> I have replicated /etc/passwd,shadow,group,nsswitch.conf and the pam.d
> directory relative to the chroot directory tree, as well as the
> libraries and loader seen in each with ldd.
> 
> I've tried a few variations the nsswitch.conf which is currently
> 'passwd: compat', such as 'passwd: files nis' (this machine is an NIS
> slave server) with no change.
> 
> Is this a feature of getpwnam or have I missed some aspect of setup.

It sounds like you missed the /lib/libnss_* modules.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: