Samba Builtin/Entware: Public Shares / Windows 10

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4  Next
Author Message
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12881
Location: Netherlands

PostPosted: Sun Dec 05, 2021 8:55    Post subject: Reply with quote
I have not heard back from the developer (usually meaning: No can do)

As I was compiling anyway for my EA6900 (which uses the same build) attached the build 47745 for your R7000 Smile

It has some extra bonus, updated OpenVPN, Overclocking via the GUI and of course the Samba patch Smile

Also attached the patch so that you can so how easy it is to make such a thing Smile



samba-guest-2.zip
 Description:

Download
 Filename:  samba-guest-2.zip
 Filesize:  1.37 KB
 Downloaded:  97 Time(s)


47745-K3_R7000.zip
 Description:

Download
 Filename:  47745-K3_R7000.zip
 Filesize:  18.86 MB
 Downloaded:  96 Time(s)


_________________
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
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Mon Dec 06, 2021 8:23    Post subject: Reply with quote
Speaking of ksmbd, why isn't ksmbd.control included in DD-WRT?

https://github.com/namjaejeon/ksmbd-tools/

KSMBD - SMB3 Kernel Server — The Linux Kernel documentation
https://www.kernel.org/doc/html/latest//filesystems/cifs/ksmbd.html

And is it normal to see 2 instances of ksmbd.mountd? Same as Dropbear SSH? Smile

Code:
 3550 root     ksmbd.mountd -c /tmp/smb.conf -u /tmp/smb.db
 3551 root     ksmbd.mountd -c /tmp/smb.conf -u /tmp/smb.db
 3564 root     [ksmbd-lo]
 3569 root     [ksmbd-eth0]
 3573 root     [ksmbd-vlan2]
 3575 root     [ksmbd-br0]
 4185 root     sh -c alias ping='ping -c 3'; eval "ps | grep ksmb" > /tmp/ping.log 2>&1 &
 4187 root     grep ksmb


That Didn't Take Long: KSMBD In-Kernel File Server Already Needs Important Security Fix - Phoronix
https://www.phoronix.com/scan.php?page=news_item&px=SMB3-File-Server-Security-Fix

A rough start for ksmbd [LWN.net]
https://lwn.net/Articles/871866/

Linux Kernel 5.15 Released, Here Are the Top 3 New Features
https://linuxiac.com/linux-kernel-5-15/
Quote:
1. Improved NTFS File System Support
2. New in-kernel SMB3 File Server (KSBMD)
3. Optimized File Systems(ext4, xfs, btrfs)

Samsung Revs Its In-Kernel SMB3 Server Focused On Fast Performance, New Features - Phoronix
https://www.phoronix.com/scan.php?page=news_item&px=Samsung-KSMBD-v7


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14217
Location: Texas, USA

PostPosted: Mon Dec 06, 2021 13:49    Post subject: Reply with quote
1) We are likely not going to see Linux 5.x in DD-WRT due to firmware size constraints
2) I can email/check and see if this patch has been employed in the last updates merged to DD-WRT
(or you can compare if you know where to look!)
3) It seems as is people do not think that BrainSlayer doesn't read the news.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Mon Dec 06, 2021 16:15    Post subject: Reply with quote
kernel-panic69 wrote:

3) It seems as is people do not think that BrainSlayer doesn't read the news.

Here comes your dark psychology, again! Smile


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14217
Location: Texas, USA

PostPosted: Mon Dec 06, 2021 16:58    Post subject: Reply with quote
If you read the email exchanges between he and I / commentary on Trac by the man himself, you would understand why I made that statement Laughing Cool Wink
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Wed Dec 08, 2021 16:19    Post subject: Reply with quote
egc wrote:
I have not heard back from the developer (usually meaning: No can do)

As I was compiling anyway for my EA6900 (which uses the same build) attached the build 47745 for your R7000 Smile

It has some extra bonus, updated OpenVPN, Overclocking via the GUI and of course the Samba patch Smile

Also attached the patch so that you can so how easy it is to make such a thing Smile


This is very interesting the fact you guys have the ability to get variables from the HTML directly to NVRAM parameters so fast.

I'm not aware how DD-WRT is developed, if it's closed source, open-source or something in between nor what the relationship between all that and embeDD GmbH.

Thank you for the new updated patch for my R7000's Smile

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Wed Dec 08, 2021 16:23    Post subject: Reply with quote
mwchang wrote:

And is it normal to see 2 instances of ksmbd.mountd? Same as Dropbear SSH? Smile


I believe those aren't two instances but 2 different threads of the same program.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14217
Location: Texas, USA

PostPosted: Wed Dec 08, 2021 16:42    Post subject: Reply with quote
TCB13 wrote:
This is very interesting the fact you guys have the ability to get variables from the HTML directly to NVRAM parameters so fast.

I'm not aware how DD-WRT is developed, if it's closed source, open-source or something in between nor what the relationship between all that and embeDD GmbH.


