Sponsored Content
Special Forums IP Networking Samba Issue - findsmb and nmblookup Only See Localhost Post 302757663 by apjjr on Thursday 17th of January 2013 11:12:02 PM
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 12:06 AM.. Reason: Improved code
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
ZGREP(1)                                                      General Commands Manual                                                     ZGREP(1)

NAME
zgrep - search possibly compressed files for a regular expression SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename... DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code: (-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep. If the GREP environment variable is set, zgrep uses it as the grep program to be invoked. EXIT CODE
2 - An option that is not supported was specified. AUTHOR
Charles Levert (charles@comm.polymtl.ca) SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1) ZGREP(1)
All times are GMT -4. The time now is 01:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy