Script help plz!

Status
Not open for further replies.

MrCoffee

Fully Optimized
Messages
1,858
Location
UK
this is driving me nuts, there must be a simple solution but I just can't find it.

I've added a line into my .bashrc file to mount my NAS box but I can't figure out how to feed a carriage return to the password request (the password is blank).

So I have this:

smbmount //192.168.0.8/Volume_1 ~/NAS

and when I open a terminal I get prompted for the password.
 
Have you tried just hitting enter? or admin?

Scripting is not my strong suit so i doubt i would be of much use troubleshooting it for you.
 
I just tried redirecting a file containing only a carriage return into the command but it doesn't work, i'm sure that would work with a dos batchfile. :-/

Edit: Ah never mind, me being dumb, I should of looked at the man pages first. There are options for the smbmount command that allow you to specify login details.

smbmount //192.168.0.8/Volume_1 ~/NAS -o password=""

Still, i'd be interested to know if there is a script solution if anyone knows.
 
Status
Not open for further replies.
Back
Top Bottom