*BSD News Article 55182


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!swidir.switch.ch!swsbe6.switch.ch!scsing.switch.ch!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!news.uni-stuttgart.de!uni-regensburg.de!lrz-muenchen.de!faui0n.informatik.uni-erlangen.de!uni-erlangen.de!news.tu-chemnitz.de!irz401!uriah.heep!not-for-mail
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to access encoded passwords in the password database file
Date: 15 Nov 1995 23:22:49 +0100
Organization: Private FreeBSD site, Dresden.
Lines: 13
Message-ID: <48dp7p$9ki@uriah.heep.sax.de>
References: <48aj41$otm@news.abq.bdm.com>
NNTP-Posting-Host: uriah.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit

Ralph Hughes <rhughes2@bdm.com> wrote:
>I am trying to put together a PERL script that does user validation. 
>However, since FreeBSD uses a password database file rather than /etc/passwd,
>I'm having some trouble.

Use a Perl script that's setuid root.  Unlike SysX, 4.4BSD hasn't
mangled the getpw*() API, so a call to those functions from a
privileged process yields the expected result.
-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)