Make smb.conf config persistent? Location of config files? disable domain logon?

Questions about SNMP, Power, System, Logs, disk, & RAID.
Post Reply
beo-doc

Make smb.conf config persistent? Location of config files? disable domain logon?

Post by beo-doc »

Hi,

My main question is:
How can I make smb.conf adjustments persistent that I don't have access to via the web interface?

Background information
In my local network, I have a Linux server with Samba installed. The server takes care of domain logons (NT4) and roaming profiles for Windows clients. The QNAP server is set up as local master browser (needs to be that way due to several reasons) but it shouldn't handle anything concerning domains. Unfortunately, the QNAP server prevents the Windows clients to do a domain logon on the Linux server because it seems to "push into the line" and thus the Linux server cannot serve the Windows clients as domain logon server.

The only way I could get the QNAP "out of that habit" was by editing the smb.conf under /etc/config/ on the QNAP itself and setting domain logon to "no". After a Samba restart it works. The Linux server can serve domain logons.

HOWEVER: The smb.conf gets replaced / automatically edited after a few minutes so that domain logon is set to "yes" again. What puzzles me particularly: It seems that some form of Samba reload is done although Samba itself only provides a restart command, at least in the smb.sh.

I used /sbin/setcfg global "domain logons" "no" -f /etc/config/smb.conf for smb.conf modifications. domain master seems to stay set on "no" once it is done manually.

Some info for the sake of completeness: "Normal" shares on the QNAP server are authenticated via LDAP. Just FYI if it matters here.

Questions that arise from this experience:
  1. How can I make the changes that I made persistent?
  2. Can I somehow get rid of the domain logon yes via the web interface? Maybe some preference item I oversaw?
  3. Where are the "actual" (default?) config files located? So that I could modify them and make that change persistent across reboots? In the meantime, I tried using an autorun script on boot time but this is far from ideal.
  4. How can I make Samba reload instead of restart on the QNAP server? On other Linux distros I can do this via smbcontrol all reload-config.
Thanks in advance!


UPDATE (new insights)

In /etc/init.d/smb.sh there are many commands that rewrite the smb.conf, also on smb restart.

I changed the domain logon part there and now everything works as expected. Obviously, this might be lost after a firmware update. I don't know this yet and I'll have to observe it. Also, I don't know what happens if I make changes via the web interface.

The reason for the domain logon setting to be set to "yes" seems to be LDAP. If you use LDAP, then this setting is automatically set to "yes" via the smb.sh script. Since I cannot do without LDAP here, I will live with the workaround for the time being.

I'd still like to find a more permanent solution!

So, if somebody could answer my other questions, I would be grateful.
Post Reply

Return to “System & Disk Volume Management”