Saving Remote Share Password That Hangs On Boot

Status
Not open for further replies.

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
Hey all, you may remember me from the post I made earlier this month, I decided to follow this official documentation to mount remote shares instead of messing around with the fstab file since that causes/caused problems for me. All I did was head over to Tasks>Init/Shutdown Scripts and put in two postinit commands to mount smb shares following this format:

Code:
mount_smbfs -I 192.168.1.1 //myUser@serverName/mySharedFolder /media/mySharedFolder


It works quite well although when I reboot the server, I have to type in the smb share password (once for each share) which is a real pain. I have the bios set to continue previous state on power failure so if/when my UPS runs out of battery in some outage situation or something, it will boot right up when power is restored. If I'm not home, it will hang on where it requires me to punch in the password(s). Anyone have an idea how I can make this boot unattended? As far as I know, I cannot mount guest file shares in FreeNAS which is a shame because I access these shares on different boxes through guest since they only have read access.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Store the credentials in a file and pass it to the mount command using a flag or mount using guest auth.
 

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
So instead of
Code:
mount_smbfs -I 192.168.1.1 //myUser@serverName/mySharedFolder /media/mySharedFolder

I could do
Code:
mount_smbfs -I 192.168.1.1 //guest@serverName/mySharedFolder /media/mySharedFolder

and have that work?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
No you need to change the mount to allow guest authentication. When you do that the username passed from the client will get ignored.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Huh? You modify your share you created by checking the first access box. Maybe I don't understand what you are trying to do?
 

pizzaazzip

Dabbler
Joined
Dec 3, 2015
Messages
25
Huh? You modify your share you created by checking the first access box. Maybe I don't understand what you are trying to do?
Oh, I probably wasn't being super clear. On my freenas box I am mounting smb shares from a different nas. These shares I am mounting to freenas.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That is a very strange thing to do and probably isn't going to work unless you can build it in a jail.
 
Status
Not open for further replies.
Top