[Samba] fetch remote server name

Fisher, Charles J. (Top Echelon) Charles.Fisher at alcoa.com
Wed Aug 26 20:57:18 UTC 2015


Pardon if this is a frequent question.

The "net view /full" command on Windows will return "server name" commentary that does not seem to appear in smbclient. How can I obtain the remote "server name" (as I might define it by keyword in smb.conf)?


---
P:\>net view /all 1.2.3.4
Shared resources at 1.2.3.4

BLAH BLAH myserver BLAH BLAH

Share name  Type  Used as  Comment

----------------------------------------
ADMIN$      Disk           Remote Admin
C$          Disk           Default share
IPC$        IPC            Remote IPC
The command completed successfully.
---

I am interested in obtaining the "BLAH" line. It does not appear with an equivalent smbclient call.

---
# smbclient -L 1.2.3.4 -U myname%mypw -W DOMAIN
Domain=[NOA] OS=[Windows 7 Professional 7601 Service Pack 1] Server=[Windows 7 Professional 6.1]

     Sharename       Type      Comment
     ---------       ----      -------
     ADMIN$          Disk      Remote Admin
     C$              Disk      Default share
     IPC$            IPC       Remote IPC
Connection to 1.2.3.4 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND)
NetBIOS over TCP disabled -- no workgroup available
---

Is there an obvious command-line switch that I have missed that will fetch the remote "server name?"


More information about the samba mailing list