How can I determine the domain of a remote samba server from the command line?
Asked
Active
Viewed 2.0k times
5
-
You've tagged windows; are you running from a windows command line or some unix flavor? – Jeff Schaller Nov 13 '16 at 17:09
1 Answers
2
The output of smbclient -L remote-server contains the domain; the linked page shows an example:
smbclient -L zimmerman
The output of this command should look something like this:
Server time is Sat Aug 10 15:58:27 1996
Timezone is UTC+10.0
Password:
Domain=[WORKGROUP] OS=[Windows NT 3.51] Server=[NT LAN Manager 3.51]
Server=[ZIMMERMAN] User=[] Workgroup=[WORKGROUP] Domain=[]
Sharename Type Comment
--------- ---- -------
ADMIN$ Disk Remote Admin
public Disk Public
C$ Disk Default share
IPC$ IPC Remote IPC
OReilly Printer OReilly
print$ Disk Printer Drivers
This machine has a browse list:
Server Comment
--------- -------
HOPPER Samba 1.9.15p8
KERNIGAN Samba 1.9.15p8
LOVELACE Samba 1.9.15p8
RITCHIE Samba 1.9.15p8
ZIMMERMAN
Reference: http://www.tldp.org/HOWTO/SMB-HOWTO-8.html
Jeff Schaller
- 66,199
- 35
- 114
- 250