From owner-freebsd-questions@FreeBSD.ORG Fri Apr 14 10:19:52 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EAAA16A402 for ; Fri, 14 Apr 2006 10:19:52 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out5.blueyonder.co.uk (smtp-out5.blueyonder.co.uk [195.188.213.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2BA643D4C for ; Fri, 14 Apr 2006 10:19:51 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.144] (helo=anti-virus03-07) by smtp-out5.blueyonder.co.uk with smtp (Exim 4.52) id 1FULP4-0004De-Ea; Fri, 14 Apr 2006 11:19:50 +0100 Received: from [80.192.25.195] (helo=[192.168.0.2]) by asmtp-out4.blueyonder.co.uk with esmtp (Exim 4.52) id 1FULP3-0001Cw-Np; Fri, 14 Apr 2006 11:19:49 +0100 Message-ID: <443F7745.9080603@dial.pipex.com> Date: Fri, 14 Apr 2006 11:19:49 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.12) Gecko/20060305 X-Accept-Language: en MIME-Version: 1.0 To: =?ISO-8859-1?Q?Jostein_Kj=F8nigsen?= References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: Problem regarding Samaba-automonts. 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: Fri, 14 Apr 2006 10:19:52 -0000 Jostein Kj=F8nigsen wrote: >Hi! > >I got a question regarding samba automounting in FreeBSD. I'm running >FreeBSD 6.0 and have Samba3 installed. > >Manual mounting works fine, but I do need to enter a password. This is >regardless if its a specific mount or mounting a /etc/fstab entry. > >As far as I've understood things, to get automounting working properly >(w/o the password request) I need to enter a few entris in >/etc/nsmb.conf. And so I've done. > >If I use lowercase letters for the[COMPUTERNAME] and >[COMPUTERNAME:USERNAME] section, it just gets ignored. > >If I use all uppercase, I get "syserror: connection reset by peer". > >I've tried a few combinations of various /etc/fstab capitalization and >/etc/nsmb.conf capitalizations, but to no avail. Either i get >"connection reset by peer", or I get a request for the password. > =20 > Here's a working nsmb.conf, with names etc. suitably obfuscated. You=20 need to use upper case, because windows seems to need it. Make sure=20 that Windows actually exports your share - I can't help with that as I=20 know next to nothing about it - the Windows techie does it :-) In this example, the addr=3D makes the connection actually happen to an=20 alternative name for the server, which happens to be on a Gbit, rather=20 than Mbit LAN. I don't believe it's required, but you could use the=20 proper DNS name for the windows server here - it might help. I think=20 you probably need that name to appear in /etc/hosts just in case DNS is=20 unavailable when the machine reboots, if you do want to auto-mount. [SERVER01] addr=3Dserver01-alt [SERVER01:USER.NAME] password=3Dthepassword [SERVER01:OTHERUSER.NAME] password=3Dtheotherpassword [SERVER02] addr=3Dserver02-alt [SERVER02:OTHERUSER.NAME] password=3Dtheotherpassword And fstab has e.g. //user.name@server01/thesharename /mount-point smbfs rw 0 0 //otheruser.name/othershare /other-mount-point smbfs rw 0 0 and mount /mount-point or mount /other-mount-point works without=20 password prompting. hth, --Alex