Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2005 14:12:37 -0500
From:      "Micheal Patterson" <micheal@tsgincorporated.com>
To:        "Kirk Strauser" <kirk@strauser.com>, <freebsd-questions@freebsd.org>
Subject:   Re: Automounting smbfs?
Message-ID:  <004701c53c6e$eeea9fb0$4df24243@tsgincorporated.com>
References:  <200504081252.19279.kirk@strauser.com>

next in thread | previous in thread | raw e-mail | index | archive | help



----- Original Message ----- 
From: "Kirk Strauser" <kirk@strauser.com>
To: <freebsd-questions@freebsd.org>
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
suggestions?
-- 
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@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>/mbfs.sh"


Then, in <path_to_your_script> create a file named mbfs.sh and edit it as
such:

#!/bin/sh
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
405-917-0600

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?004701c53c6e$eeea9fb0$4df24243>