大网数据广告活动
服务器运维问答

How to know the service name of a samba server

· 52CE 我爱测

The samba address is given by //<server>/<service> Knowing the BIOS name <server> , how do I get to know the <service> field remotely (other machine than the server)?

问题原文

原帖链接 · user123456 · CC BY-SA 3.0

The samba address is given by

//<server>/<service>

Knowing the BIOS name <server>, how do I get to know the <service> field remotely (other machine than the server)?

已采纳解答

原帖链接 · StandardEyre · CC BY-SA 3.0

From a Linux host, I would install the smbclient package and use /usr/bin/smbclient to list the shares

from man smbclient

   -L|--list
       This option allows you to look at what services are available on a server. 
       You use it as smbclient -L host and a list should appear. 
       The -I option may be useful if your NetBIOS names don't match
       your TCP/IP DNS host names or if you are trying to reach a 
       host on another network.


$ /usr/bin/smbclient --help | grep -A1 list
   -L, --list=HOST                           Get a list of shares available on
                                             a host
$

Some shares may require authentication.

Example:

$ /usr/bin/smbclient --user 'MYDOMAIN\account' --list 192.168.123.20
Enter MYDOMAIN\account's password: 
Domain=[MYDOMAIN] OS=[Windows 7 Enterprise 7601 Service Pack 1] Server=[Windows 7 Enterprise 6.1]

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Remote Admin
    C$              Disk      Default share
    IPC$            IPC       Remote IPC
    print$          Disk      Printer Drivers
NetBIOS over TCP disabled -- no workgroup available
$ 

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。