Xymon Mailing List Archive search

XymonPSclient - mapped disks not reporting

5 messages in this thread

list Kris Springer · Wed, 21 Mar 2018 09:01:06 -0700 ·
I've been updating our systems to the latest Powershell client with success.  In the config I've defined 2 3 4 just as the instructions specify, but it isn't reporting any of the mapped disks.  It only reports the Fixed disks.  Can anyone advise on how to get the mapped disks to report?

Thank you.

------------------------------------------------

Kris Springer

list Brandon Dale · Wed, 21 Mar 2018 23:30:12 +0000 ·
My guess would be the service is probably running as SYSTEM so the drives would have be mapped under system or change the user who is running the service.

Regards,


Brandon Dale

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Kris Springer
Sent: Thursday, 22 March 2018 3:01 AM
To: xymon at xymon.com
Subject: [Xymon] XymonPSclient - mapped disks not reporting

I've been updating our systems to the latest Powershell client with success.  In the config I've defined <wanteddisks>2 3 4</wanteddisks> just as the instructions specify, but it isn't reporting any of the mapped disks.  It only reports the Fixed disks.  Can anyone advise on how to get the mapped disks to report?


Thank you.


Kris Springer
list Kris Springer · Wed, 21 Mar 2018 18:31:28 -0700 ·
Permissions is a good point.  I tried your suggestion of running the service using a user account that has access to the mapped drives, and it still didn't show any of the mapped drives.  I tried it on 2 different machines with no change in results.  Any more ideas?  Anyone actually have this working in their environment?

Thank you.

------------------------------------------------

Kris Springer

quoted from Brandon Dale


On 03/21/2018 04:30 PM, Brandon Dale wrote:

My guess would be the service is probably running as SYSTEM so the drives would have be mapped under system or change the user who is running the service.


Regards,



Brandon Dale


From: Xymon [mailto:xymon-bounces@xymon.com] On Behalf Of Kris Springer
Sent: Thursday, 22 March 2018 3:01 AM
To: xymon@xymon.com
Subject: [Xymon] XymonPSclient - mapped disks not reporting


I've been updating our systems to the latest Powershell client with success.  In the config I've defined 2 3 4 just as the instructions specify, but it isn't reporting any of the mapped disks.  It only reports the Fixed disks.  Can anyone advise on how to get the mapped disks to report?


Thank you.

------------------------------------------------

Kris Springer

list Bruce Ferrell · Wed, 21 Mar 2018 19:08:09 -0700 ·
Windows is a weird beast... It's not so much a matter permissions, but of context.  Those mapped drives just aren't even mounted if the monitor process isn't in the same context as 
the one the mount(s) occurred in.

This isn't the xymon client, but it may illustrate:

Windows IIS/active server pages runs under a system account.  For IIS/ASP to have access to network resources (mapped drives etc) a file called global.asa does the mapping, in the 
context of IIS/ASP.

Global.asa executes before ANY ASP runs to grant access to the network resource for the active server page.

This has to happen even if the network shares are already active and visible in the file manager.

I haven't seen ANY version of Windows where this isn't true, but I stand ready to be educated.
quoted from Kris Springer


On 03/21/2018 06:31 PM, Kris Springer wrote:
Permissions is a good point.  I tried your suggestion of running the service using a user account that has access to the mapped drives, and it still didn't show any of the mapped 
drives.  I tried it on 2 different machines with no change in results.  Any more ideas?  Anyone actually have this working in their environment?

Thank you.


Kris Springer


Signature - Kris
On 03/21/2018 04:30 PM, Brandon Dale wrote:
Signature - Kris
quoted from Kris Springer

My guess would be the service is probably running as SYSTEM so the drives would have be mapped under system or change the user who is running the service.

Regards,

*Brandon Dale*

*From:*Xymon [mailto:xymon-bounces at xymon.com] *On Behalf Of *Kris Springer
quoted from Kris Springer
*Sent:* Thursday, 22 March 2018 3:01 AM
*To:* xymon at xymon.com
*Subject:* [Xymon] XymonPSclient - mapped disks not reporting

