PhillyNJ
Posts: 112
Joined: Sat Dec 29, 2012 4:07 am

Any easier way to mount network share drives

Sat Apr 05, 2014 12:39 pm

Hi,

One thing that's been driving me crazy was how cumbersome it is to mount network shares on my Raspberry PI. For OSX I need to use:

Code: Select all

mount_afp
and for windows I need to use:

Code: Select all

mount
If either one of my shares requires a password, the password is not masked, which I find to be troubling. If I want to automatically mount the share on boot up, I could add an entry to:

Code: Select all

/etc/fstab
Once again, my network password would be exposed.

So I set out to create a C application to mount either a OSX or Windows share and hide the password. I did this for 2 reasons, one, to find a solution to this problem and two, I wanted to learn C.

The C application works like so. Create a config file e.g. mMovies.cfg:

Code: Select all

type=mac
ip=192.168.1.7/Movies
folder=/home/pi/myshare
username=johndoe

To execute the app:

Code: Select all

./sm mMovies.cfg
The program will ask for your password and masked it.

if anyone is interested, here is the source code and wiki. Your feed back is appreciated

https://github.com/PhillyNJ/Sharemounter

Return to “Other projects”