[root@localhost root]# smbclient -L //192.168.1.8 此命令可以查看windows下的共享目录.注:l为大写的L
连接成功后会提示如下信息(只是参考):
[root@localhost root]# smbclient -L //192.168.1.8
added interface ip=192.168.1.85 bcast=192.168.1.255 nmask=255.255.255.0
session request to 192.168.1.8 failed (Called name not present)
session request to 192 failed (Called name not present)
Password:
Domain=[WORKGROUP] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]
Sharename Type Comment
--------- ---- -------
C$ Disk 默认共享
su Disk
s2003 Disk
IPC$ IPC 远程 IPC
收藏夹 Disk
tools Disk
ADMIN$ Disk 远程管理
linuxsoft Disk
D$ Disk 默认共享
E$ Disk 默认共享
222 Disk
Server Comment
--------- -------
DELL-2O5NEINMWR
U
ZONEIDC-9
ZONEIDC-A
ZONEIDC4545 zoneidc
ZONEIDCNANA ZoneidcNaNa
Workgroup Master
--------- -------
WORKGROUP U
如果出现错误信息;session setup failed: NT_STATUS_LOGON_FAILURE
请访问:http://www.ititgo.cn/html/2007/7/953.htm
如果你想访问哪个共享文件夹,请使用下面命令:
[root@localhost /]# mount -t smbfs -o username=administrator,passwd='dell' //192
.168.1.8/linuxsoft /mnt/samba
注:密码要加上' ' /mnt/samba为linux上要挂载的地方,如果没有可以自己新建一个目录.linuxsoft为windows下的共享目录.成功后会提示如下相关信息:
1721: session request to 192.168.1.8 failed (Called name not present)
1721: session request to 192 failed (Called name not present)