mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 10:01:47 +00:00
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# smbclient
|
|
|
|
> FTP-like client to access SMB/CIFS resources on servers.
|
|
> More information: <https://manned.org/smbclient>.
|
|
|
|
- List available shares on a server anonymously:
|
|
|
|
`smbclient {{[-L|--list]}} {{server}} --no-pass`
|
|
|
|
- Connect to a share (will prompt for a password):
|
|
|
|
`smbclient //{{server}}/{{share}}`
|
|
|
|
- Connect to a share as a specific user:
|
|
|
|
`smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}}`
|
|
|
|
- Connect to a share as a specific user with inline password:
|
|
|
|
`smbclient {{[-U|--user]}} {{domain/username%password}} //{{server}}/{{share}}`
|
|
|
|
- Connect to a share using a specific workgroup:
|
|
|
|
`smbclient {{[-W|--workgroup]}} {{domain}} {{[-U|--user]}} {{username}} //{{server}}/{{share}}`
|
|
|
|
- Download 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}}'`
|