[jcifs] how to get MAC ADDRESS from linux host ??

Christopher R. Hertel crh at ubiqx.mn.org
Thu Jan 24 04:58:21 EST 2002

On Wed, Jan 23, 2002 at 07:06:13PM +0800, Robin wrote:
> Dear all:
> i can get MAC ADDRESS from windows host by jcifs`s getMacAddress().But i
> want to use jcifs to get MAC ADDRESS from linux host and i know that"
> Retrieves the MAC address of the remote network interface. Samba returns
> all zeros." please help me to get MAC Address with jcifs from linux host
> and unix host.
> thanks for your help.


This works by sending a NetBIOS Adapter Status Query to the remote host.  
Windows includes the MAC Address in the reply, but Samba does not.  We've
talked about this on the Samba mailing lists from time to time, and
basically it would be too much work for too little benefit to add this to
Samba's response.

If the remote machine is on the local subnet, then you can ping the
machine and check the arp table.  (I don't know how to do that from Java,
however.)  I do not know any way to get a MAC address from a machine on a
remote subnet using any other protocol.

Chris -)-----

Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org

More information about the jcifs mailing list