Boxerman Posted August 5, 2013 Share Posted August 5, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/280831-network-drive-size/ Share on other sites More sharing options...
requinix Posted August 5, 2013 Share Posted August 5, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/280831-network-drive-size/#findComment-1443482 Share on other sites More sharing options...
Boxerman Posted August 5, 2013 Author Share Posted August 5, 2013 Hi there, Thanks for your help. Currently im in the stages of using a linux box to grab windows disk sizes. That being said, is there any basic scripts floating around (i have tired searching but has appeared unsuccessful). Quote Link to comment https://forums.phpfreaks.com/topic/280831-network-drive-size/#findComment-1443483 Share on other sites More sharing options...
requinix Posted August 5, 2013 Share Posted August 5, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/280831-network-drive-size/#findComment-1443504 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.