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

Re: perl or libc6 bug?: getpwnam('root') in NIS environment



On Wed, Apr 14, 1999 at 11:55:33AM +0200, Heiko Schlittermann wrote:
> Hi,
>
> I'm just trying to write an short prototype for an external
> authenticator for squid and discovered the following:
>
>     #! /usr/bin/perl
>     print (getpwnam('root'))[1], "\n";
>
> returns the root encrypted password from the NIS-Servers /etc/shadow ...!!

Are you running this as root? If not then you have some other anomoly,
since perl doesn't run with enough privs to read /etc/shadow (unless
you have shadow passwords disabled, in which case there is no problem).

--
-----    -- - -------- --------- ----  -------  -----  - - ---   --------
Ben Collins <b.m.collins@larc.nasa.gov>                  Debian GNU/Linux
OpenLDAP Core - bcollins@openldap.org                 bcollins@debian.org
UnixGroup Admin - Jordan Systems         The Choice of the GNU Generation
------ -- ----- - - -------   ------- -- ---- - -------- - --- ---- -  --


Reply to: