Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!garnet.bmr.gov.au!como.dpie.gov.au!news.gan.net.au!act.news.telstra.net!vic.news.telstra.net!news.mira.net.au!news.vbc.net!alpha.sky.net!news.sprintlink.net!new-news.sprintlink.net!tank.news.pipex.net!pipex!blackbush.xlink.net!news.nordwest.de!lemur.nord.de!usenet From: Thomas Wintergerst <thomas@lemur.nord.de> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Shadow password functions? Date: Tue, 26 Mar 1996 22:19:54 +0100 Organization: Lemuria Private Computing Lines: 16 Message-ID: <31585F7A.41C67EA6@lemur.nord.de> References: <4j5qf7$hja@cpmt.cyberport.net> NNTP-Posting-Host: dagobert.lemur.nord.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.01 (X11; I; FreeBSD 2.1.0-RELEASE i386) Mike Holling wrote: > > I'm working on porting poppassd to FreeBSD 2.1 so our users can change > their passwords with Eudora. With shadowed passwords, how do I verify > a user's password? The original code used the encrypted entry from > /etc/passwd, but of course that doesn't work with shadowed password > files. Hi Mike, I think you should use the "getpwent" family of functions. They return the encrypted password if the effective user id is 0. If can setuid your program this is the recommended way. I think there is no (official) way to let a normal user read the encrypted password. Thomas