diff --git a/pages/common/smbclient.md b/pages/common/smbclient.md new file mode 100644 index 0000000000..8cbebacc5f --- /dev/null +++ b/pages/common/smbclient.md @@ -0,0 +1,32 @@ +# smbclient + +> FTP-like client to access SMB/CIFS resources on servers. +> More information: . + +- 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}}'` diff --git a/pages/linux/smbclient.md b/pages/linux/smbclient.md deleted file mode 100644 index 0c3194799e..0000000000 --- a/pages/linux/smbclient.md +++ /dev/null @@ -1,32 +0,0 @@ -# smbclient - -> FTP-like client to access SMB/CIFS resources on servers. -> More information: . - -- 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`