- SU (get root permission)
- Yum installs Samba (in fact we only use the Winbind in samba so that we can find the network address of the machine using the name of the Windows machine, as described in the following procedure.) Also, be sure to install the Microsoft Network client and Microsoft Network file and printer share two network protocols inside the protocol of the NIC on the Windows machine
- vi/etc/nsswitch.conf find hosts:files DNS changed to Hosts:files DNS wins (This step is also about allowing us to find the network address of the machine through the name of the Windows machine)
- Yum Install samba-client installs the Samba client (it will be used to access the Windows machine)
- Yum Install cifs-utils installs the CIFS Toolkit (to replace obsolete SMBFS)
- VI/ETC/.SMBPASSWD (Add content to hold the user name and password to access the Windows machine)
username = username
password = password
- mkdir/mnt/mount point Name (Create a mount point)
- Vi/etc/fstab Add the following to let the operating system start automatically mount the shared folder on the Windows machine to the mount point
//
你的windows机器名/共享文件夹名
/mnt/
你创建的挂载点 cifs rw,credentials=
/etc/
.smbpasswd 0 0
- MOUNT-A (Let the system re-mount all the mount points defined in the/etc/fstab file)
- cd/mnt/mount point Name to
Reference:
Http://www.cyberciti.biz/tips/how-to-mount-remote-windows-partition-windows-share-under-linux.html
Http://serverfault.com/questions/352305/why-can-windows-machines-resolve-local-names-when-linux-cant
http://www.linuxquestions.org/questions/red-hat-31/mount-cifs-not-present-on-centos-6-2-%5Bsolved%5D-931736/
http://www.kernelhardware.org/access-windows-shares-in-linux/
CentOS Mount Windows shared directory