Automounting smbfs?

Micheal Patterson micheal at
Fri Apr 8 12:10:38 PDT 2005

----- Original Message ----- 
From: "Kirk Strauser" <kirk at>
To: <freebsd-questions at>
Sent: Friday, April 08, 2005 12:52 PM
Subject: Automounting smbfs?

The built-in amd automounter may work great for NFS, but I increasingly find
myself mounting Windows shares and amd doesn't seem to support them.  Any
Kirk Strauser

Kirk,  here's what I did to auto mount my pesky windows shared backup folder
prior to having a seperate nfs mount to put them.

Configure your share as noauto in /etc/fstab (example)

### SMBFS Mounts
#//username at server/share      /<mount point>        smbfs
noauto,rw,-N,-I=<windows ip#>     0       0

Then, in the root crontab, add this:

"@reboot        /<path_to_your_script>/"

Then, in <path_to_your_script> create a file named and edit it as

echo " "
echo " "
echo "mounting smbfs slices..."
sleep 5
/sbin/mount /backups

Please keep in mind, that this method will require the proper share auth
info to be in /etc/nsmb.conf, so protect this file as it holds plain text
passwords for your windows systems.

Then on system restart, after everything else is accessible and running,
cron will launch and remount those drives for you.

Hope it helps.


Micheal Patterson
Senior Communications Systems Engineer

Confidentiality Notice:  This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.

More information about the freebsd-questions mailing list