Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 1999 09:28:09 -0700 (PDT)
From:      "Eric J. Schwertfeger" <ejs@bfd.com>
To:        Ho Seng Yip <hsengyip@singnet.com.sg>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Web Authentication
Message-ID:  <Pine.BSF.4.05.9908110919480.10732-100000@harlie.bfd.com>
In-Reply-To: <000901bee3ea$40f05fe0$95aa15a5@oasis>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 11 Aug 1999, Ho Seng Yip wrote:

> Does anyone know how I can authenticate a user based on the password file
> /etc/passwd using a perl script?

Passwords aren't stored in /etc/passwd, which makes this more difficult.
The encrypted passwords are in /etc/master.passwd, however that file is
only readable by root, so you'd have to either run the command as root, or
use suidperl.

On the other hand, I believe that there is a syscall that will do this for
you, though I can't find the man page on this at the moment.

This would also have the advantage that it would work with other password
technologies.  FreeBSD 3.X uses PAM, which will probably simplify this.
I've seen a perl PAM module somewhere (in fact, was required by an NT
authentication module).



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9908110919480.10732-100000>