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