What's new

Linux-prompt command to increase Samba max connections?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

RussellInCincinnati

Senior Member
The ...49 Merlin firmware limit for simultaneous Samba connections is 5. Am sure there is a good reason for Merlin to limit this number.

However am noticing that on the RT-AC68U the Samba version 2 filesharing performance is so good (70 megabytes per second read from an ext2 format Patriot Magnum USB 3.0 solid state drive to a wired user, 27 megs/sec to wireless), that am now wanting to use the '68U as a file server/no-cost NAS for more than 5 users.

Merlin was kind enough to show us how to enable Samba version 2 filesharing. Via the Linux prompt you get when you make an SSH secure shell connection to the Merlin routers:
Code:
nvram set smbd_enable_smb2=1
nvram commit

Wondering if there is an analogous Linux prompt command (say with "nvram commit") one could set, to increase the max number of Samba connections beyond the 5 that the December 2014 user interface allows?

My 'AC68Us are only using 20% of available memory these days (with DLNA and media server features turned off in the USB application Merlin page). Am allowing no-password guest access to the Samba storage since most users are wirelessly passworded anyway. Seems like there's enough memory sloshing around for the 68U to handle a few more Samba connections.
 
Last edited:
max log size = 5 in /etc/smb.conf

But as you said there is probably a nvram variable to make the field survive a reboot...
 
nvram variable is

st_max_user=5

There was a commit to raise the limit in the gui from 5 to 10 a while back...it may have gotten lost in one of the Asus merges.

Edit: The commit was on the ftp page (it shares the same variable)....you can set it there. It looks like when it got added to the Samba page, the 5 limit is still in place.
 
Last edited:
...There was a commit to raise the limit in the gui from 5 to 10 a while back...it may have gotten lost in one of the Asus merges.

Edit: The commit was on the ftp page (it shares the same variable)....you can set it there.
Such a perfect explanation, thanks so much!

How do you know all this? Hmm does this mean we should all be examining some source code to find out about such variables?

Yes, how beautifully simple. As john9527 says, you can set the FTP connections limit to 9 right in the Merlin GUI user screens. And that is indeed also setting the SAMBA max connections to 9. And the 9 obediently and instantly shows up on the Samba config page.
 
I'm sure Merlin will see this thread and update the Samba page as well....just an oversight.
 
I'm sure Merlin will see this thread and update the Samba page as well....just an oversight.

I think it's already there, isn't it ?
 

Attachments

  • asus-13.jpg
    asus-13.jpg
    72.6 KB · Views: 658
Last edited:
Such a perfect explanation, thanks so much!

How do you know all this? Hmm does this mean we should all be examining some source code to find out about such variables?

All persistent nvram settings are defined here:

https://github.com/RMerl/asuswrt-merlin/blob/master/release/src/router/shared/defaults.c

Yes, how beautifully simple. As john9527 says, you can set the FTP connections limit to 9 right in the Merlin GUI user screens. And that is indeed also setting the SAMBA max connections to 9. And the 9 obediently and instantly shows up on the Samba config page.

Doing so will cause issues however when you go back to that page and try to change anything - it will complain that the value is too high. You might want to directly manipulate smb.conf through a postconf script.

I'll take a look at the page to see if its limit was reverted back to 5. When Asus moved the setting from the Misc page this might have ended up getting back their own limit of 5 instead of the limit of 10 I was originally allowing.
 
I meant raising the upper limit from 5 to 10 on the Samba page.
 
I'll take a look at the page to see if its limit was reverted back to 5. When Asus moved the setting from the Misc page this might have ended up getting back their own limit of 5 instead of the limit of 10 I was originally allowing.

Fixed. Also fixed the FTP page by allowing you to enter two digits (so you can type "10").

https://github.com/RMerl/asuswrt-merlin/commit/1f25cc525106eab46419cf91e5fb00292e261b0c

https://github.com/RMerl/asuswrt-merlin/commit/02c754afdca5ddec5f1937ba763465f3b86d8173
 
Hi all. I recently installed an Asus RT-N66U. It has Asus firmware 3.0.0.4.376.3754. I set up a Samba share. Some clients can map the drive, others deliver an "insufficient resources" error. It's rarely the same clients that have the problem. After about two weeks of dealing with this problem, I think this thread identifies the issue: A 5-user limit.

I need to increase this limit, and this thread seems to indicate that this is possible. Ideally, I'd like something that holds through a router reboot. However, at this point, even a temporary config change would be better than what we have.

The steps discussed here are beyond me. For instance, I downloaded Putty to make an SSH connection, but I don't even know what port to use, or whether I have to do something to the router first. I'm not averse to installing third-party firmware on the router, but I'd prefer to make this one simple tweak to the generic firmware.

I'm so happy to have found this thread, as it removes the frustration of not understanding why the Samba share wasn't working as expected. However, I now have a new frustration: A solution seems within my reach, but I don't understand how to take the information in this thread and turn it into actions that will solve my problem.

Is there a step-by-step primer for dealing with this, or would someone here be interested in guiding a newbie through the process?
 
@FkAd

Welcome to the forum!

For casual use, I'd recommend you just use telnet to make the changes.


- If telnet is not enabled on the router go to the Administration/System page
(default is http://192.168.1.1/Advanced_System_Content.asp)
and click the radio button to enable telnet, and then click Apply to save the change.

- Open a telnet session on your computer

If you are on windows, this will tell you how to install telnet....
http://social.technet.microsoft.com/wiki/contents/articles/910.windows-7-enabling-telnet-client.aspx

If Linux, telnet is included in all distributions. Open a terminal window and type telnet

- Once you get the telnet prompt enter

o 192.168.1.1 (that's the letter 'o' for open)
You will then be prompted for your logon info (same info as you use to logon to the router gui)

Once you are logged into telnet enter:

nvram set st_max_user=10
nvram commit
reboot

This will stay active until you need to change something on either the Samba or FTP pages, at which point
it won't let you save the changes until you reduce the limit to 5 or less. Then you will need to perform
the above procedure again to set the limit back to 10.
 
Hi all. I recently installed an Asus RT-N66U. It has Asus firmware 3.0.0.4.376.3754. I set up a Samba share. Some clients can map the drive, others deliver an "insufficient resources" error. It's rarely the same clients that have the problem. After about two weeks of dealing with this problem, I think this thread identifies the issue: A 5-user limit.

I need to increase this limit, and this thread seems to indicate that this is possible. Ideally, I'd like something that holds through a router reboot.

If nine or ten users is enough, just set the user limit to 9 or 10 on the FTP pages as described above, after you have finished fiddling with and saving the Samba option page. The FTP user limit change WILL survive a reboot and the Samba limit is reading the same variable as the FTP limit, also as explained above.
 
Solved!

@john9527

Your three lines cracked the code! Thank you so very much. My users are back to being happy.

@RussellInCincinnati

When I tried your method, I'd type in 9 or 10 and then instantly got a dialog box saying the entry in the box was limited to 5 or less.

You guys are so generous. Thanks again.
 
you are asking a non-Merlin question in a Merlin firmware forum

@john9527

Your three lines cracked the code! Thank you so very much. My users are back to being happy.

@RussellInCincinnati

When I tried your method, I'd type in 9 or 10 and then instantly got a dialog box saying the entry in the box was limited to 5 or less.

You guys are so generous. Thanks again.

Ah, should have noticed that you are not running Merlin firmware. So you could not set the FTP users to 9 as I described above, it seems.

There is indeed another forum for Asus firmware questions.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top