您的位置:首页 > 运维架构 > Linux

Windows磁盘或目录设置共享,Linux识别并挂载

2016-07-05 11:08 573 查看
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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: