Subject: Shadow passwd, simple module
From: [email-masked] (Bart de Vries)
Date: 25 Jul 1996 18:04:34 GMT
Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc

As I announced a week ago I would make a simple module available for
retrieving shadow passwords.

I have made two versions (Shadows, and Shadowf). The first doesn't
return the 'aging fields'. The second does.
Of course it would be better to have te two functions in one module,
but I decided that you use either the small or the full version.
(I only use the small version to verify passwords).
As I stated before, the right to obtain a password of a user (encrypted)
depends on several system conditions.
The module is only an implementation of the getspnam(3c) funtion.

The package is available as:

ftp://ftp.eur.nl/pub/homebrew/Shadow-0.01.tar.gz

=================The documentation

NAME
    Shadow - Perl5 extension for accessing shadow and/or
    nispasswords

SYNOPSIS
      use Shadow;
      ($name,$pass)=getspnam($userid);

DESCRIPTION
    Shadow is a simple module, to add the getspnam function to perl.
    The result of getspnam depends on several system configuration
    items.

    On a Solaris system with NIS+, the result depends on
    /etc/nsswitch.conf. The shadow-password file itself
    (/etc/shadow) is only readable by root, and therefore only a
    script running by or as root can read it. If the NIS-passwd file
    is read the value of *$pass* is dependent on the credentials of
    the effective user. Either the encrypted passwd is returned, or
    "*NP*". If the requested user does not exists or another error
    occurs, an empty list is returned.

    This is the small version, see *Shadowf* for the other fields
    that are returned by getspnam.

BUGS
    This package is only tested on a Sun with Solaris on perl5.002
    and perl5.003.

AUTHOR
    B. de Vries, [email-masked]

SEE ALSO
    the getspnam(3c) manpage.

Bart de Vries                         | Erasmus Universiteit Rotterdam |
tel: +31 10 4081242                   | Informatievoorziening    &     |
fax: +31 10 4527236                   | Automatisering                 |
Internet: [email-masked]          | Postbus 1738                   |
X400:     c=NL;admd=400net;prmd=Surf; | 3000 DR Rotterdam              |
          o=EUR;ou=dia;s=deVries;i=B  | The Netherlands                |
========================================================================