Xymon Mailing List Archive search

XymonPSclient - mapped disks not reporting

list Kris Springer
Thu, 22 Mar 2018 10:19:18 -0700
Message-Id: <user-53a6ecfbf952@xymon.invalid>

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


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