Access File Share with smbclient

smbclient merupakan utilitas yang menyediakan interface mirip seperti FTP untuk mengakses SMB/CIFS di server. SMB/CIFS (Server Message Block/Common Internet File System) adalah protokol jaringan yang digunakan untuk berbagi file, printer, dan sumber daya lainnya antar komputer di jaringan.

smbclient usage

Connect ke SMB server

smbclient //IPserver/share -U user

Connect ke SMB server dengan port tertentu

smbclient //IPserver/share -U user -p 8045

Download file dari server

smbclient //IPserver/share --directory path/to/directory --command "get file.txt"

Upload file ke server

smbclient //IPserver/share --directory path/to/directory --command "put file.txt"

Untuk download semua file secara recursive.

smbclient \\IPserver\share -U user
mask ""
recurse ON
prompt OFF
cd 'path\to\remote\dir'
lcd '~/path/to/download/to/'
mget *

Jika dalam satu baris perintah.

smbclient \\IPserver\share -U user -N \
-c 'prompt OFF;recurse ON;cd 'path\to\directory\';lcd '~/path/to/download/to/';mget *'`