Difference between revisions of "OpenWRT WINS with Samba"

m
no edit summary
m
 
Line 113: Line 113:
Wait!  What about the /tmp/lib/samba/wins.tdb file?  According to this (even though it refers to Samba 3, it applies to Samba 4): https://www.samba.org/samba/docs/old/Samba3-HOWTO/tdb.html, the wins.tdb file is used for "permanent storage" (IE static WINS entries).  Can it be edited (in a useful manner)?  No, because it is a binary file, not a text file.  How is information input into it?  Using the NET command? We'll see.
Wait!  What about the /tmp/lib/samba/wins.tdb file?  According to this (even though it refers to Samba 3, it applies to Samba 4): https://www.samba.org/samba/docs/old/Samba3-HOWTO/tdb.html, the wins.tdb file is used for "permanent storage" (IE static WINS entries).  Can it be edited (in a useful manner)?  No, because it is a binary file, not a text file.  How is information input into it?  Using the NET command? We'll see.


How about the TDBTOOL (It's like the MySQL Command, in that it opens it's own small interpreter environment)?  More information here: https://www.samba.org/samba/docs/3.2/man-html/tdbtool.8.html  Nope, that's a big rabbit hole that won't help.
How about the TDBTOOL (It's like the MySQL Command, in that it opens it's own small interpreter environment)?  More information here: https://www.samba.org/samba/docs/3.2/man-html/tdbtool.8.html  Nope, that's a big rabbit hole that won't help much. Starting off with this;
 
* tdbtool
* open /var/lib/samba/wins.tbd
* ...all the general "display" commands like LIST or DUMP, etc work
* ...but a specific command, even a read only one like show WhatEverKey, doesn't work (and that's trying the KeyName and the KeyName followed by all the periods)


Ahhh!  Here's the answer, with the best tip coming from this site: https://samba.samba.narkive.com/UPIyT5mM/samba-as-a-wins-server  But alone that isn't enough as the static entries need to be made so they can persist across router reboots.
Ahhh!  Here's the answer, with the best tip coming from this site: https://samba.samba.narkive.com/UPIyT5mM/samba-as-a-wins-server  But alone that isn't enough as the static entries need to be made so they can persist across router reboots.