Mutual access to shared folders in linux and windows

Source: Internet
Author: User
For linux and windows shared folders, you must first install samba to ACCESS linux folders from windows. 1. configure the shared folder vi/etc/samba/smb. conf example: [filename] path/filecommentfilebrowseableyeswritableyes... for linux and windows shared folders, you must first install samba to ACCESS linux folders from windows. 1. configure the shared folder vi/etc/samba/smb. conf example: [filename] path =/filecomment = file browseable = yeswritable = yes www.2cto.com 2 disable firewall service iptables stop 3 create shared password smbpassword-a user1 ---- now you can access linux file, but there is a security problem,
As long as the user knows the samba account, it is equivalent to knowing a system account. if the password is cracked,
Attackers can attack samba machines. We can use account ING to solve this problem. 4. the account is mapped to/etc/samba/smb. add the following line to the global settings of conf: username map =/etc/samba/smbuserssmbadduser [user1] (account in linux): [user2] (account in windows) */etc/samba/smbuser ing stores the file www.2cto.com. it is very easy to access the Windows folder from Linux, just type the following command. Mount-t smbfs-o username = user, password = password, ip = 192. 168. **. ** // how.achine_name/Tinix/mnt/smb/Tinix where username and password must be valid usernames and passwords on the host and have the permission to access the shared folder Tinix. How.achine_name is the name of the host machine. Note that no space is allowed after the comma.
We do not need to configure the Samba server, because we do not want to access Linux from Windows, we only need
Folder sharing, so that both the host machine and virtual machine can be accessed, and our goal is achieved.
Now, you can see files in Windows in the/mnt/smb/Tinix directory. For example, if there is a shared folder temp on 192.168.1.37, you can mount-t smbfs-o username = guanjun, password = goodguanjun // 192.168.1.37/temp/mnt/cdrom. Author: luckpiky
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.