File_Passwd and shadow passwords

From: Date: Mon, 09 May 2005 21:02:16 +0000
Subject: File_Passwd and shadow passwords
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19136@lists.php.net to get a copy of this message
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

« previous php.pear.general (#19136) next »