nanopete
Dabbler
- Joined
- Nov 20, 2014
- Messages
- 47
Hi!
This is part a newbie-guide how to mount a samba or CIFS share (without a password - guest account) in freenas and part a question as to why I had to do it like this to the wise-guys :)
Maybe those wiser guys could help make this into a prober newbie guide, I know I could have used that.
One can start by testing if the SMB or CIFS share can be mounted non-perstitently with a command like this;
It is well explained here; http://blog.up-link.ro/freebsd-how-to-mount-smb-cifs-shares-under-freebsd/
To make it permanent (after reboots) you can put a similar command into your fstab file.
To get it into fstab you have to make the file system writeable by;
You can then edit, not fstab at /etc/fstab, but /conf/base/etc/fstab which /etc/fstab is made from at each boot on freenas.
In here put in your CIFS share info;
If you, as I, use a open guest account on the CIFS share you're good now after a reboot. Otherwise you need to put the user and password in a nsmb.conf file somewhere. (maybe it's the same as with fstab that it is made from something in /conf/base/etc/?)
I had little problem with /mnt/mySharedFolder because it seems /mnt/ is mounted on memory/RAM and everything you make in there disappears after a reboot? Am I correct?
Instead I made a folder in /media which will persist after a reboot, again you'll have to make the system writeable first.
And of cause here "mySharedFolder" can be anything you like as a mount point for the CIFS share. The 755 is the permissions of the new folder, not sure what permission is appropriate there, guess permissions would be a good thing to read up on :)
Best regards
Peter
This is part a newbie-guide how to mount a samba or CIFS share (without a password - guest account) in freenas and part a question as to why I had to do it like this to the wise-guys :)
Maybe those wiser guys could help make this into a prober newbie guide, I know I could have used that.
One can start by testing if the SMB or CIFS share can be mounted non-perstitently with a command like this;
Code:
mount_smbfs -I 192.168.1.1 //myUser@serverName/mySharedFolder /mnt/mySharedFolder
It is well explained here; http://blog.up-link.ro/freebsd-how-to-mount-smb-cifs-shares-under-freebsd/
To make it permanent (after reboots) you can put a similar command into your fstab file.
To get it into fstab you have to make the file system writeable by;
Code:
mount -uw /
You can then edit, not fstab at /etc/fstab, but /conf/base/etc/fstab which /etc/fstab is made from at each boot on freenas.
Code:
nano /conf/base/etc/fstab
In here put in your CIFS share info;
Code:
//myUser@serverName/mySharedFolder /mnt/mySharedFolder smbfs rw,-N,-I192.168.1.1 0 0
If you, as I, use a open guest account on the CIFS share you're good now after a reboot. Otherwise you need to put the user and password in a nsmb.conf file somewhere. (maybe it's the same as with fstab that it is made from something in /conf/base/etc/?)
I had little problem with /mnt/mySharedFolder because it seems /mnt/ is mounted on memory/RAM and everything you make in there disappears after a reboot? Am I correct?
Instead I made a folder in /media which will persist after a reboot, again you'll have to make the system writeable first.
Code:
mount -uw / mkdir -755 /media/mySharedFolder mount -ur /
And of cause here "mySharedFolder" can be anything you like as a mount point for the CIFS share. The 755 is the permissions of the new folder, not sure what permission is appropriate there, guess permissions would be a good thing to read up on :)
Best regards
Peter