6.0.0-beta1
7/9/25

[#40] smbpasswd on Solaris 8
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

History
03/31/2004 09:53:51 PM Jan Schneider Comment #4
State ⇒ Resolved
Reply to this comment
Committed, thanks.
03/31/2004 09:31:11 AM Jan Schneider State ⇒ Assigned
Priority ⇒ 2. Medium
Assigned to Jan Schneider
 
03/30/2004 10:20:18 PM chris (at) huyler (dot) net Comment #3 Reply to this comment
This problem is not addressed in 2.2.1-RC1.
03/30/2004 03:53:39 PM Chuck Hagenbuch State ⇒ Feedback
 
03/30/2004 08:38:47 AM Jan Schneider Comment #2 Reply to this comment
Try Passwd 2.2.1-RC1.
03/30/2004 04:00:28 AM chris (at) huyler (dot) net Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Reply to this comment
I could not get smbpasswd password changing to work from horde.  I 
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

Saved Queries