Path: news.ruhr-uni-bochum.de!news.rwth-aachen.de!uni-paderborn.de!fu-berlin.de!main.Germany.EU.net!EU.net!newsfeed.internetmci.com!info.ucla.edu!psgrain!nntp.teleport.com!usenet
From:
[email protected] (Bart de Vries)
Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc
Subject: Shadow passwd, simple module
Followup-To: comp.lang.perl.misc
Date: 25 Jul 1996 18:04:34 GMT
Organization: Erasmus Universiteit Rotterdam
Lines: 66
Approved:
[email protected] (comp.lang.perl.announce)
Message-ID: <
[email protected]>
NNTP-Posting-Host: julie.teleport.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: news.ruhr-uni-bochum.de comp.lang.perl.announce:384 comp.lang.perl.misc:38858
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 protected]
SEE ALSO
the getspnam(3c) manpage.
Bart de Vries | Erasmus Universiteit Rotterdam |
tel: +31 10 4081242 | Informatievoorziening & |
fax: +31 10 4527236 | Automatisering |
Internet:
[email protected] | Postbus 1738 |
X400: c=NL;admd=400net;prmd=Surf; | 3000 DR Rotterdam |
o=EUR;ou=dia;s=deVries;i=B | The Netherlands |
========================================================================