Samba Issue - findsmb and nmblookup Only See Localhost


 
Thread Tools Search this Thread
Special Forums IP Networking Samba Issue - findsmb and nmblookup Only See Localhost
# 1  
Old 09-19-2012
Samba Issue - findsmb and nmblookup Only See Localhost

I wrote a program which uses findsmb to get a list of Samba aware resources. It worked fine. It was able to see both my own cluster of virtuals and other company computers too. My company moved to a different location. The network was flakey for awhile, but has seemed okay for months now. I am not sure that moving is the cause of the problem I am about to describe, but it is the only obvious change. Now findsmb only discovers the machine I am running in. I am doing this in a number of VMWare virtuals, and have tried this in several. In every case, findsmb only finds localhost. I should repeat that this was working fine in the past. I did enough research to discover that findsmb relies on nmblookup. So I tried "nmblookup -A <ip address>" for several of the IPs around and it always comes back with "no reply." I have no idea what's wrong. Does anyone have any ideas?
# 2  
Old 01-18-2013
Try the following:
echo -e "smblist.sh $(date)\n"; smbtree -SN|grep '\\'|cut -f2|cut -c 3-|sort|while read svr; do echo -ne "$svr\t"; ipname=$(nmblookup $svr|grep '<00>'); cmnt=$(smbclient -NL $svr 2>&1|grep -m 1 'IPC'|cut -c 40-); echo -e "$ipname\t$cmnt"; smbclient -NL $svr 2>&1|grep Disk; done; exit 0
All I wanted was a list of servers, ip addresses and the server string. findsmb does not appear to be as reliable as smbtree, so I started with it instead.

Last edited by apjjr; 01-19-2013 at 01:06 AM.. Reason: Improved code
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Samba compile issue on Solaris 9

Hi all :) I've been given a task to try and upgrade Samba on our legacy Solaris 9 (SunOS 5.9) sparc system. Its currently running samba 3.5.3 but we'd like to try and install 3.6.0 (or 3.6.25) to have minimal protocol smbv2. When trying to install from source, it appears to configure fine,... (4 Replies)
Discussion started by: jimbob01
4 Replies

2. Red Hat

Samba High Availability issue using luci (HA Manager) on CentOS

Hello, I am working on to setup a Samba High availability on CentOS using luci (HA Manager) and GFS2 using 2 nodes cluster. I am successfully able to configure GFS HA and VIP HA using luci but when trying to add samba server HA, i am in trouble and not able to figure out what is the issue.... (1 Reply)
Discussion started by: sunnysthakur
1 Replies

3. UNIX and Linux Applications

Samba authentication issue

Hi guys we have a running samba server and it works ok, issue came when our windows samba clients were upgraded to win7... some users cant login and some needs to enter their password 7x before they can login. the net advise to set NTLVMv2 on the win7 security options it works on the users who... (0 Replies)
Discussion started by: batas
0 Replies

4. Red Hat

Samba/Winbind issue - Can't get user and group info from sub domains

Hi, We now have a Samba or Winbind issue. The Linux client under RHEL6 can not get Windows' AD sub-domain info. See the following output please. The main domain 'Global' is shown online, but the sub-domain 'Europe' and 'Asia' are shown offline although they are online. Commands 'wbinfo -u' and... (0 Replies)
Discussion started by: aixlover
0 Replies

5. Solaris

Samba authentication issue

Hi guys we have a running samba server and it works ok, issue came when our windows samba clients were upgraded to win7... some users cant login and some needs to enter their password 7x before they can login. the net advise to set NTLVMv2 on the win7 security options it works on the users who... (0 Replies)
Discussion started by: batas
0 Replies

6. Red Hat

chroot sftp, samba share, ownership issue linux hosts

Hello, I have sftp server with chroot for a group and username is on a Linux host, I have created a few subdirectories under sftpuser home directories with 775. Then using a Samba I shared this user home directory to another linux client. On the Linux client, I have jboss user to access... (2 Replies)
Discussion started by: bobby320
2 Replies

7. Red Hat

Samba installation issue

hey, i am trying to install a new samba server using the source package in my redhat machine.i am using samba 3.6.4 version.actually i am not able to find out the smb.conf file in there.can anyone give me any idea about where to look for this configuration file?? (3 Replies)
Discussion started by: htshshrm2
3 Replies

8. Solaris

samba issue: one samba share without password prompting and the others with.

Hi All, I've been trying to configure samba on Solaris 10 to allow me to have one share that is open and writable to all users and have the rest of my shares password protected by a generic account. If I set my security to user, my secured shares work just fine and prompt accordingly, but when... (0 Replies)
Discussion started by: ideal2545
0 Replies

9. UNIX for Dummies Questions & Answers

localhost [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA

hardware = raq550 running on strongbolt2. my sendmail log is littered with this entry all through the day: localhost did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA it occurrs every 15 minutes. I don't have any problem sending or receiving mail. I did a search on google but couldn't... (0 Replies)
Discussion started by: tonj
0 Replies

10. UNIX for Dummies Questions & Answers

nmblookup

i am trying to use nmblookup. When I do that it says it is not a valid command. I read up and found to use that for what I need. Any ideas on how to make it work? (1 Reply)
Discussion started by: Omega1589
1 Replies
Login or Register to Ask a Question