Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly

smb server
by admin
 at 2018-01-02 23:45:00.


sudo apt-get install samba samba-common-bin

a folder to shar

mkdir myfolder
chmod 777 myfolder

then we edit /etc/samba/smb.conf

workgroup = your_workgroup_name
wins support = yes
#for support of short cuts
follow symlinks = yes
wide links = yes
unix extensions = no

#for speed and compatibility optimization
# write cache size = 2097152 # 2MB - you should test some values it's pretty memory intesive
use sendfile = yes
lanman auth = no
ntlm auth = yes
client NTLMv2 = yes
client lanman auth = no
client plaintext = no

comment= test
only guest=no
create mask=0777
directory mask=0777


smbpasswd -a username (it should a username on you system)
service smbd restart
service nmbd restart

you can expect a top of 11 MB/s from a RP1 b and 20 to 25% more on RP2

for a better understanding of the configs

TCP_NODELAY tells the server to send as many packets as necessary to keep delay low. This will account for a 30 percent speedup by itself. In Samba 2.0 socket options = TCP_NODELAY became the default value.

IPTOS_LOWDELAY is another option trading off throughput for lower delay, but which affects routers and other systems, not the server. All the IPTOS options are new; they're not supported by all operating systems and routers though. If they are supported, set IPTOS_LOWDELAY whenever you set TCP_NODELAY. This option gives us a minor speed up around 20%.

SO_SNDBUF and SO_RCVBUF The send and receive buffers can often be the reset to a value higher than that of the operating system. This yields a marginal increase of speed until it reaches a point of diminishing returns. For a modern OpenBSD box serving shares to Windows xp/Vista or Linux machines a SO_SNDBUF and SO_RCVBUF of 65536 increased throughput by as much as 20% by itself.

SO_KEEPALIVE initiates a periodic check every four(4) hours to see if the client is still there. This option eventually arranges to close dead connections, returning unused memory and process-table entries to the operating system. Using this option is conjunction with "deadtime = 15" to close idle connection as fast as your working environment will allow