Mount command mount Windows7 shared directory in CentOS

Source: Internet
Author: User


1) Create a new user on the ip:10.4.35.77 Windows machine. Here new user name: MyShare, Password: myshare123.

Select "Computer" right-click "Manage", local Users and groups, user = "Right", create new user.






3) View the MyShare domain. In order: Control Panel \ All Control Panel items \ User account. Manage users. You can see that the domain is: jszx-yh-59.




4) Create a new shared directory. New MyTest directory (F:\mytest) in F-drive. Select MyTest. Right-click the button. Select Properties. Click Share.


5) Find the user.


6) Click on the location selected: jszx-yh-59 domain.


7) Enter MyShare user.




8) Set MyShare to read and write permissions to MyTest. Click Share.




9) Mount the MyTest directory on ip:10.1.20.21 Linux.
# Mkdir/mnt/mytest

# Mount-o username=myshare,password=myshare123//10.4.35.77/mytest/mnt/mytest







Extended:

Because the mount command can only be used by the root user. The default owner and group for the mounted folder are root and cannot be changed by the chmod command.


1) Use the Mount command to specify the owner and group for the mounted shared folder. The UID represents the user. GID Representation Group


# mount-o Username= "MyShare", password= "myshare123", Uid=dev,gid=dev//10.4.35.77/mytest/mnt/mytest


2) Write permission to the group where the Mount shared folder is located.


# mount-o Username= "MyShare", password= "myshare123", uid=dev,gid=dev,dir_mode=0777//10.4.35.77/mytest/mnt/mytest

Mount command mount Windows7 shared directory in CentOS

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.