slightly OT: perl script for finding samba connections
William R. Knox
wknox at mitre.org
Tue Jan 15 13:29:16 GMT 2002
I use the User-Utmp module available at CPAN to allow Perl to dig into the
utmp and utmpx files. Take a look at that. I comes with an example script
that may do almost everything you need.
Good luck.
Bill Knox
Senior Operating Systems Programmer/Analyst
The MITRE Corporation
On Tue, 15 Jan 2002, Yan Seiner wrote:
> Date: Tue, 15 Jan 2002 06:21:45 -0500
> From: Yan Seiner <yan at cardinalengineering.com>
> To: samba at samba.org
> Subject: slightly OT: perl script for finding samba connections
>
> I know this is verging on OT, but here goes:
>
> I am working on a security script for samba with dhcp. Basically, what
> this will do is allow access only to authenticated users from known
> machines.
>
> I have a great start from some donated scripts, but perl is not my
> native tongue... I am using --with-utmp to track samba connections.
> What I need is some guidance on getting the samba connections from the
> utmp database into perl. A perl equivalent of "who" so to speak, that I
> can then parse for /smb/.
>
> Thanks,
>
> --Yan
>
> --
>
> Daddy, did all the hair that fell off your head stick to your arms?
> Akari, age 4
> ...
> oberon.cardhome.lan: 6:15am up 11:50, 4 users, load average: 0.34,
> 0.14, 0.15
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: http://lists.samba.org/mailman/listinfo/samba
>
More information about the samba
mailing list