biswanath_c has asked for the wisdom of the Perl Monks concerning the following question:


Hi

I have an issue with Win32:LoggedOnUsers API. I am currently using it in a perl script that is configured to run as a scheduled task on a server.

Now, this is the scenario :

- i have deployed this script and scheduled task on 2 different servers, TEST and PROD.

- my desktop and the PROD server are on the same domain, say, DOMAIN1

- the TEST server is on another domain DOMAIN2

- i have mapped into the D drive of both the TEST(SOMAIN2) and PROD(DOMAIN1) servers from my desktop's (DOMAIN1) windows explorer.

this is the issue:

- the script on TEST(DOMAIN2) correctly shows my usreid in the list of logged on users when the Win32:LoggedOnUsers API is invoked.

- but the script on PROD (DOMAIN1) server does not show my user id !

- But, when i connect to the PROD (DOMAIN1) server from my desktop(DOMAIN1) using the "remote desktop" software, the script then shows my userid correctly in the list of users that are logged in !

how can i deal this issue? Any suggestions?

Thanks

Replies are listed 'Best First'.
Re: Problem with Win32::LoggedOnUsers
by BrowserUk (Patriarch) on Jul 22, 2008 at 20:40 UTC

    What you are describing is not a Perl question and unlikely to get an answer here.

    All Win32::NetAdmin::LoggedOnUsers() does is report what the OS thinks is the correct list. If the OS, does not consider a user as "logged on", then there is nothing the module can do about it.

    You'd need to ask MS support or similar why this is the case, but they are unlikely to change it.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Problem with Win32::LoggedOnUsers
by spivey49 (Monk) on Jul 22, 2008 at 20:58 UTC

    To BrowserUk's point, that can be caused by a number of issues, usually at the OS level; different OS, different connection method, etc.

    I would examine the servers' security logs for any clues as a first step.