smbclient

Command-line tool used for accessing and managing shared files and resources on remote SMB/CIFS network systems

Syntax
#Listing shares
smbclient -L //IP             #List shares !If using backslash use "\\\\" because single "\" is for escaping next character and we need literal "\\IP\share"
smbclient -N -L //IP          # -N Supress password prompt

#Connecting
smbclient //IP/share          #Basic connect as current user
smbclient -U user //IP/share  #Connect and will be asked for password
smbclient -U user%password    #Connect directly with password

#Useful commands once connected
help                          #List all commands
get file                      #Download files
lcd                           #Change directory on your local computer
mput file1.txt script.py      #Download multiple files
mget *.txt data.*             #Upload multiple files

Last updated