Skip to content

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
smbstatus --sharess

If got message below, should be fixed

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

List samba users

pdbedit -L -v

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 by gio

gio mount smb://srv.loc/shared