From owner-freebsd-questions@FreeBSD.ORG Wed May 7 18:06:10 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63DC71065681 for ; Wed, 7 May 2008 18:06:10 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 258AF8FC13 for ; Wed, 7 May 2008 18:06:10 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mobileKamikaze.norad (unknown [92.116.253.138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 87EDC8A0812; Wed, 7 May 2008 20:06:02 +0200 (CEST) Message-ID: <4821EF82.2000000@bsdforen.de> Date: Wed, 07 May 2008 20:05:54 +0200 From: Dominic Fandrey User-Agent: Thunderbird 2.0.0.14 (X11/20080503) MIME-Version: 1.0 To: Stephen Allen References: <4821DEA3.3020905@rowyerboat.com> In-Reply-To: <4821DEA3.3020905@rowyerboat.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: SMB share not mounting at startup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 18:06:10 -0000 Stephen Allen wrote: > I am trying to mount an SMB share at startup. I have configured (as > root) .nsmbrc so I don't have to type a password. When I run "mount > -a", it mounts beautifully. > > However, when restarting the server, it will not mount automatically. > According to rc.conf(5), smbfs is part of 'netfs_types' so rc should > wait until after the network is started before trying to mount it (so > shouldn't fail). I have an entry in /etc/fstab as follows: > > //backup@snap-cms/unix_backups /mnt/snapserver smbfs rw 0 0 > > Does anyone have any ideas? I'm wondering if the .nsmbrc file can't be > read because rc isn't running as root - and if so, where can I put .nsmbrc? > > Many thanks, > Steve :) I don't think $HOME or $USER are already set at the time hard disks are mounted. Use the global file /etc/nsmb.conf as suggested in another mail.