Ah, now you are getting into one of the coolest parts of linux... scripting. I am sure there is a script out there.. but why not learn a bit about scripting too?
The neat thing about scripting is, all you need is the path to your shell at the top, then regular commands work, plus all sorts of neat logic. By the path to your shell, I mean:
- Code: Select all
#!/bin/bash
A simple script could just be you putting the mount command next, the very same one you use on the command line. Now the problem with this is that it means you have to save the password to another computer in plain text on the linux machine. Some people will say this isn't much of a problem, especially if it is made say just executable by root, and not viewable by anyone else. An alternative is that you could allow guest access for the share, but that's no fun either. Maybe someone knows a secure way to do this.
In the end don't forget to make the script executable!