[sork] passwd: Problems with smbpasswd backend

Christopher Huyler chris at huyler.net
Mon Mar 29 16:24:53 PST 2004


I found my problem.  This is a bug in passwd-2.2...

Line 48 of passwd-2.2/lib/Driver/smbpasswd.php reads...

      $cmd = $this->_params['program'] . " -r " . $this->_params['host'] .
             " -s -U \"$user\" &> $tmpfile"

When I changed it to...
      $cmd = $this->_params['program'] . " -r " . $this->_params['host'] .
             " -s -U \"$user\" > $tmpfile 2>&1"

...everything worked.  As I mentioned before, I am running Solaris 8, with
all the latest patches to be specific.  I did a basic test to see if "&>"
works at all and it does not work using /bin/sh, however it does work using
bash.   This could very likely be a Solaris specific bug but it should be
corrected in the next release. Personally, I've never seen the "&>" syntax
used before.

~ Chris


> It works for me. If you are authenticating with system users, samba must 
> change the unix password too. So, I'm using these options in smb.conf.
>
> encrypt passwords = Yes
> update encrypted = Yes
> obey pam restrictions = Yes
> pam password change = Yes
> passwd chat debug = Yes
> unix password sync = Yes
>
> Besides, this is my backends.php file
>
>
> $backends['smbpasswd'] = array(
>      'name' => 'SERVER',
>      'preferred' => 'true',
>      'password policy' => array(),
>      'driver' => 'smbpasswd',
>      'params' => array(
>          'program' => '/usr/bin/smbpasswd',
>          'host' => 'host.domain.com'
>      )



More information about the sork mailing list