Subject: Re: Argus feature request: CIFS

From: Jeff Weisberg <[email-masked]>
Date: Fri, 9 Jan 2004 14:32:16 -0500 (EST)

| Maybe this Perl module might be of assistance as well?
| Unfortunately, this also requires smbclient (Samba) be installed
| 
| Filesys::SmbClientParser
| http://search.cpan.org/~alian/Filesys-SmbClientParser-2.5/SmbClientParser.pm

presumably, this 'smbclient' could be run as a 'Service Prog'

but I have no windows boxes, and no samba, and cannot try...

	--jeff

---

From: Jeff Weisberg <[email-masked]>
Date: Fri, 9 Jan 2004 14:35:38 -0500 (EST)

| I'm wondering if Argus can monitor Microsoft's 'de facto' standard of CIFS,
| and if not, if it could be added as a standard service.
| 
| unfortunately i know very little about the fundamentals of the cifs
| protocol, but i have found some code that might help at
| http://ubiqx.org/libcifs/source/SMB/

unfortunately, I don't see anything there that would help
understand the protocol.

	--jeff

---

From: "McKinnon, Joe" <[email-masked]>
Date: Sat, 10 Jan 2004 10:34:37 +1000

Hi Jeff,

I had one of our local wizards get an interface working using this
module......the code is below.

NOTE
some-server-share - the netbios name of the server
some-share		- one of the public available shares
domain_user/password		- If you are using Samba which relies on
windows for user auth. then you need a valid network/domain user

#!/usr/bin/perl

use strict;

use Filesys::SmbClientParser;

my ($host, $share, $username, $password) = ("some-server-name",
"some-share", "domain_user", 'password');

# forward slash any domain / user name seperators
if (samba_share_up($host, $share, $username, $password)){
  print "$share on $host is up\n";
}
else{
  print "$share on $host is unavailable\n";
}

############### subs ################

sub samba_share_up{
  my ($host, $share, $username, $pass) = @_;

  my $sclient = new Filesys::SmbClientParser(undef, (
                             user     => $username,
                             password => $pass,
                             host     => $host,
                             share    => $share,
                ));

  return ($sclient && $sclient->pwd);
}

Also, I've been using 
/usr/local/samba/bin/smbclient -L overseer -N
Which gives you
Anonymous login successful
Domain=[RACQ] OS=[Unix] Server=[Samba 2.2.8]

       Sharename      Type      Comment
       ---------      ----      -------
       KBATESTING     Disk      KB web system
       IPC$           IPC       IPC Service (overseer  - Overseer)
       ADMIN$         Disk      IPC Service (overseer  - Overseer)

       Server               Comment
       ---------            -------
       ID012328
       OVERSEER             overseer  - Overseer

       Workgroup            Master
       ---------            -------
       RACQ                 ID012328

Either of which seem to work nicely for testing samba.

Cheers Joe

-----Original Message-----
From: Jeff Weisberg [mailto:[email-masked]]
Sent: Saturday, 10 January 2004 5:32 AM
To: [email-masked]
Subject: Re: Argus feature request: CIFS

| Maybe this Perl module might be of assistance as well?
| Unfortunately, this also requires smbclient (Samba) be installed
| 
| Filesys::SmbClientParser
|
http://search.cpan.org/~alian/Filesys-SmbClientParser-2.5/SmbClientParser.pm

	--jeff

_______________________________________________
http://argus.tcp4me.com/
[email-masked]
http://www.tcp4me.com/mailman/listinfo/arguslist

Please Note:

This communication has been sent on behalf of The Royal Automobile Club of
Queensland Limited (RACQ).  The information contained in this communication
may be privileged and confidential.  If you are not the intended recipient,
any use, disclosure or copying of this communication is expressly
prohibited.  If you have received this communication in error, please delete
it immediately.  RACQ and its associated entities do not warrant or
represent that this communication (including any enclosed files) is free
from electronic viruses, faults or defects.