Jump to content

Network drive size


Boxerman

Recommended Posts

Hi guys,

 

I'm trying to build a script which will sum up all the hard drive space and remaining space on several server on the network.

 

My question is, is this possible considering to access each drive it requires a username and password?

 

What i want to get is:

 

SERVERNAME - C:\ - 12GB remaining of 120GB

SERVERNAME2 - C:\ - 1GB remaining of 120GB

 

etc these are all on the same network. Is this possible? if so can someone point me in the right way?

 

Many thanks guys!

 

B-Man

 

Link to comment
Share on other sites

The authentication happens through Windows automatically, and only in the case where your existing credentials don't work will Windows prompt you to enter someone else's.

 

If you're running through Apache then it may be the LOCAL NETWORK system account, which (as it implies) is only good for local resources. You would need to run Apache as a different user and make sure that user, either by itself or the group(s) it belongs to, has access to those resources.

If you're running through IIS then it's still the same story except you'll be running as IUSR or IUSR_machine. Either give that user access to the resources, or make it run as a different user that does.

Link to comment
Share on other sites

Currently im in the stages of using a linux box to grab windows disk sizes.

Whatever you use to read from (eg, mount) the network shares will involve a username and password. If not then it would authenticate anonymously. What I said regarding user accounts and access to resources is still relevant as far as that's concerned.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.