Samba
Server
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
If got message below, should be fixed
testparm -v
...
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
List samba users
Client
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
recurse ON
prompt OFF
mget *
smbget
it can continue downloading, with skipped existing files.
smbget --resume --recursive -U user --workgroup=DOMAIN smb://host/foo/bar
Mount samba share as user
sudo mount -t cifs -o rw,username={USER},uid={ID} //srv1/filestorage/ /mnt/srv-storage/