From owner-freebsd-questions@freebsd.org Sat Jan 21 03:42:34 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 138C2CBA78D for ; Sat, 21 Jan 2017 03:42:34 +0000 (UTC) (envelope-from non.euc.geo.1854@gmail.com) Received: from mail-pg0-x22c.google.com (mail-pg0-x22c.google.com [IPv6:2607:f8b0:400e:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D55CE1648 for ; Sat, 21 Jan 2017 03:42:33 +0000 (UTC) (envelope-from non.euc.geo.1854@gmail.com) Received: by mail-pg0-x22c.google.com with SMTP id 204so28526779pge.0 for ; Fri, 20 Jan 2017 19:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:disposition-notification-to :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=raWDXeUhjgEQevRkJ9BUcyA5s4PIVAP/IYnwguRCUeI=; b=MPwrnAnIvAO+YeppyGvTGMxC+eJcGcqg5iBNypdZ+kZO2pZS4AbXOpJWEjKb9S++li AKvATp6jrX5+K4plmktDrGzuDCcA7DkQvZ5Bm5f3XjyaVu+DEbEpAwnlhK/1XmzY3TjS 1aAPLeLEC9OIysmZ6b+wFEFVGs8gd6vrKw+hnucH7PxdFi5JTb/fC2h4X45Bda8xeVvZ w3IaAVwTAB2bqRkKrFf+EzFyO/690YN3yJFTHpZherfPQJcusc4huLApq97mZyArlPmC W+6y45WppkQcphtU9nMsg6c1b+FzuMt2VwSdKEV4N3dH3U1vBAbmQ6sSYb+Xjhj753it XPgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id :disposition-notification-to:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=raWDXeUhjgEQevRkJ9BUcyA5s4PIVAP/IYnwguRCUeI=; b=TpcQi2ewPM1aW7hogJU9HteBNphZh03vDylDtUN0WKsG5e4zW9CdAE0JTnEBUaUf7x tJ6YTKlNsmlEm1dbbhBUEFly49Sz4X3WuKSud7FK5mrSfojf4CMuozdtOBZq7AEiGRpz tgef3+Z72ltTfy4YWzRMoI478+hzaTLRxO/W09AGl3UJiGAppoLQ7GY6rMzUWCiA+cHi Y6EjxZ6f4gnyptt1T3TFoKchzgp3YT26/PeEDZ0l2V8S0tCBHrXSk5xd4LDYoLSNkyFP zxot0wqjLLZ9fVzyOI/slZ8dKsmLA2uOnRCeV/j3qnFzzaAbqXSkGNxX0jORi/1iIcEd 5/KA== X-Gm-Message-State: AIkVDXJiZ7z2K2KoF197oPOGhgvNEOetM+4gCIiXKOEJfvDmmjefc24BWcmNV8T5PEVQ0g== X-Received: by 10.98.89.21 with SMTP id n21mr20598662pfb.163.1484970153028; Fri, 20 Jan 2017 19:42:33 -0800 (PST) Received: from [192.168.1.7] (96-41-72-194.dhcp.mtpk.ca.charter.com. [96.41.72.194]) by smtp.googlemail.com with ESMTPSA id y201sm20028254pfb.16.2017.01.20.19.42.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jan 2017 19:42:32 -0800 (PST) Subject: Re: FreeBSD 11.0 and mounting SMB shared folder at boot without password To: freebsd-questions@freebsd.org References: From: "J.B." Message-ID: <0064d7a1-9d91-1f02-c24a-4445381fe112@gmail.com> Date: Fri, 20 Jan 2017 19:42:31 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2017 03:42:34 -0000 On 01/20/2017 04:00 AM, freebsd-questions-request@freebsd.org wrote: > Send freebsd-questions mailing list submissions to > freebsd-questions@freebsd.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > or, via email, send a message with subject or body 'help' to > freebsd-questions-request@freebsd.org > > You can reach the person managing the list at > freebsd-questions-owner@freebsd.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of freebsd-questions digest..." > > > Today's Topics: > > 1. FreeBSD 11.0 and mounting SMB shared folder at boot without > password (David Christensen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 19 Jan 2017 20:35:42 -0800 > From: David Christensen > To: freebsd-questions@freebsd.org > Subject: FreeBSD 11.0 and mounting SMB shared folder at boot without > password > Message-ID: <3a018208-2ad4-1b1d-302d-e5ab4f1f2fad@holgerdanske.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > freebsd-questions: > > I have a computer: > > toor@freebsd:/root # freebsd-version > 11.0-RELEASE-p7 > > toor@freebsd:/root # uname -a > FreeBSD freebsd 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu > Sep 29 03:40:55 UTC 2016 > root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 > > > I am attempting to mount a Microsoft Windows shared folder > (//dc8ct591/data) into my home directory > (freebsd:/usr/home/dpchrist/.data) at boot, without having to enter my > password. > > > Using Xfce and Thunar, I can browse the network, see the shared folder, > enter my credentials, and access files within the share. > > > After RTFM and STFW, this is my current attempt: > > toor@freebsd:/root # ll /etc/fstab > -rw-r--r-- 1 root wheel uarch 230 Jan 19 19:41 /etc/fstab > > toor@freebsd:/root # grep dc8ct591 /etc/fstab > //dpchrist@dc8ct591/data /usr/home/dpchrist/.data smbfs rw,-N 0 0 > > toor@freebsd:/root # ll /etc/nsmb.conf > -rw------- 1 root wheel uarch 85 Jan 19 19:42 /etc/nsmb.conf > > toor@freebsd:/root # cat /etc/nsmb.conf > [default] > workgroup=WORKGROUP > [dc8ct591:dpchrist] > password= > > > If I run 'mount' with the -d option, I can see the system call to > 'mount_smbfs': > > toor@freebsd:/root # mount -d /usr/home/dpchrist/.data > exec: mount_smbfs -o rw -N //dpchrist@dc8ct591/data /usr/home/dpchrist/.data > > > If I then run 'mount_smbfs' without the -N option and enter the password > for dpchrist@dc8ct591, it works: > > toor@freebsd:/root # mount_smbfs -o rw //dpchrist@dc8ct591/data > /usr/home/dpchrist/.data > Password: > > toor@freebsd:/root # mount | grep -i dc8ct591 > //DPCHRIST@DC8CT591/DATA on /usr/home/dpchrist/.data (smbfs) > > > But if run 'mount', or 'mount_smbfs' manually with the -N option, it fails: > > toor@freebsd:/root # umount /usr/home/dpchrist/.data > > toor@freebsd:/root # mount | grep -i dc8ct591 > > toor@freebsd:/root # mount /usr/home/dpchrist/.data > mount_smbfs: unable to open connection: syserr = Authentication error > > toor@freebsd:/root # mount_smbfs -o rw -N //dpchrist@dc8ct591/data > /usr/home/dpchrist/.data > mount_smbfs: unable to open connection: syserr = Authentication error > > > I get the same result for shared folders on Samba 2:3.6.6-6+deb7u11 on > Debian 7 (Wheezy) and on Windows XP SP2. > > > I don't know how to get more information about the "Authentication > error" encountered by mount_smbfs (no --verbose or --debug option, and > doesn't seem to write into any file in /var/log). > > > Any suggestions? > > > David > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > ------------------------------ > > End of freebsd-questions Digest, Vol 659, Issue 7 > ************************************************* -N Do not ask for a password. At run time, mount_smbfs reads the ~/.nsmbrc file for additional configuration parameters and a password. If no password is found, mount_smbfs prompts for it. Looks like mount_smbfs is expecting the file to be named '.nsmbrc', not simply 'nsmbrc.' So it's not finding the file where the password is stored.