user authentication via /etc/passwd|/etc/shadow

Marco Herrn herrn at gmx.net
Sun Apr 4 14:38:40 EDT 2004


On 2004-04-04, Martin v. Löwis <martin at v.loewis.de> wrote:
> Marco Herrn wrote:
>> I want to write a program where I authenticate users via the standard
>> unix system accounts. I didn't find a module providing this
>> functionality. Is there such a module available? If not, how can I
>> achieve this?
>
> You need a combination of the pwd and crypt modules.
It seems that the pwd module can only access /etc/passwd. If the
passwords are stored in /etc/shadow, it doesn't work. Is there a way to
access shadow passwords, too?

Marco

-- 
Marco Herrn             herrn at gmx.net
(GnuPG/PGP-signed and crypted mail preferred)
Key ID: 0x94620736




More information about the Python-list mailing list