How do I test if a Windows share exists before I attempt to mount the share?

Regards Hendre

  • 1
    I also wonder the best way to do this, I use a script to do some basic tests, to check im on the correct network, and ping test to the server. I always wondered how to test that the server is actually the server with the share or just another machine on the same IP. – squareborg Dec 16 '12 at 10:57
  • You pose an interesting question, running a service on the machine that can handle both the ping health check and machine identification might be a solution. What also comes to mind is the definition of a machine. What parts needs to be the same before you decided that the machine is in fact the machine you are targeting. If the hard drive has been removed, is it a new machine? – Hendré Dec 16 '12 at 12:18
  • To structure my original question better: What are the possible points of failure when attempting to mount a Windows share? – Hendré Dec 16 '12 at 12:19
  • 1. The target host is down. 2. The share on the host does not exist. 3. There is a network connectivity issue. 4. The share credentials have changed. The firewall on the host is blocking the mount request. 5. The cifs-utils package is not installed. – Hendré Dec 16 '12 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.