[PEAR] File_Passwd and shadow passwords
by Aaron Gould other posts by this author
May 11 2005 8:18AM messages near this date
[PEAR] [ANNOUNCEMENT] Crypt_RSA-1.0.0 (stable) Released.
|
[PEAR] Re: File_Passwd and shadow passwords
Can anyone tell me if File_Passwd can work with shadow password files?
The following snippet of code is allowing alterations to the /etc/passwd
file, and an "x" is inserted into the password field (which is
expected). Shadow remains untouched...
include_once('File/Passwd.php');
$passwd = &File_Passwd::factory('Unix');
$passwd-> setFile('/etc/passwd');
$passwd-> useMap(true);
$passwd-> load();
$extra = array('pass'=> 'testpass', 'home'=>'/home/testuser',
'gecos'=> 'Added by script...', 'shell'=>'/bin/bash');
$passwd-> addUser('testuser', 'testpass', $extra);
$passwd-> save();
I've been through the docs, and all I can see is that a PEAR_Error is
thrown when a shadow password configuration is detected. Does this
simply mean it doesn't have that capability? Google is rather dry on
relevant information too.
Thanks,
--
Aaron Gould
Programmer/Systems Administrator
PARTS CANADA
--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Aaron Gould
Michael Wallner
|