custom smb.conf

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
jd8121
DD-WRT Novice


Joined: 23 Mar 2013
Posts: 13

PostPosted: Thu Mar 12, 2020 2:15    Post subject: custom smb.conf Reply with quote
Hi, I've been a forum member for years but this is my first post.

I recently wanted to try a custom smb.conf file for the built-in samba/file sharing, and by searching in the forum discovered the file was to be put at /jffs/etc/smb.conf - when that did not work, I checked the samba3.c file in source code and noticed when smbd/nmbd (among others) are used, a variable was set to that location and used if custom file exists (or to /tmp/smb.conf if it doesn't) but, ksmbd.mountd in recent builds is set (line 273) to use default location /tmp/smb.conf specifically.

Long story short:
Will ability to use a custom smb.conf be enabled for samba ksmbd.mountd soon/in the future/never?

Thanks in advance!
Sponsor
portsup
DD-WRT User


Joined: 20 Oct 2018
Posts: 210

PostPosted: Sat Mar 14, 2020 16:00    Post subject: Reply with quote
Your best bet would be to do like I did with proftpd and uncheck it in the webgui and start it manually with script.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12908
Location: Netherlands

PostPosted: Sat Mar 14, 2020 16:40    Post subject: Re: custom smb.conf Reply with quote
jd8121 wrote:
Hi, I've been a forum member for years but this is my first post.

I recently wanted to try a custom smb.conf file for the built-in samba/file sharing, and by searching in the forum discovered the file was to be put at /jffs/etc/smb.conf - when that did not work, I checked the samba3.c file in source code and noticed when smbd/nmbd (among others) are used, a variable was set to that location and used if custom file exists (or to /tmp/smb.conf if it doesn't) but, ksmbd.mountd in recent builds is set (line 273) to use default location /tmp/smb.conf specifically.

Long story short:
Will ability to use a custom smb.conf be enabled for samba ksmbd.mountd soon/in the future/never?

Thanks in advance!


You are absolutely right.
I think that with a few tweaks it would be possible to use the conffile variable (remove --configfile= from it and hardcopy it to the start up rule for SAMBA3 and SAMBA4)

You can file a report in the bug tracker, asking for this enhancement, link to this thread.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
jd8121
DD-WRT Novice


Joined: 23 Mar 2013
Posts: 13

PostPosted: Sat Mar 14, 2020 22:44    Post subject: Reply with quote
@portsup: I will look into that, even if just to learn something new - a different workaround I did have working was installing samba separately through entware, but nothing beats the elegant simplicity of having an already built in custom smb.conf location working again if it's possible

@egc: Wasn't sure if it was a bug, or intentional for some reason, seemed better to ask first before reporting a bug with me having "0" previous posts (despite the 7 years I've been a forum member) before starting this thread Smile

Will check out the bug tracker later tonight, thanks for the replies all!
https://svn.dd-wrt.com/ticket/7021
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7492
Location: Dresden, Germany

PostPosted: Sun Mar 15, 2020 6:41    Post subject: Re: custom smb.conf Reply with quote
jd8121 wrote:
Hi, I've been a forum member for years but this is my first post.

I recently wanted to try a custom smb.conf file for the built-in samba/file sharing, and by searching in the forum discovered the file was to be put at /jffs/etc/smb.conf - when that did not work, I checked the samba3.c file in source code and noticed when smbd/nmbd (among others) are used, a variable was set to that location and used if custom file exists (or to /tmp/smb.conf if it doesn't) but, ksmbd.mountd in recent builds is set (line 273) to use default location /tmp/smb.conf specifically.

Long story short:
Will ability to use a custom smb.conf be enabled for samba ksmbd.mountd soon/in the future/never?

Thanks in advance!


its in total conflict with the gui configuration which will be unuseable. nobody holds you back from starting samba manually with start scripts. but its pointless since everything you need can be configured in gui.

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
jd8121
DD-WRT Novice


Joined: 23 Mar 2013
Posts: 13

PostPosted: Tue Mar 17, 2020 2:07    Post subject: Reply with quote
@BrainSlayer: Thank you for changeset 42693, and many thanks for all the hard work that makes DD-WRT possible!
portsup
DD-WRT User


Joined: 20 Oct 2018
Posts: 210

PostPosted: Tue Mar 17, 2020 13:02    Post subject: Reply with quote
I would be very surprised you can configure everything with smb just through the gui. Most things I have had to get more involved in like openvpn, proftpd and some network stuff has required beyond gui config.

I think it would be far easier to worry less on the gui and just add an option for custom config files for most everything....
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12908
Location: Netherlands

PostPosted: Tue Mar 17, 2020 13:17    Post subject: Reply with quote
portsup wrote:
I would be very surprised you can configure everything with smb just through the gui. Most things I have had to get more involved in like openvpn, proftpd and some network stuff has required beyond gui config.

I think it would be far easier to worry less on the gui and just add an option for custom config files for most everything....


exactly Smile

For a lot of things that is the case already, but sadly not for all Sad

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum