Page 1 of 1

How to configure/autostart samba daemon?

Posted: Sat Mar 03, 2012 12:31 pm
by rintje
Hi,

I want to use my WNDR3700v1 router as a samba domain master for my LAN.I've already managed to make this work using OpenWrt Backfire 10.03.1 Luci. I don't have any USB devices connected or wish to do so.

Now i want to migrate to Gargoyle and configure samba the same way as on OpenWrt. But I can't seem to make it work. Somehow my smbd daemon won't start automatically on boot. I tried /etc/init.d/samba enable as described on http://wiki.openwrt.org/doc/howto/cifs. ... rt.on.boot but no luck. However, when i start it by hand using /bin/smbd it does show up in ps. So i guess my samba configuration is accepted by it.

So, what is the proper way to enable samba on Gargoyle?

Re: How to configure/autostart samba daemon?

Posted: Sat Mar 03, 2012 9:14 pm
by hnl_dk
You can set it up (Through the commandline) on the same way as on OpenWRT backfire (the latest branch).

Re: How to configure/autostart samba daemon?

Posted: Sat Mar 10, 2012 4:23 pm
by rintje
SOLVED
For who is interested: samba didn't come up because the startup script at /etc/init.d/samba demands at least one configured samba share. Otherwise it just refuses to start.
So, the solution is the to uncomment the preconfigured samba share in /etc/config/samba and restart samba by running /etc/init.d/samba reload.

Edit:
And to be even more complete ;) : use the following samba config in /etc/samba/smb.conf.template to make your router the samba domain master in the network. (This may vastly improve network browsing speed on your LAN)

Code: Select all

[global]
        netbios name = |NAME|
        workgroup = |WORKGROUP|
        server string = |DESCRIPTION|
        syslog = 10
        encrypt passwords = true
        passdb backend = smbpasswd
        obey pam restrictions = yes
        socket options = TCP_NODELAY SO_KEEPALIVE IPTOS_LOWDELAY
        unix charset = UTF-8
        os level = 255
        domain master = yes
        local master = yes
        preferred master = yes
        security = user
        wins support = yes
        guest account = nobody
        invalid users = root
        smb passwd file = /etc/samba/smbpasswd