mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
smbclient: move page from linux to common (#21576)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# 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}}'`
|
||||
@@ -1,32 +0,0 @@
|
||||
# smbclient
|
||||
|
||||
> FTP-like client to access SMB/CIFS resources on servers.
|
||||
> More information: <https://manned.org/smbclient>.
|
||||
|
||||
- Connect to a share (user will be prompted for password; `exit` to quit the session):
|
||||
|
||||
`smbclient {{//server/share}}`
|
||||
|
||||
- Connect with a different username:
|
||||
|
||||
`smbclient {{//server/share}} --user {{username}}`
|
||||
|
||||
- Connect with a different workgroup:
|
||||
|
||||
`smbclient {{//server/share}} --workgroup {{domain}} --user {{username}}`
|
||||
|
||||
- Connect with a username and password:
|
||||
|
||||
`smbclient {{//server/share}} --user {{username%password}}`
|
||||
|
||||
- Download a file from the server:
|
||||
|
||||
`smbclient {{//server/share}} --directory {{path/to/directory}} --command "get {{file.txt}}"`
|
||||
|
||||
- Upload a file to the server:
|
||||
|
||||
`smbclient {{//server/share}} --directory {{path/to/directory}} --command "put {{file.txt}}"`
|
||||
|
||||
- List the shares from a server anonymously:
|
||||
|
||||
`smbclient --list={{server}} --no-pass`
|
||||
Reference in New Issue
Block a user