Skip to content

Samba

Check current config

$ testparm
...
Load smb config files from /etc/samba/smb.conf
Processing section "[filestorage]"
Processing section "[shared]"
Loaded services file OK.
Server role: ROLE_STANDALONE
smbstatus --sharess

If got message below, should be fixed

testparm -v
...
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

smbclient

List shares:

smbclient -L [IP] -U [login]

Get list of files

smbclient //[IP]/[Share] -U [USER]  '[PASSWORD]' -c 'recurse; ls' > samba-list.xt

Download folder recursive bash recurse ON prompt OFF mget *P