Reply
Old September 23rd, 2004 Top | #1
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default [Samba3] Using tdbsam backend to store user info

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
Glaanieboy is offline   Reply With Quote
Old September 23rd, 2004 Top | #2
 
X-Istence's Avatar
*
Joined: December 2001
Location: USA
Posts: 6,496
Reputation: 2808
Power: 220

Default

try man tdbsam
X-Istence is offline   Reply With Quote
Old September 23rd, 2004 Top | #3
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default

already did that:
server1# man tdbsam
No manual entry for tdbsam
Glaanieboy is offline   Reply With Quote
Old September 23rd, 2004 Top | #4
 
X-Istence's Avatar
*
Joined: December 2001
Location: USA
Posts: 6,496
Reputation: 2808
Power: 220

Default

or:

info tdbsam

They might be using GNU info instead of man.
X-Istence is offline   Reply With Quote
Old September 23rd, 2004 Top | #5
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default

I am getting all sorts of info about GNU programs, but there is a notice at the bottom:
No menu item `tdbsam' in node `(dir)Top'.
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
Glaanieboy is offline   Reply With Quote
Old September 24th, 2004 Top | #6
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default

*ahem*
Still found nothing, I'll dig one more time through the manual, though I already did that 2 times. Anyone got an idea?
Glaanieboy is offline   Reply With Quote
Old September 25th, 2004 Top | #7
 
X-Istence's Avatar
*
Joined: December 2001
Location: USA
Posts: 6,496
Reputation: 2808
Power: 220

Default

http://samba.org/samba/docs/man/Samb...l#pdbeditthing

Read through that.
X-Istence is offline   Reply With Quote
Old September 25th, 2004 Top | #8
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default

Originally Posted by X-Istence
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.

Glaanieboy is offline   Reply With Quote
Old September 25th, 2004 Top | #9
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default

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*
Glaanieboy is offline   Reply With Quote
Old September 25th, 2004 Top | #10
 
Glaanieboy's Avatar
OSNN Veteran Addict
Joined: March 2002
Location: The Netherlands
Posts: 2,626
Reputation: 270
Power: 153

Default

Wohoo!
server1# smbpasswd -a glenn
New SMB password:
Retype new SMB password:
Unable to open/create TDB passwd
Unable to open/create TDB passwd
pdb_getsampwnam: TDB passwd (/usr/local/private/passdb.tdb) did not exist. File successfully created.
TDBSAM version too old (0), trying to convert it.
TDBSAM converted successfully.
Added user glenn.
server1#
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
Glaanieboy is offline   Reply With Quote
Old September 28th, 2004 Top | #11
 
X-Istence's Avatar
*
Joined: December 2001
Location: USA
Posts: 6,496
Reputation: 2808
Power: 220

Default

tbdedit is what you should use.
X-Istence is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FreeBSD 5.2/Samba3] Default installation path? Glaanieboy Linux & BSD 3 September 23rd, 2004 9:38pm
RDF backend broken Glaanieboy Site Problems & Feedback 13 April 12th, 2004 11:19pm
New Trillian Pro User info Needed sportman10 Windows Desktop Systems 1 September 3rd, 2003 4:48pm
User Info Kr0m Site Problems & Feedback 1 January 1st, 2002 9:12pm