Hey Scott,

After I finally figured out that ppm was broken due to a new proxy, fixed that, and 
then downloaded Win32::Perms your suggestion worked beautifully.

Thanks again,

Ken
-------Original Message-------
From: Scott Campbell <[EMAIL PROTECTED]>
Sent: 03/04/03 03:23 PM
To: [EMAIL PROTECTED]
Subject: RE: RE: Getting user from Win32::EventLog

> 
> Here is how I do it.

I am getting my eventlogs with:
Win32::EventLog::GetMessageText($EventData);

To get the username, I do:
$username=Win32::Perms::ResolveAccount($EventData->{'User'});
If you just tried to use $EventData->{'User'}, you'd get the SID of the
account.  Win32::Perms::ResolveAccount translates from SID to username.

Note, this will not work yet on ActivePerl 5.8, as Dave Roth has not
built Win32::Perms for 5.8.  It will, however, work on 5.6.

Hope this helps.


Scott Campbell
Senior Software Developer
Somix Technologies
<a target=_blank href="http://www.somix.com";>http://www.somix.com</a>


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 04, 2003 3:14 PM
To: Scott Campbell
Subject: Re: RE: Getting user from Win32::EventLog

Scott,

They're showing up in user column.

Ken
-------Original Message-------
From: Scott Campbell <[EMAIL PROTECTED]>
Sent: 03/04/03 02:37 PM
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: Getting user from Win32::EventLog

> 
> When you look at these logs with your event viewer in Windows, are the
users that violated the quotas showing up in the username column, or
does it say N/A?

Scott Campbell
Senior Software Developer
Somix Technologies
<a target=_blank href="http://www.somix.com";>http://www.somix.com</a>


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 11:51 AM
To: [EMAIL PROTECTED]
Subject: Getting user from Win32::EventLog

Can anyone tell me if I'm needlessly beating my head against the wall
trying to get the user field from a W2K event log? I've been using
EventLog successfully for a year or so. But now I have a need to see
which users are going over their quota on a W2K server. The event log
shows this with ids of 36 and 37. But the message is only "A user has
gone over his limit." This is useless to me unless I can also see which
user this is. The Event Viewer has a user field but EventLog doesn't. I
did search the archive and found some information on splitting the
Strings field by \x00. But when I do that I only get the letter E, I
think for the drive where the quota is being exceeded.

Since I'm finally convincing the died-in-the-wool Windows users that
they really need Perl to intelligently automate things I'd like to show
them that this works. In fact they've asked me to solve it because my
other EventLog scripts have worked. But it's beginning to look like I'm
going to have to let them down. Please don't let that happen and send me
some advice.

Thanks much,

Ken


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: <a target=_blank
href="http://listserv.ActiveState.com/mailman/mysubs";>http://listserv.Ac
tiveState.com/mailman/mysubs</a>

> 

> 
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to