Summary | smbpasswd on Solaris 8 |
Queue | Passwd |
Queue Version | 2.2 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | chris (at) huyler (dot) net |
Created | 03/30/2004 (7771 days ago) |
Due | |
Updated | 03/31/2004 (7770 days ago) |
Assigned | 03/31/2004 (7770 days ago) |
Resolved | 03/31/2004 (7770 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
Priority ⇒ 2. Medium
Assigned to Jan Schneider
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
added some debugging lines and found the problem:
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"
...I was able to change my smb password.
The problem is that the version of /bin/sh that comes with Solaris 8
does not support "&>" I have tested this outside of horde with a
simple script:
#!/bin/sh
echo "hello world" &> /tmp/output.txt
exit
When I execute it, instead of "hello world" being placed in
/tmp/output.txt, it is printed to the console. If I change the first
line to #!/usr/bin/bash the output is placed in /tmp/output.txt as
expected. This leads me to believe that quite simply "/bin/sh" does
not support this syntax on Solaris 8. The replacement syntax I used
above is platform independent. Since the rest of smbpasswd.php
depends on the output being stored in $tmpfile, it won't work on
Solaris 8 until it is changed. (I obviously changed this on my own
install).
~ Chris