Is it possible to use smbclient to look up the WINS address of a computer given only its IP address (or DNS hostname)? I've been trying for two days and looked through all the documentation, and the total amout of information on doing anything useful with smbclient amount to exactly one file - the man page, which I have read and is no help. For example, I try to connect to a windows machine across the room from me, using only its IP address: $ ./smbclient -L dummy -I 128.119.11.48 Added interface ip=128.119.11.70 bcast=128.119.11.255 nmask=255.255.254.0 session request to DUMMY failed session request to *SMBSERVER failed I've tried a few other combinations of options, all of which give the same error. Oddly enough, other linux machine running samba respond to this, but windows machine just won't. This basically makes general browsing of the local subnet IMPOSSIBLE with smbclient... It's very annoying, since samba is so great on the server side and so limited on the client side... Isn't the client side is simpler, and more generally useful to people who are on primariy windows networks and need to get shares off of other computers? A Network-Neighborhood-like interface to smbclient would be really great, and I would write such a frontent if I could just figure out how to get the necessary information OUT of smbclient... Thanks, ------------------ Peter Amstutz -------------------- ------- Student, Hacker, Segfault.org Editor -------- -- tetron@segfault.org http://www.tfn.net/~amstpi -- -----------------------------------------------------
> Is it possible to use smbclient to look up the WINS address of a computer > given only its IP address (or DNS hostname)?If you're in the same subnet use nmblookup> I've been trying for two > days and looked through all the documentation, and the total amout of > information on doing anything useful with smbclient amount to exactly one > file - the man page, which I have read and is no help. > > For example, I try to connect to a windows machine across the room from > me, using only its IP address: > > $ ./smbclient -L dummy -I 128.119.11.48 > Added interface ip=128.119.11.70 bcast=128.119.11.255 nmask=255.255.254.0 > session request to DUMMY failed > session request to *SMBSERVER failedWell... maybe Microsoft thinks this has to be that way for security reasons... ;-))))))))))))))))))))))))))> I've tried a few other combinations of options, all of which give the same > error. Oddly enough, other linux machine running samba respond to this, > but windows machine just won't.Yes.. ask the guys in redmond why...> This basically makes general browsing of > the local subnet IMPOSSIBLE with smbclient...If smbd & nmbd are runnig on your local machine there should be a file like /var/lock/samba/browse.dat (The path depends on your distribution)> It's very annoying, since > samba is so great on the server side and so limited on the client side...Well, actually samba concentrates on the server-side I guess....> Isn't the client side is simpler, and more generally useful to people who > are on primariy windows networks and need to get shares off of other > computers?There are other approches - there is a smb-lib which you load with ld_preload - then, start e.g. a bash (or anything else). YOu have on /smb the same view of the network as you would have from network neighbourhood. I think this library is still beta - but there are reports that it works fine.> A Network-Neighborhood-like interface to smbclient would be really great, > and I would write such a frontent if I could just figure out how to get > the necessary information OUT of smbclient...Same as above - use smb-lib Greetings, Florian Pflug
On Sun, 6 Dec 1998, Florian G. Pflug wrote:> There are other approches - there is a smb-lib which you load with > ld_preload - then, start e.g. a bash (or anything else). YOu have on /smb > the same view of the network as you would have from network neighbourhood. I > think this library is still beta - but there are reports that it works fine.oop, ok, I see what you are talking about now... Ahem, not smblib, but smbwrapper in the 2.0 dist. Alright, that compiles fine, however I have a libc5-based slackware system, and it either dies on a bus error run as a normal user or segfaults when trying to do anything as a superuser. As in: $ smbsh Username: Password: Bus error $ sudo smbsh Password: Username: Password: $ ls Segmentation fault $ <hit tab for tab completion of the directory> Segmentation fault $ Bleh. :( Is anyone porting it to libc5? Thanks, ------------------ Peter Amstutz -------------------- ------- Student, Hacker, Segfault.org Editor -------- -- tetron@segfault.org http://www.tfn.net/~amstpi -- -----------------------------------------------------
> For example, I try to connect to a windows machine across the room from > me, using only its IP address:Only by using an IP address is it impossible. (see next paragraph for explanation) Maybe sending some netbios-ns name request to detect the name first would work but I have no experience with it (and even don't know how to do it with std Samba commands without writing my own).> $ ./smbclient -L dummy -I 128.119.11.48 > Added interface ip=128.119.11.70 bcast=128.119.11.255 nmask=255.255.254.0 > session request to DUMMY failed > session request to *SMBSERVER failedAre you sure that the server is REALLY named "dummy"? SMB protocol insists on the name being called, although you already know the IP adress! Use SMB-enabled tcpdump to discover the network chat (and the real reasons of the request refuse). Lace