1.首先对Windows要共享的磁盘或者目录设置为共享模式,具体操作如下图
这里写图片描述

2.Linux发现并挂载、共享目录/磁盘写入测试
2.1 共享目录/磁盘发现
[root@server-210 ~]# 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共享目录
[root@server-210 ~]# mount -t cifs //172.16.100.xxx/D /tmp/test/ -o user=coral
Password:
[root@server-210 ~]# mount
……
//172.16.100.231/D on /tmp/test type cifs (rw)

2.3 共享目录写入测试
[root@server-210 ~]# cd /tmp/test/
[root@server-210 test]# touch LINUX.TXT
[root@server-210 test]# mkdir LINUX
[root@server-210 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)

Logo

更多推荐