Skip to content

Instantly share code, notes, and snippets.

@vicendominguez
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vicendominguez/8806533 to your computer and use it in GitHub Desktop.
Save vicendominguez/8806533 to your computer and use it in GitHub Desktop.
"Automagic" mount (at boot time) of a windows folder in FreeBSD 7
"Automagic" mount (at boot time) of a windows folder in FreeBSD 7!
------------------------------------------------------------------
@vicendominguez
* Enviroment:
- shared folder in windows 2003 with user/pass
- FreeBSD 7.00
* Pre:
- smbclient to check the permissions
- mount_smbfs should be available. It will load the correct .ko in the kernel.
* First Checks:
- check with smbclient if you can access to the shared folder with the user/pass (smbclient implements CIFS directly without kernel or fs layer)
* Procedure:
- Create a /etc/hosts entry with the windows name of the box and his IP. By example:
10.0.0.14 sbsserver
- Create line in the fstab file (/etc/fstab) like:
//user@sbsserver/dir /mnt/windowslocal smbfs rw 0 0
- user: windows user
- dir: it is the windows shared folder
- Create credentials in /etc/nsmb.conf like:
[SBSSERVER:USER]
password=mypass
========= STOP HERE - VERY IMPORTANT!!!! ==================
In the /etc/nsmb.conf the CAPS is a MUST! hostname and user MUST be in CAPS!
===========================================================
- "mount /mnt/windowslocal" should work without ask the password.
- If everything is ok, when the system is booting, it should mount the shared folder from windows.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment