Smbclient and Mount Samba shared directory

Source: Internet
Author: User
Tags ftp ftp commands ftp client
1, list the shared folders provided by an IP address smbclient-l 198.168.0.1-u marsaber%1233211234567

2, use smbclient like FTP client
Smbclient//192.168.0.1/tmp-u marsaber%1233211234567

After the execution of the smbclient command succeeds, enter the smbclient environment, and a prompt appears: smb:\>
There are many commands similar to FTP commands, such as CD, LCD, GET, megt, put, mput, and so on. With these commands, we can access the shared resources of the remote host.

3, direct one-time use smbclient command
Smbclient-c "ls"//192.168.0.1/tmp-u marsaber%1233211234567
And
Smbclient//192.168.0.1/tmp-u marsaber%1233211234567
Smb:\>ls
Function-like

Example, create a shared folder
Smbclient-c "mkdir share1"//192.168.0.1/tmp-u marsaber%1233211234567
If a user shares//192.168.0.1/tmp in a read-only way, it prompts
nt_status_access_denied Making remote directory \share1

4, in addition to using smbclient, you can mount remote shared folders via mount and Smbcount[rhel5 without]
Mount//192.168.0.1/tmp/mnt/tmp-o username=marsaber%1233211234567

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.