*BSD News Article 75973


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.dacom.co.kr!arclight.uoregon.edu!news.uoregon.edu!xmission!news.isp.homestar.net!news
From: mark@perrin.isp.homestar.net (Mark Atwood)
Newsgroups: comp.lang.perl.misc,comp.unix.bsd.freebsd.misc
Subject: Re: 'vipw' Style File Locking in Perl
Date: 12 Aug 1996 13:40:28 -0400
Organization: HomeStar Communications
Lines: 17
Sender: mark@perrin.isp.homestar.net
Message-ID: <m1zq40lcvn.fsf@perrin.isp.homestar.net>
References: <320DE5D9.3FF1@tassie.net.au>
NNTP-Posting-Host: mfd-dial1-18.cybercom.net
In-reply-to: Brook Schofield's message of Sun, 11 Aug 1996 23:53:29 +1000
X-Url: http://www.isp.homestar.net/~mark/
X-Newsreader: Gnus v5.1
Xref: euryale.cc.adfa.oz.au comp.lang.perl.misc:36172 comp.unix.bsd.freebsd.misc:25347

In article <320DE5D9.3FF1@tassie.net.au> Brook Schofield <Brook@tassie.net.au> writes:

>   I am trying to write a change password script in perl that is accessed 
>   though a Web Browser, using Apache and FreeBSD 2.0.5.
>
>   I have tried using 'chpass' in FreeBSD but it doesn't seem accessable 
>   in Perl, unless I run as root. Not even SUID CGI's will work with this 
>   one.

What I ended up doing when I was doing something like this is installing
expect, and using it to drive passwd. I used the "mkpasswd" program that
comes with expect, and call it from perl via backticks.

-- 
Mark Atwood           | ...do it in Java and it would virtually write itself,
mark@isp.homestar.net | but it would run like a geriatric sloth with piles.
The Turtle Moves!     |  -- Elf Sternberg <elf@halcyon.com>