[Samba3] Using tdbsam backend to store user info

Discussion in 'Linux & BSD' started by Glaanieboy, Sep 23, 2004.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    As you can read in my previous thread, I have tried creating a user database for Samba3 using MySQL. But because of lack of good documentation I decided to abandon it and go for the default tdbsam instead.
    But I have a big problem: How do I add users in tdbsam? I know how to use smbpasswd and the manual has a command for converting the smbpasswd file to the tdbsam file, but I want to add users directly in tdbsam.
    You might say 'as long as smbpasswd is supported, use it', which is true, but it's officialy depreciated (sp), what if they entirely abandon smbpasswd in a (one of the) next release(s)? That's why I want to know now how I can use the command for tdbsam.

    Thanks :)
     
  2. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    try man tdbsam
     
  3. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    already did that:
     
  4. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    or:

    info tdbsam

    They might be using GNU info instead of man.
     
  5. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    I am getting all sorts of info about GNU programs, but there is a notice at the bottom:
    :( Is there any tutorial around? I googled around, searched the manual, but nothing.

    edit: I can only find entries in the manual saying that tdbsam is a password backend and smbpasswd can be converted to tdbsam.

    :( ^2
     
  6. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    *ahem*
    Still found nothing, I'll dig one more time through the manual, though I already did that 2 times. Anyone got an idea?
     
  7. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
  8. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    I read that, but it doesn't tell me how to directly store users in a tdbsam passdb backend . At some point in the manual, it tells you about smbpasswd (the file I mean) and it's usage with switches etc, but nothing about tdbsam. The only reference about storing in tdbsam I could find is on the page you pointed me to, it to convert the smbpasswd passdb backend to the tdbsam backend and I want to do that directly, I don't want to first change the smb.conf to use smbpasswd, then create users with smbpasswd and then converting the smbpasswd db to tdbsam and then change the smb.conf file again to use tdbsam.
    Another reason for me to use tdbsam directly is that the smbpasswd use is officialy depraciated (sp) and might be gone in a next release. I want to be prepared for that.

    :)
     
  9. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    OR, I just thought about that, is smbpasswd the general command for putting users in databases and it just doesn't matter if you use tdbsam, smbpasswd or a plaintext passwd database?
    *goes to try*
     
  10. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Wohoo!
    Looks like I was a little confused by the usage as smbpasswd as both a command and a database, which both happen to have the same name, but have nothing further in common.
    Thanks anyway for looking around :D
     
  11. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    tbdedit is what you should use.