Samba 3.0rc1 and Unix accounts
alsbergt at cs.huji.ac.il
Mon Aug 18 19:59:46 GMT 2003
On Mon, Aug 18, 2003 at 06:25:18PM +0000, John H Terpstra wrote:
> On Mon, 18 Aug 2003, Tom Alsberg wrote:
> > <snip />
> > I put passdb backend = tdb in smb.conf, not sure why, actually, since
> passwd backend = tdbsam, guest
Well, guest is not really essential unless I want to be able to do some
things without providing a password or whatever. Is it? And anyway,
having omitted it wouldn't explain the problem I had with tdbsam...
> This is covered extensively in the Samba-HOWTO-Collection.pdf that ships
> in the docs directory of the samba-3.0.0 RC1 tarball.
Not sure - what do you mean by 'this'? Anything I missed?
> > By default, on a fresh install and first use, passdb.tdb does not
> > exist. So smbd (pdb_tdb) creates it on first request. But for some
> > reason, on subsequent requests, opening the TDB fails. I don't know
> > much about TDB, but the file exists (although its size is zero after
> > it was created - shouldn't it have some internal tdb data and a few
> > identifiying blocks even for an empty database? Is this normal, or is
> > the problem already before this?), and after I added a bit more to the
> > debugging message, I see errno is Input/output error...
> > Any idea why this is? Is something wrong here with what I did (this
> > is quite a clean install)?
> To list the contents of this file do:
> tdbdump passdb.tdb
Well, not surprisingly (considering that the file is empty, and the
messages in the log, I got the following) as output:
Failed to open /var/samba/private/passdb.tdb
The question: Why is this?
Is it normal that the file is empty (0-sized) after creation?
Did I do anything wrong?
> > A few other questions here:
> > The example smb.conf says that tdbsam is now the current generic
> > passdb backend and that smbpasswd is only kept for compatibility. Yet
> > for some reason, it seems that unless specifying it explicitly in
> > smb.conf, smbpasswd is still used. Why is that?
> Backwards compatibility with Samba-2.x.
Oh well... Given that Samba 3 is not really compatible with Samba 2 by
default (config file different, and stuff) so one would have to learn
the difference anyway to set it up, I was surprised that it was the
decision to leave smbpasswd the default... But that's a different
(and minor) issue.
> > Which is the exact code deciding which passdb backend to use (since
> > there is no default in loadparam)?
> No sure I understand your question.
Well, when Samba needs to look up information about a user or a group
(or for that matter - domain member machines are also looked up via
passdb, right?), calling passdb, how does it decide which passdb
backend to use? That is, what's the semantics? I'd assume the
'passdb backend' parameter is checked first, but if that is not
specified, how does it decide which backend to use (I.E., how does it
currently default to smbpasswd? The parm_table does not specify it
as a default, so it must be somewhere in the passdb code).
> > When (meaning during the server's lifetime - what events cause it, and
> > where is it in the code) are passdb.tdb or smbpasswd changed by smbd?
> > <snip />
> Covered int he HOWTO document. The tools that change (update) passdb.tdb
> (or smbpasswd) are:
> smbd via the useradd/userdel scripts.
So smbd does not ever try to write to the passdb by itself (say, if
I specify no useradd/userdel scripts). Is that right?
Tom Alsberg - hacker (being the best description fitting this space)
Web page: http://www.cs.huji.ac.il/~alsbergt/
DISCLAIMER: The above message does not even necessarily represent what
my fingers have typed on the keyboard, save anything further.
More information about the samba-technical