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