Menu

#3451 error in converting unix users to samba

open
5
2009-07-17
2009-07-17
Anonymous
No

After a new installation of a openSuse 11.1 system with Webmin 1.480 adding new users via yast and converting them via webmin to samba users worked fine.

The problem occured after the deletion of users with a smaller unix id than the last one:
I can not remove these unix users from samba by the "Convert Unix Users to Samba Users" function but have to delete them manually from smbpasswd. If I do not, then Webmin fails to display all samba users with higher linux ID than the first deleted one.

By adding a new account to unix I have to take care not to use the now free linux IDs. Otherwise Webmin will ignore them while converting users. If I manually set the linux ID to the next available number at the end of smbpasswd than everything works fine again.

Discussion

  • Jamie Cameron

    Jamie Cameron - 2009-07-19

    So do you have users in the smbpasswd file that do not exist as Unix users?
    That isn't supported by Webmin, nor by Samba as far as I know..

     
  • Nobody/Anonymous

    That's exactly the problem: I want to delete one user from Unix and Samba. My first step was to delete the user from unix.
    If I then go in Webmin to "Samba-Server", then "Convert Unix Users to Samba Users" and check the option "Delete Samba users who do not exist under Unix" that is when the problem occurs. This option will only take effect if the deleted user is the LAST user in my unix list. It produces an error if one user in the middle is missing in unix but still in the smbpasswd.
    Only if i delete the user manually from smbpasswd this error will disappear and the following sambausers appear again in my userlist in webmin.

     
  • Jamie Cameron

    Jamie Cameron - 2009-07-21

    What is the error message that appears if one user in the middle is missing?

     
  • Nobody/Anonymous

    Hmm, could have thought of it myself, sorry.

    So, I reproduced the error now in an example:
    My Linux userlist is ends with uid 1014. I deleted user 1013 from linux and tried to convert linux users to samba users. The error message is:
    "Failed to convert user: /usr/bin/pdbedit failed: add_smbfilepwd_entry:entry with name (name1014) already exists"
    name1014 as well as name1013 is now missing in my sambauserlist in webmin, but both still apear in smbpasswd. If I delete name1013 from smbpasswd and convert the users again, then name1014 apears as "is already the same" in the convertion and also in the samba user list.

    If I add a new user with uid 1013 to linux, then webmin ignores this new user by converting linux to samba users. But if I change the uid to 1015 then everything is working well.

     
  • Jamie Cameron

    Jamie Cameron - 2009-07-23

    Would it be possible for you to post the last few lines of your smbpasswd file to this bug report? I am curious about what in the file Webmin is failing to read..

     
  • Nobody/Anonymous

    The last 5 lines of the smbpasswd read now (only modified names):

    name1009:1009:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:2F527B3CBAD1B88ECDE71C871E30A790:[U ]:LCT-4A5DD346:
    name1010:1010:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:7589C34C107DF0C16FB2E65F17BE90E7:[U ]:LCT-4A5DD356:
    name1011:1011:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:682FE96E168BEE1DDEDF9665F2A1C4EA:[U ]:LCT-4A5EF09B:
    name1012:1012:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:0B034B127D1BFA250B300B70FFB7C122:[U ]:LCT-4A5F215B:
    name1014:1014:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:15D59603A1A75DCED43B5596F17A8FEF:[U ]:LCT-4A6D9722:

     
  • Jamie Cameron

    Jamie Cameron - 2009-07-28

    That looks fine to me.
    Are all the same users listed with a command like :
    pdbedit -L -w

     
  • Nobody/Anonymous

    Yes, this command gives the all the same users.

     
  • Nobody/Anonymous

    There is also no problem to add a new user with the now free uid 1013 first to linux and then to the smbpasswd by the comand pdbedit -a -u name1013.
    Webmin ignores this user.
    I'm not sure where the new user should appear in the smbpasswd. In my case the new one is the last one in the list, not sorted neither by uid or alphabet.

     
  • Jamie Cameron

    Jamie Cameron - 2009-07-29

    So I am a little confused .. are your samba users and Unix users completely in sync? Or are there samba users that don't exist as Unix users? If so, they should be removed..

     
  • Nobody/Anonymous

    There are no samba users that are no linux users.

    And as I did not encounter any relative problem by using neither the console nor by using yast I guess there must be a problem in webmin or in the communication between webmin and my system.

     

Log in to post a comment.

Auth0 Logo