realbasic-nug
[Top] [All Lists]

Re: Reading Windows Eventlog from Unix / Linux / Osx

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Reading Windows Eventlog from Unix / Linux / Osx
From: Yves Vindevogel <yves dot vindevogel at implements dot be>
Date: Tue, 31 May 2005 21:45:42 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <d2f3221864d8d7fbe22532adac8d8965 at implements dot be> <428DEAAA dot 7070408 at realsoftware dot com> <148acea8fd85440cc8f9ce9ce538ee21 at implements dot be> <428DFE45 dot 9090303 at realsoftware dot com> <d1134cae0f7b2c66af6b0b89685d1113 at implements dot be> <428E0897 dot 5070509 at realsoftware dot com> <22a88d05e86f3f228f64da3136111645 at implements dot be> <428E1A47 dot 5030002 at realsoftware dot com> <8b952f917f7b70b8c771df932bb31bad at implements dot be>
Further on this ....
This is an extract from an email regarding a perl script

The script needs to be run on a windows box with perl installed and run
by a
Domain Admin.  It also needs the following to be in your path:

1) NMAP from www.insecure.org
2) LPSTAT.EXE from AINTX toolset:
http://user.mc.net/cgi-bin/jlh/download

It cycles through our subnets searching for open port 445
(WinXP/Win2K/Win2K3 machines have this port open).  After finding an
alive
host it uses LPSTAT.EXE to get printer info.  LPSTAT is a port of a
unix/linux printer command line tool.  It grabs the computer name from
the
registry, and looks up the site name from a list of subnet/site filters.
You will find the subnet list at the bottom of the script.




On 20 May 2005, at 19:53, Yves Vindevogel wrote:

The app is an app that reads eventlogs for certain information at scheduled times. It is only used by admins and is supposed to run for a couple of months to gather the info we require.

Since we read the eventlog, we must have certain privileges.
However, in an environment with multiple domains, we run into problems because it is possible that the account we're running with has enough privileges on one domain, but not on the other. "Sudo" would help me there.


On 20 May 2005, at 19:11, Aaron Ballman wrote:

My program has to run with a certain account (or rights) to be able to do its thing. On Windows you must either log in with that account,
or, use the relatively new feature "run as".  That's archaic !!

If it's an admin application, then what you're seeing is the proper behavior for a Windows applications. It's no different than needing to enter a password on OS X to authenticate before running something that needs admin privs there.

Note that if your application is not meant to be run by only administrators then it should *never* require the admin to run it. If it does, then it's considered a bug by any Windows admin. So always make sure your files go into userland, not adminland (same with mucking in the registry or anything else that requires access privs). If you're writing an admin application, then it's a non-issue because the Admin will be used to this behavior and expect it.

Do you know how APIs "contact" the other side ?

Probably just using the file system (judging by the UNC you need to access remote logs). But I honestly have no idea.

HTH!

~Aaron
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements



Mail: yves dot vindevogel at implements dot be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76

Web: http://www.implements.be

First they ignore you. Then they laugh at you. Then they fight you. Then you win.
Mahatma Ghandi.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements



Mail: yves dot vindevogel at implements dot be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76

Web: http://www.implements.be

First they ignore you. Then they laugh at you. Then they fight you. Then you win.
Mahatma Ghandi.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
<Prev in Thread] Current Thread [Next in Thread>