1 Create a new user on the ip:10.4.35.77 Windows machine. Here new user name: MyShare, Password: myshare123.
Select the "Computer" right mouse button to select "Admin", Local Users and groups, user = "right button, new user."
3 View the MyShare domain. In turn: Control Panel \ All Control Panel items \ user accounts. Manage users. You can see the fields as: jszx-yh-59.
4 Create a new shared directory. Create a new mytest directory (F:\mytest) on the F disk. Select MyTest. Right-click. Select Properties. Click on Share.
5) Find the user.
6) Click on the location selected: jszx-yh-59 domain.
7 Input MyShare user.
8) Set MyShare to MyTest read and write permissions. Click on 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 users with root permissions. The default owner and group for the mounted folder are root and the permissions cannot be changed through the chmod command.
1 Use the Mount command to assign owner and group to 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 for the group that the Mount shared folder is in.
# mount-o Username= "MyShare", password= "myshare123", uid=dev,gid=dev,dir_mode=0777//10.4.35.77/mytest/mnt/mytest