#21 Cannot change samba users password

0.940
closed
5
2003-07-20
2002-08-31
Anonymous
No

When unix and samba users are both the same person,
Usermin cannot change to a new password.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2002-09-02

    Logged In: YES
    user_id=129364

    Usermin just calls the command smbpasswd 'username' 'password'
    to change the user's password. Does that work on your system
    when run
    as root at the command line?

     
  • Michael Leupold

    Michael Leupold - 2003-07-20

    Logged In: YES
    user_id=575535

    calling smbpasswd 'username' 'password' was ok for older
    versions of smbpasswd.
    if version > 2 you should alter this (see the password-changing
    function in webmin, too).

    the following worked for me:
    $in{'new1'} =~ s/\\/\\\\/g;
    $in{'new1'} =~ s/\'/\\'/g;
    local $temp = &tempname();
    open(TEMP, ">$temp");
    print TEMP $in{'new1'},"\n",$in{'new1'},"\n";
    close(TEMP);
    $smbout = system("$config{'smbpasswd'} -s
    \"$remote_user\" >/dev/null 2>
    &1 <$temp");
    # $smbout = `echo -e "$in{'new1'}\n$in{'new1'}\n" |
    $config{'smbpasswd'} -
    s '$remote_user' 2>&1 </dev/null`;
    unlink($temp);

    following the line "if (&has_command($config{'smbpasswd'})) {"
    in usermin/changepass/changepass.cgi

     
  • Jamie Cameron

    Jamie Cameron - 2003-07-20

    Logged In: YES
    user_id=129364

    Webmin 1.100 already uses the -s option for Samba 2.x , and
    I will fix Usermin to use it where available as well.

     
  • Jamie Cameron

    Jamie Cameron - 2003-07-20
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks