NYCPHP Meetup

NYPHP.org

[nycphp-talk] Changing UNIX shadow passwords with PHP

csnyder chsnyder at gmail.com
Tue Mar 15 17:37:52 EST 2005


On Tue, 15 Mar 2005 16:07:21 -0500, Atul Ohri <atul at monkeyclan.com> wrote:
> 
> Well this is all very helpful…  I agree that the safer way to do this would
> be through the cron job.  I'm looking into various ways to do that and have
> yet to find an efficient file locking mechanism that will work for both Perl
> and PHP. 

How about creating/looking for /tmp/shadow.lock ?
 

> But that doesn't work because the /etc/shadow that is in the virtual
> directory for the bar.com domain just has "foo" as the username. 

Does passwd(1) work? As long as the root user that runs the command is
jailed in the same virtual host, it will update the correct
/etc/shadow.


-- 
Chris Snyder
http://chxo.com/



More information about the talk mailing list