Is there a way to configure OSX to auto mount and SMB share without entering a user and password into the configuration file?
Yes, it is possible, but you'll either need an non-lazy friend or put in the work yourself in order to set it up.

First thing I thought of was creating a shell script that monitors your networks connection details and executes the appropriate autologin and automount commands when it sees that you are connecting to the right network.

So, to answer your original question, yes it is possible.