Options (5)
-L, --listbooleanList available shares on a server anonymously
Example:
smbclient {{[-L|--list]}} {{server}} --no-pass-U, --userbooleanConnect to a share as a specific user
Example:
smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}}-W, --workgroupbooleanConnect to a share using a specific workgroup
Example:
smbclient {{[-W|--workgroup]}} {{domain}} {{[-U|--user]}} {{username}} //{{server}}/{{share}}-D, --directorybooleanDownload a file from a specific directory on a share
Example:
smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}} {{[-D|--directory]}} {{path/to/directory}} {{[-c|--command]}} 'get {{filename}}'-c, --commandbooleanDownload a file from a specific directory on a share
Example:
smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}} {{[-D|--directory]}} {{path/to/directory}} {{[-c|--command]}} 'get {{filename}}'Examples (7)
List available shares on a server anonymously
smbclient [-L|--list] server --no-passConnect to a share (will prompt for a password)
smbclient //server/shareConnect to a share as a specific user
smbclient [-U|--user] domain/username //server/shareConnect to a share as a specific user with inline password
smbclient [-U|--user] domain/username%password //server/shareConnect to a share using a specific workgroup
smbclient [-W|--workgroup] domain [-U|--user] username //server/shareDownload a file from a specific directory on a share
smbclient [-U|--user] domain/username //server/share [-D|--directory] path/to/directory [-c|--command] 'get filename'Upload a file to a specific directory on a share
smbclient [-U|--user] domain/username //server/share [-D|--directory] path/to/directory [-c|--command] 'put path/to/local_file'made by @shridhargupta | data from tldr-pages