[Samba] tdbsam and variables

Marc Petitmermet petitmermet at mat.ethz.ch
Sun Dec 12 21:42:39 GMT 2004


Dear List Members

We are trying to setup samba PDC with tdbsam backend.

First question: When "Home Directory" is not set in tdbsam does samba 
just use the setting of "logon home" in smb.conf? And when it's set 
does it ignore the smb.conf setting?

Second question: Does tdbsam allow the inclusion of variables such as 
%a, %u, %H, etc.?

We were looking at the "Big 500 Users Example" [1] but had some 
difficulties. When we were using the tdbsam backand, samba ignored the 
settings which was set in smb.conf and we had to hard-code the 
varibles. E.g.:

   Profile Path:  \\myserver\myuser\.profile.WinXP\profile.pds

As we still have some computers running NT and 2k we tried to use %a:

   Profile Path:  \\myserver\myuser\.profile.%a\profile.pds

But this resulted in the generation of a folder ".profile.%a" and "%a" 
was not interpreted at all. We also wanted to use "%L" and "%u" in the 
profile path but then the profile wasn't found at all. When we left the 
"Profile Path" in tdbsam empty the setting in smb.conf was ignored and 
the profile not found.

When using smbpasswd as backand everything works as expected with all 
variables. Therefore, my answer to my own question would be: all 
parameters have to be statically set in tdbsam because the settings in 
smb.conf are ignored and the inclusion of variables does not work.

But when I look at the "Big 500 Users Example" [1] this answer does not 
make sense at all. If it were true why are the logon path and logon 
home set in the example configuration?

My guess is that I have something wrong in my setup but I just cannot 
figure out what it is (I've added smb.con at the end of this message). 
BTW, this is samba-3.0.7-1.3E.1 on RedHat EL 3.

Thanks for any hints to resolve this problem.

Kind regards,
Marc

[1] http://us1.samba.org/samba/docs/man/Samba-Guide/Big500users.html


/etc/samba/smb.conf
#======================= Global Settings 
=====================================
[global]
    workgroup = mydomain
    #netbios name = %L
    domain logons = yes
    server string = SMB-Server 6/6 %v
    hosts allow = xx.xxx.xx.
    log file = /var/log/samba/%m.log
    max log size = 50
    security = user

    debug level = 0

    # password server = %L
    password level = 8
    username level = 8
    encrypt passwords = yes
    passdb backend = tdbsam:/etc/samba/private/passdb.tdb
    unix password sync = no

    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    local master = yes
    os level = 33
    domain master = yes
    preferred master = yes

    logon path = \\%L\profiles\.profile%a\profile.pds
    name resolve order = wins hosts
    wins support = no
    wins server = xx.xx.xx.xx
    dns proxy = no

    nis homedir = true
    homedir map = auto.home

    preserve case = yes
    short preserve case = yes
    default case = lower
    case sensitive = no
    logon drive = P:

#============================ Share Definitions 
==============================
[homes]
    comment = %U's Data on %L Group %G
    path = %H
    browseable = no
    writable = yes
    create mask = 0700
    directory mask = 0700
    follow symlinks = yes
[profiles]
    path = /home/%u
    browseable = no
    writable = yes
    create mask = 0700
    directory mask = 0700



More information about the samba mailing list