NewMedia-NET GmbH and embeDD GmbH are both parts of all that is DD-WRT. I forget the particulars, and it doesn't seem to be blatantly explained anywhere that I know of, off the top of my head.

https://svn.dd-wrt.com/
https://github.com/mirror/dd-wrt
https://dd-wrt.com/about/
https://forum.dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F
https://en.wikipedia.org/wiki/DD-WRT

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Thu Dec 09, 2021 6:51    Post subject: Reply with quote
TCB13 wrote:
mwchang wrote:

And is it normal to see 2 instances of ksmbd.mountd? Same as Dropbear SSH? Smile


I believe those aren't two instances but 2 different threads of the same program.

Thanks....

BTW, in DD-WRT 47822, Samba got a new option "Access Level" that has 2 values: "Everyone", "Restricted". This should affect "map to guest=", corresponding to "bad user" and "never" respectively. Same as what egc said.

Default is "Everyone"????


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Thu Dec 09, 2021 8:12    Post subject: Reply with quote
TCB13 wrote:
Glad to be helpful. Btw, according to https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html Samba supports the following options for "Map to guest":

- Never
- Bad User
- Bad Password
- Bad Uid

Maybe you can add all of them just in case anyone complains about this.

egc wrote:
I cannot do any sophisticated things at the moment as I am tied up and that would really need me to dig in and test etc.

I made a dropdown box which lets you choose "bad user" or "never" do not look at the text/translation
Everyone = bad userRestricted= never

Counter-proposal: let there be 6 options, the first 2 being Everyone & Restricted, the last 4 being Never, Bad User, Bad Password, Bad Uid! Let user decide. In the long run, it might save some maintenance work. Smile


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Fri Dec 10, 2021 8:59    Post subject: Reply with quote
An old reply I wrote about "map to guest" in kernel-mode Samba that led to changing its value from "never" to "bad user":

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1241496

from

DD-WRT Forum :: View topic - New Build - 07/20/2021 - r47074
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=329716

It was all about fixing public shares, so that no login credential needed.


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw


Last edited by mwchang on Fri Dec 10, 2021 9:17; edited 8 times in total
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Fri Dec 10, 2021 9:11    Post subject: Reply with quote
TCB13 wrote:

b) Change the parameter during boot, I can add this to my startup commands:

Code:
# Built in Samba - Fix SMB Windows
sed -i "/^map to guest/c\map to guest = never" /tmp/smb.conf
killall ksmbd.mountd
ksmbd.mountd -c /tmp/smb.conf -u /tmp/smb.db

The proper way to use your custom smb.conf is creating /jffs/etc/smb.conf. You don't have to touch the init process. You could also mount a USB flash drive as /jffs/, after disabling JFFS2 in WEBUI.


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Fri Dec 10, 2021 11:54    Post subject: Reply with quote
mwchang wrote:
TCB13 wrote:

b) Change the parameter during boot, I can add this to my startup commands:

Code:
# Built in Samba - Fix SMB Windows
sed -i "/^map to guest/c\map to guest = never" /tmp/smb.conf
killall ksmbd.mountd
ksmbd.mountd -c /tmp/smb.conf -u /tmp/smb.db

The proper way to use your custom smb.conf is creating /jffs/etc/smb.conf. You don't have to touch the init process. You could also mount a USB flash drive as /jffs/, after disabling JFFS2 in WEBUI.



Yeah but my sed allows me to keep using the GUI to add, remove and change the shares without having to touch a file via SSH. Smile

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
TCB13
DD-WRT User


Joined: 06 Jun 2010
Posts: 260
Location: Portugal

PostPosted: Fri Dec 10, 2021 12:13    Post subject: Reply with quote
mwchang wrote:

BTW, in DD-WRT 47822, Samba got a new option "Access Level" that has 2 values: "Everyone", "Restricted". This should affect "map to guest=", corresponding to "bad user" and "never" respectively. Same as what egc said.

Default is "Everyone"????


Thank you for spotting this! I've upgraded to r47822 just now and yes it does include it. Now I can remove my workaround Smile

Unfortunately the default means new users would have to read this thread in order to have it working under Windows but we made some progress!

Thank you all guys.

_________________
1x Netgear R7800 (latest); 3x Netgear R7000 (latest); 2x Asus RT-N16 (v3.0-r47656); 2x Fonera 2100 (v3.0-r45454).
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1856
Location: Hung Hom, Hong Kong

PostPosted: Fri Dec 10, 2021 13:54    Post subject: Reply with quote
TCB13 wrote:
mwchang wrote:
Default is "Everyone"????


Thank you for spotting this! I've upgraded to r47822 just now and yes it does include it. Now I can remove my workaround Smile

Unfortunately the default means new users would have to read this thread in order to have it working under Windows but we made some progress!

Someone needs to update the Wiki? Smile

I think the default should better be "Everyone", as most people expected simple access to network shares in a router/NAS.


_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 3 of 4
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware 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