Windows磁碟或目錄設定共享,Linux識別並掛載
1.首先對Windows要共享的磁碟或者目錄設定為共享模式,具體操作如下圖
2.Linux發現並掛載、共享目錄/磁碟寫入測試
2.1 共享目錄/磁碟發現
[[email protected] ~]# smbclient -L 172.16.100.xxx -U coral
Enter coral’s password:
Domain=[CORAL-PC] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1]
Sharename Type Comment --------- ---- ------- ADMIN$ Disk 遠端管理 C$ Disk 預設共享 D Disk D$ Disk 預設共享 IPC$ IPC 遠端 IPC
session request to 172.16.100.xxx failed (Called name not present)
session request to 172 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
NetBIOS over TCP disabled – no workgroup available
2.2 掛載Windows共享目錄
[[email protected] ~]# mount -t cifs //172.16.100.xxx/D /tmp/test/ -o user=coral
Password:
[
……
//172.16.100.231/D on /tmp/test type cifs (rw)
2.3 共享目錄寫入測試
[[email protected] ~]# cd /tmp/test/
[[email protected] test]# touch LINUX.TXT
[[email protected] test]# mkdir LINUX
[[email protected] test]# ll -thr
總用量 64
……
drwxr-xr-x 0 root root 0 7月 5 11:20 LINUX
-rwxr-xr-x 1 root root 0 7月 5 11:19 LINUX.TXT
(over)