#4031 Add/convert users broken

1.570
closed-fixed
5
2012-01-07
2011-12-07
Anonymous
No

Centos 6, Samba version 3.5.4-68.el6_0.2, default install, using smbpasswd, not pdbedit

Related to http://sourceforge.net/tracker/?func=detail&aid=3412232&group_id=17457&atid=117457

The samba module no longer adds users to smbpasswd so the users do not show up in the user list.

The users appears to had been added to the smb database as commandline use of smbpasswd indicates the user exist. As webmin did not update the smbpasswd file, the user is not listed in "Edit Samba users" section and cannot be managed through webmin. However, the new user does appears in other listing such as specifying valid users for shares.

Based on crude testing, it appears that the if($?) statement in samba-lib.pl : sub create_user() never test positive no matter what happens to the add user process.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2011-12-08

    Webmin will try to add a user with a command like :

    smbpasswd -a username

    if this fails (indicated by a non-zero exit status), it will add the user to the smbpasswd file.

    Does the smbpasswd command work if run manually on your system to add a user?

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-12-16

    Yes, command line (which is what I use to test) and SWAT works as expected like the previous bug, only the webmin samba-lib module seems to have the problem.

    IIRC inserting print/echo into samba-lib.pl indicates that the code updating smbpasswd is never executed.

     
  • Jamie Cameron

    Jamie Cameron - 2011-12-17

    Webmin won't write to smbpasswd if it thinks the smbpasswd -a username command succeeded.

    By the way, which page in Webmin are you using to create a samba user?

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-12-28

    I've added user both waysm in the SMB module itself, as well as using the synchronize user function.

    Based on your last comment that webmin won't write to smbpasswd if -a was successful, should I open a bug instead that the samba module does not list users correctly in the "Edit Samba Users" section if they are not found in smbpasswd?

    This is because as mentioned, other sections within the module do list the users correctly.

     
  • Jamie Cameron

    Jamie Cameron - 2011-12-28

    Yes, that sounds like the real issue..

    Where are users stored on your system if not in smbpasswd ? Webmin will use the pdbedit command to list users, if it is installed .. which supports other backend types, like LDAP or alternate config files.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2011-12-29

    I don't have access to the server right now to check but it's the default CentOS 6 SMB config which, if I'm not mistaken, defaults to using tdb for user/password storage.

    pdbedit was not installed hence webmin was using smbpasswd to manage users.

     
  • Jamie Cameron

    Jamie Cameron - 2011-12-29

    Are you sure pdbedit isn't installed on your system? On my test CentOS 6 box, it is part of the samba-common package, which is installed with Samba.

    Also, make sure that when you click on the "Module Config" link in the Samba module, the "Full path to pdbedit " field is set correctly. There is a Webmin bug on CentOS 6 that can leave this field empty by default.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-01-06

    You're right, pdbedit was installed. Can't remember why in the previous install of 1.56, it looked like it wasn't and smbpasswd was used instead.

    Adding the path to pbedit seemed to have solved the problems. Auto sync works and the user shows up in the manage user/password list.

    My bad, please close this :)

     
    Last edit: Anonymous 2014-09-17
  • Jamie Cameron

    Jamie Cameron - 2012-01-07

    Cool, glad that worked. This was really a Webmin bug though, as it should have been using pdbedit by default on CentOS 6 ..

     
  • Jamie Cameron

    Jamie Cameron - 2012-01-07
    • status: open --> closed-fixed
     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks