From owner-freebsd-questions Wed Aug 11 9:28:41 1999 Delivered-To: freebsd-questions@freebsd.org Received: from horst.bfd.com (horst.bfd.com [12.9.219.10]) by hub.freebsd.org (Postfix) with ESMTP id 156EF15548 for ; Wed, 11 Aug 1999 09:28:33 -0700 (PDT) (envelope-from ejs@bfd.com) Received: from HARLIE.bfd.com (bastion.bfd.com [12.9.219.14]) by horst.bfd.com (8.9.3/8.9.2) with ESMTP id JAA16408; Wed, 11 Aug 1999 09:28:09 -0700 (PDT) (envelope-from ejs@bfd.com) Date: Wed, 11 Aug 1999 09:28:09 -0700 (PDT) From: "Eric J. Schwertfeger" To: Ho Seng Yip Cc: FreeBSD Questions Subject: Re: Web Authentication In-Reply-To: <000901bee3ea$40f05fe0$95aa15a5@oasis> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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