Rotten mud: CentOS6.5 mounting windows shared folder, centos6.5 mounting
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
Because of work requirements, you need to share the local folder and then temporarily use it on the CentOS server.
The server uses the CentOS system, while the local machine uses the win7 system. For temporary use, we do not plan to build FTP and Samba servers, but directly mount windows Shared Folders through CentOS.
Since windows Shared Folders are used, we must first create a shared directory on the local machine. As follows:
Note that the permission we share with the administrator is the read/write permission. We will test this permission in the CentOS system.
After the shared folder is configured, access the shared folder on another machine to check whether the shared folder is successful. As follows:
\ 192.168.1.126
We can see that this share can be accessed normally.
Now we can mount it on CentOS with the following command:
Mount-t cifs-o username = administrator, password = @ // 192.168.1.126/789/share/
We can see that the shared folder has been successfully mounted on the server.
Cifs in this command represents the Microsoft cifs protocol.
If you want to enable the sharing to be automatically mounted after CentOS is started, you can edit the/etc/fstab file and add the following command:
// 192.168.1.126/789/iso cifs auto, username = administrator, password = @ 0 0
You can also use the following command:
Echo "// 192.168.1.126/789/share cifs auto, username = administrator, password = @ 0 0">/etc/fstab
To cancel mounting, run the following command:
Umount/iso
The following describes how to mount and detach windows Shared Folders. We will test the permission of shared folders.
Note that in the preceding command, we mount the shared object to use the administrator user. As mentioned above, the administrator user has read and write permissions on the shared folder.
Now let's create a new directory and file, as shown below:
Mkdir/share/testdir
Touch/share/testfile. sh
Through the above two images, we found that the permission is indeed the same as the one we used to share folders, with the read and write permissions.
This article describes how to mount windows shared folders on CentOS.
How can I mount WINDOWS shared folders in CENTOS53? And direct mounting at startup.
Mount-t cifs-o username = kevin, password = 123456 // 192.168.1.10/cmdfles/Program Files
The command is correct.
You are running Linux. If WINDWOS is automatically mounted at startup
You can use the. bashrc file in the home directory.
Modify the file and add your command in it. This will automatically execute this command every time you log on to the system.
Another method is to modify the/etc/fstab file and add the following sentence:
// 192.168.1.10/cmdfles/Program Files cifs ults, auto, username = kevin, password = 123 0 0
It will be automatically mounted after restart.
If you have any questions, ask me.
QQ: 283684366
How to mount windows shared folders on ubuntu
Assume that the share Name of your shared document is share.
Mount-t cifs // 192.168.0.1/share-o username = username, password = password
In general,-o username = user name, password = password can be used