From owner-freebsd-questions@FreeBSD.ORG Thu May 8 13:07:42 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 3D6B4106566C for ; Thu, 8 May 2008 13:07:42 +0000 (UTC) (envelope-from sdafreebsduk@rowyerboat.com) Received: from brookes.ac.uk (csmail1.brookes.ac.uk [161.73.1.23]) by mx1.freebsd.org (Postfix) with ESMTP id CABD78FC0A for ; Thu, 8 May 2008 13:07:41 +0000 (UTC) (envelope-from sdafreebsduk@rowyerboat.com) Received: from [161.73.146.9] (izb6d318.brookes.ac.uk [161.73.146.9]) (authenticated bits=0) by brookes.ac.uk (8.14.2/8.14.2) with ESMTP id m48D7YbF027047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 May 2008 14:07:34 +0100 (BST) Message-ID: <4822FB18.50408@rowyerboat.com> Date: Thu, 08 May 2008 14:07:36 +0100 From: Stephen Allen User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4821DEA3.3020905@rowyerboat.com> <4821EF82.2000000@bsdforen.de> In-Reply-To: <4821EF82.2000000@bsdforen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner-Information: Oxford Brookes University MailScanner X-MailScanner: Clean X-MailScanner-From: sdafreebsduk@rowyerboat.com X-Spam-Status: No 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: Thu, 08 May 2008 13:07:42 -0000 I copied /root/.nsmbrc to /etc/nsmb.conf with security at 600, and it doesn't work. With security at 777 it still doesn't work. Any more suggestions? Many thanks, Steve :) Dominic Fandrey wrote: > 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.