I've been updating our systems to the latest Powershell client with success.  In the config I've defined <wanteddisks>2 3 4</wanteddisks> just as the instructions specify, but 
it isn't reporting any of the mapped disks.  It only reports the Fixed disks.  Can anyone advise on how to get the mapped disks to report?

Thank you.


Kris Springer
list Kris Springer · Thu, 22 Mar 2018 10:19:18 -0700 ·
I tried the psexec method on a Windows 10 box with no luck.  I couldn't get a public share mapped successfully.  It kept throwing 'system error 58'.  I was able to get a private share mapped by entering user credentials into the command, but it still never showed up on the Xymon page.  Oh well.  It was a nice attempt.

If anyone else knows of a way for Xymon to report on mapped drives I'd really appreciate it.


Thank you.

------------------------------------------------

Kris Springer



On 03/21/2018 11:48 PM, Kenneth S. Petersen wrote:

Hi all,

Im not sure this is usefull, but sometime ago I used this guide to get another monitor to look at mapped drive.


psexec -i -s cmd.exe

Whoami         #   to ensure that local system account is logged in.

net use X: "\\serverip\Network Recycle Bin 1\@Recycle" /persistent:yes                              # this was what I need to monitor at the time


Use this at your own risk. (I have tested it on XP and Server 2008 x64 R2)
For this hack you will need SysinternalsSuite by Mark Russinovich:

Step one: Open an elevated cmd.exe prompt (Run as administrator)
Step two: Elevate again to root using PSExec.exe: Navigate to the folder containing SysinternalsSuite and execute the following command
psexec -i -s cmd.exe you are now inside of a prompt that is nt authority\system and you can prove this by typing whoami. The -i is needed because drive mappings need to interact with the user
Step Three: Create the persistent mapped drive as the SYSTEM account with the following command
net use z: \\servername\sharedfolder /persistent:yes

It's that easy!
WARNING: You can only remove this mapping the same way you created it, from the SYSTEM account. If you need to remove it, follow steps 1 and 2 but change the command on step 3 to net use z: /delete.
NOTE: The newly created mapped drive will now appear for ALL users of this system but they will see it displayed as "Disconnected Network Drive (Z:)". Do not let the name fool you. It may claim to be disconnected but it will work for everyone. That's how you can tell this hack is not supported by M$.


Testet OK on 2003 og 2012 R2 and the poster did it on 2008


Can’t remember where credit has to go, but it’s not me.





Regards
Kenneth S. Petersen
IT Konsulent

quoted from Kris Springer

Fra: Xymon [mailto:xymon-bounces@xymon.com] På vegne af Kris Springer
Sendt: 22. marts 2018 02:31
Til: Brandon Dale ; xymon@xymon.com
Emne: Re: [Xymon] XymonPSclient - mapped disks not reporting


Permissions is a good point.  I tried your suggestion of running the service using a user account that has access to the mapped drives, and it still didn't show any of the mapped drives.  I tried it on 2 different machines with no change in results.  Any more ideas?  Anyone actually have this working in their environment?


Thank you.

------------------------------------------------

Kris Springer



On 03/21/2018 04:30 PM, Brandon Dale wrote:

My guess would be the service is probably running as SYSTEM so the drives would have be mapped under system or change the user who is running the service.


Regards,



Brandon Dale


From: Xymon [mailto:xymon-bounces@xymon.com] On Behalf Of Kris Springer
Sent: Thursday, 22 March 2018 3:01 AM
To: xymon@xymon.com
Subject: [Xymon] XymonPSclient - mapped disks not reporting


I've been updating our systems to the latest Powershell client with success.  In the config I've defined 2 3 4 just as the instructions specify, but it isn't reporting any of the mapped disks.  It only reports the Fixed disks.  Can anyone advise on how to get the mapped disks to report?


Thank you.

------------------------------------------------

Kris Springer