2018-01-09 20:19:25 +00:00
|
|
|
# smbclient
|
|
|
|
|
|
|
|
> FTP-like client to access SMB/CIFS resources on servers.
|
|
|
|
|
2018-01-10 16:41:27 +00:00
|
|
|
- Connect to a share (user will be prompted for password; `exit` to quit the session):
|
2018-01-09 20:19:25 +00:00
|
|
|
|
|
|
|
`smbclient {{//server/share}}`
|
|
|
|
|
2018-01-10 16:41:27 +00:00
|
|
|
- Connect with a different username:
|
|
|
|
|
|
|
|
`smbclient {{//server/share}} --user {{username}}`
|
|
|
|
|
2019-04-08 19:03:25 +01:00
|
|
|
- Connect with a different workgroup:
|
|
|
|
|
|
|
|
`smbclient {{//server/share}} --workgroup {{domain}} --user {{username}}`
|
|
|
|
|
2018-01-09 20:19:25 +00:00
|
|
|
- Connect with a username and password:
|
|
|
|
|
|
|
|
`smbclient {{//server/share}} --user {{username%password}}`
|
|
|
|
|
|
|
|
- Download a file from the server:
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
`smbclient {{//server/share}} --directory {{path/to/directory}} --command "get {{file.txt}}"`
|
2018-01-09 20:19:25 +00:00
|
|
|
|
|
|
|
- Upload a file to the server:
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
`smbclient {{//server/share}} --directory {{path/to/directory}} --command "put {{file.txt}}"`
|