Re: Win32_NetworkConnection closes connectios in remote monitoring?



Hi,

My guess is that it's related to whether or not the logon session has loaded a profile or not? There's a big difference between impersonating a domain\account and actually logging on as a domain\account. Check the mapped drives section of the HKCU registry hive in each case.

There's also a difference between hacking into a session that's already established and creating a new one. In terminal services you can hack into an existing session by using /console in XP / VistaRTM or /admin in Vista SP1. If you hack into an existing session, you WILL see the mapped drives.

I'd suggest changing the design of the app.

A more interesting question is this. How can you create a new session to a resource on a remote machine (and pass credentials) using pure WMI? e.g. not shell'ing out to CMD.

Jialiang Ge [MSFT] wrote:
Hello Tango

I've reproduced the issue on my side that the mapped driver shows "Unavailable" status when it's queried from a remote computer with the Win32_NetworkConnection class. Below are my repro-steps:

1. In "computer 2", use "net use" command to create a mapped driver to "computer 3" with credential 1 (domain username & password).
2. In "computer 2", query the local mapped drivers' status with wbemtest, and it returns the "OK" status for the newly created mapped driver.
3. In "computer 1", use wbemtest to connect to "computer 2" (\\computer2\root\cimv2) with credential 1 (the same as step 1), and query Win32_NetworkConnection.Status. It returns "Unavailable" though the mapped driver is operational in "computer 2".

This test can be reproduced in any OS versions (e.g. Windows XP, 2003, Vista).

Based on my analysis, we cannot query the mapped driver's status because there are 2 credentials (though the same domain username and password) in the query path:

Computer 1 -> 1. query with Win32_NetworkConnection -> Computer 2 -> 2. map driver with net use -> Computer 3

1. query with Win32_NetworkConnection: needs credential (domain username and pwd)
2. map driver with net use: also needs credential (domain username and pwd)

Even if the two uses the same domain username and password, the part 2 rejects the query due to some security issues.

Please give me some time so that I can confirm the analysis with the product team and see whether I can find out any workarounds or not. I will get back to you as soon as possible. Thanks for your patience.

Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--
Gerry Hickman (London UK)
.



Relevant Pages

  • Re: Filtering Queries
    ... to basically try to create a Session Filter ... Support refers to the group that provide the support. ... What I thought I could do was create a query that joins to the Month field, ... filter table and the detail ticket data, ...
    (microsoft.public.access.queries)
  • Re: Oracle Directconnect (ODC) Security - is it ok?
    ... The following information about session security for Expertcity's ... DesktopStreaming allows a support agent to see the end user's screen ... > and select the appropriate engineer from a dropdown list. ...
    (comp.security.misc)
  • RE: ASPX page cant see Session created by WCF with XBAP client
    ... As for the setup ASP.NET seesion in WCF, ... Also, based on my understanding, you're using ASP.NET session to store ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: cdevpriv and mmap(2)
    ... driver method. ... Second calls are much harder and essentially require attaching cdevpriv bookkeeping data to the struct vm_map_entry. ... I am not sure whether this support for the second time calls is needed at all in real usage. ... In order to implement session-centric semantics, I think it's actually quite a bit more complicated than just adding vm_map_entry book-keeping -- we also need to have a different VM object for each session. ...
    (freebsd-current)
  • CRT 5.2
    ... extensive session management and customization features. ... support for scalable line-drawing fonts and character attributes ... For a secure terminal emulator for SSH1/SSH2, ...
    (comp.software.shareware.announce)