Samba commands in CentOS

Source: Internet
Author: User
Tags ftp commands
Smbclient usage 1, listing the shared folder smbclient-L198.168.0.1-Uusername % password2 provided by an IP address, after smbclientsmbclient // 192.168.0.1/tmp-Uusername % password is successfully executed like an FTP client, enter the smbclient environment and prompt: smb :\& gt; there are many

Smbclient usage

1. list the shared folders provided by an IP address.
Smbclient-L 198.168.0.1-U username % password

2. use smbclient like an FTP client
Smbclient // 192.168.0.1/tmp-U username % password

After the smbclient command is successfully executed, enter the smbclient environment and a prompt is displayed: smb: \>
Many commands are similar to ftp commands, such as cd, LCD, get, megt, put, and mput. With these commands, we can access the shared resources of remote hosts.

3. directly use the smbclient command at one time
Smbclient-c "ls" // 192.168.0.1/tmp-U username % password
And
Smbclient // 192.168.0.1/tmp-U username % password
Smb: \> ls
Same functions

Create a shared folder
Smbclient-c "mkdir share1" // 192.168.0.1/tmp-U username % password
If the user shares/192.168.0.1/tmp in read-only mode, a message is displayed.
NT_STATUS_ACCESS_DENIED making remote directory \ share1
4. in addition to smbclient, you can also mount remote shared folders through mount and smbcount.
Mount-t smbfs-o username = administrator, password = 123456 // 192.168.0.1/tmp/mnt/tmp
Smbmount // 192.168.0.1/tmp/mnt/tmp-o username = administrator


Related Article

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.