Christian Brandes
2007-Oct-19 09:49 UTC
[Samba] static wins entries -- entries change after restart of corresponding Samba server
I am trying to use static wins entries, as stated in the Official Samba
Howto Collection.
One Samba server (VServer) is with wins service enabled. Another
(Server1) is not, but it has the wins server in its smb.conf.
When I set wins.dat at VServer:
"SERVER1#00" 0 192.168.6.231 192.168.1.231 66R
"SERVER1#03" 0 192.168.6.231 192.168.1.231 66R
"SERVER1#20" 0 192.168.6.231 192.168.1.231 66R
And then I restart Samba at Server1 this static entries get changed in:
"SERVER1#00" 0 192.168.6.231 192.168.1.231 192.168.222.231
192.168.6.229
192.168.6.239 192.168.1.239 192.168.224.1 192.168.225.1 66R
"SERVER1#03" 0 192.168.6.231 192.168.1.231 192.168.222.231
192.168.6.229
192.168.6.239 192.168.1.239 192.168.224.1 192.168.225.1 66R
"SERVER1#20" 0 192.168.6.231 192.168.1.231 192.168.222.231
192.168.6.229
192.168.6.239 192.168.1.239 192.168.224.1 192.168.225.1 66R
I would likle to keep it as I set it.
Samba version on both machines: 3.0.24
/etc/smb.conf (Server1):
[global]
workgroup = mycompany
server string = %h BDC
netbios name = server1
wins support = no
wins server = 192.168.222.235
dns proxy = yes
log file = /var/log/samba/log.%m
log level = 3
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
obey pam restrictions = yes
guest account = nobody
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = "*New password:*" %n\n "*Re-enter new
password:*" %n\n
"*LDAP password information changed for*"
passwd chat debug = yes
domain logons = yes
local master = yes
os level = 60
domain master = no
preferred master = no
logon path logon drive passdb backend =
ldapsam:ldap://192.168.6.229/
ldap admin dn = cn=root,dc=mylocation,dc=mycompany
ldap suffix = dc=mylocation,dc=mycompany
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Machines
add machine script = /usr/sbin/smbldap-useradd -w "%u"
add user script = /usr/sbin/smbldap-useradd -m "%u"
ldap delete dn = Yes
add group script = /usr/sbin/smbldap-groupadd -p "%g"
delete group script = /usr/sbin/smbldap-groupdel "%g"
add user to group script = /usr/sbin/smbldap-groupmod -m "%u"
"%g"
delete user from group script = /usr/sbin/smbldap-groupmod -x "%u"
"%g"
set primary group script = /usr/sbin/smbldap-usermod -g "%g"
"%u"
load printers = no
printcap name = /dev/null
disable spoolss = yes
socket options = TCP_NODELAY
aio read size = 0
aio write size = 0
blocking locks = yes
fake oplocks = no
kernel oplocks = yes
level2 oplocks = no
oplocks = no
posix locking = yes
strict locking = no
strict sync = no
sync always = no
write cache size = 0
[netlogon]
comment = Network Logon Service
browseable = no
path = /disk1/samba/netlogon
guest ok = yes
writable = no
share modes = no
include = /disk1/samba/etc/smb.conf.%i
/etc/smb.conf (VServer):
[global]
workgroup = mycompany
server string = %h PDC
wins support = yes
dns proxy = yes
name resolve order = lmhosts wins bcast
log file = /var/log/samba/log.%m
log level = 3
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
encrypt passwords = true
obey pam restrictions = yes
guest account = nobody
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = "*New password:*" %n\n "*Re-enter new
password:*" %n\n
"*LDAP password information changed for*"
passwd chat debug = yes
domain logons = yes
local master = yes
os level = 75
domain master = yes
preferred master = yes
logon path logon drive logon home passdb backend =
ldapsam:ldap://192.168.6.229/
ldap admin dn = cn=root,dc=mylocation,dc=mycompany
ldap suffix = dc=mylocation,dc=mycompany
ldap group suffix = ou=Groups
ldap user suffix = ou=Users
ldap machine suffix = ou=Machines
add machine script = /usr/sbin/smbldap-useradd -w "%u"
add user script = /usr/sbin/smbldap-useradd -m "%u"
ldap delete dn = Yes
add group script = /usr/sbin/smbldap-groupadd -p "%g"
delete group script = /usr/sbin/smbldap-groupdel "%g"
add user to group script = /usr/sbin/smbldap-groupmod -m "%u"
"%g"
delete user from group script = /usr/sbin/smbldap-groupmod -x "%u"
"%g"
set primary group script = /usr/sbin/smbldap-usermod -g "%g"
"%u"
load printers = no
printcap name = /dev/null
disable spoolss = yes
socket options = TCP_NODELAY
aio read size = 0
aio write size = 0
blocking locks = yes
fake oplocks = no
kernel oplocks = yes
level2 oplocks = no
oplocks = no
posix locking = yes
strict locking = no
strict sync = no
sync always = no
write cache size = 0
[netlogon]
comment = Network Logon Service
path = /disk1/samba/netlogon
browseable = no
guest ok = yes
writable = no
share modes = no
Christian Brandes
2007-Oct-22 16:04 UTC
[Samba] static wins entries -- samba migrates entries from static to dynamic
I found some additional information about wins that helps to describe the problem: http://technet2.microsoft.com/WindowsServer/en/library/a91af869-5b74-4f04-80ff-b42a8a149ac61033.mspx The 1st situation is: (Migrate Off) When presented with a registration request by a WINS client, that challenges a static mapping already in the server database, the WINS-Server prevents the client from registering and updating the statically mapped information. The 2nd situation is: (Migrate On) (That is how Samba behaves.) The WINS-Server permits previously entered static mappings to be overwritten by WINS client computers that attempt to register dynamically and update entries for these same names. Is there a possibility to change Samba to behave like the 1st situation, i.e. to turn "Migrate Off"? Or can this be done with a different Netbios Flag: "SERVER1#00" 0 192.168.6.231 192.168.1.231 66R (see: http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html#id348791) I tried to play a bit with the 66R, but I did not find out the right way to make the entry "real static". Best regards Christian