From owner-freebsd-questions@freebsd.org Wed Jul 20 20:26:42 2016 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 28EF2B9F758 for ; Wed, 20 Jul 2016 20:26:42 +0000 (UTC) (envelope-from pipfstarrd@openmailbox.org) Received: from mail.openmailbox.org (mail.openmailbox.org [62.4.1.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1DC1184A for ; Wed, 20 Jul 2016 20:26:41 +0000 (UTC) (envelope-from pipfstarrd@openmailbox.org) Received: by mail.openmailbox.org (Postfix, from userid 20002) id 81D4D201691; Wed, 20 Jul 2016 22:26:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1469046398; bh=j1SdvpFW1BFBAhZ3r5q5rY0673ojxT/4w6EgBMyK5PY=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=DXcA3tnxnKc2sY+bJSx+7GTjI3lNfqsD5H97dlW7Jmh9HFfMqBMz4RjPDFu+71EZb W0QCPkGE4z7YsXQXMwNqbHOFlI8+AUQg+D4h4XjPI2Gu4vzpHmcVvWO+U9b2I78Wf1 50+THwR4MjzQ4l0BsYeKQvI+TAngl+YB89iNOHQ0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on h3 X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=NO_RECEIVED,NO_RELAYS, T_DKIM_INVALID,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.0 Subject: Re: Unable to mount with mount_smbfs while smbclient works fine DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=openmailbox.org; s=openmailbox; t=1469046398; bh=j1SdvpFW1BFBAhZ3r5q5rY0673ojxT/4w6EgBMyK5PY=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=DXcA3tnxnKc2sY+bJSx+7GTjI3lNfqsD5H97dlW7Jmh9HFfMqBMz4RjPDFu+71EZb W0QCPkGE4z7YsXQXMwNqbHOFlI8+AUQg+D4h4XjPI2Gu4vzpHmcVvWO+U9b2I78Wf1 50+THwR4MjzQ4l0BsYeKQvI+TAngl+YB89iNOHQ0= To: Polytropon References: <094cb9cb-79fc-ee1f-062d-a1153b5e7fc6@openmailbox.org> <20160720142422.520d2d08.freebsd@edvax.de> Cc: freebsd-questions@freebsd.org From: twilight Message-ID: <8f5054ed-5d66-10d4-92c3-8ada9c84d20b@openmailbox.org> Date: Wed, 20 Jul 2016 20:24:43 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160720142422.520d2d08.freebsd@edvax.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 20:26:42 -0000 Thanks, it kinda worked, but nothing is shown in the mount point. When I try to touch(1) a test file it is viewable through the smbclient(1), but is not displayed with the ls(1) command. Also, none of the existing files are shown. On 20.07.2016 12:24, Polytropon wrote: > On Wed, 20 Jul 2016 11:51:13 +0000, twilight wrote: >> I'm trying to mount a samba share (actually a D-link sharecenter) in my >> local network to my freebsd machine. But for some reason mount_smbfs >> does nothing, exiting with status 1. Dmesg is empty on errors releated >> to mount. PF firewall lets out packages to local network, so it must not >> be the case. >> >> I've read the man twice, the isn't anything covering the possible >> errors. I'm confused, what should I do? > > Allow me to provide some information refactored from a post I wrote > 5 years ago - I'm not fully sure it still applies today, but it did > work as intended. Even though I use mount + fstab, mount_smbfs is at > the center of this approach. > > > > In order to use mount (mount_smbfs), provide the "login information" > as needed in /etc/nsmb.conf (replace uppercase placeholders), for example: > > [default] > workgroup=YOUR_WORKGROUP_NAME > > [SERVERNAME] > addr=192.168.2.2 > > [SERVERNAME:USERNAME] > password=TOPSECRET > > where SERVERNAME and USERNAME correspond to the server's name > and the username you use to access the share (with the proper > password). > > See "man nsmb.conf" for details. > > You could use a hostname instead of an IP, for example by adding > an entry in /etc/hosts for the target. > > Parts of the above information should then be reflected in /etc/fstab, > maybe like this: > > //USERNAME@SERVERNAME/share /smb/share smbfs rw,noauto 0 0 > > This should allow you to use > > # mount /smb/share > > a bit easier (and automatically, if desired). > > If the target exposes more than one share via "drive letters", you > can use a similar approach in /etc/fstab: > > //USERNAME@SERVERNAME/a$ /smb/a smbfs rw,noauto 0 0 > //USERNAME@SERVERNAME/c$ /smb/c smbfs rw,noauto 0 0 > //USERNAME@SERVERNAME/d$ /smb/d smbfs rw,noauto 0 0 > //USERNAME@SERVERNAME/e$ /smb/e smbfs rw,noauto 0 0 > //USERNAME@SERVERNAME/f$ /smb/f smbfs rw,noauto 0 0 > > The "generic" mount command will then work as mentioned above. > > -- Cheers~ PGP key fingerprint: 07B3 2177 3E27 BF41 DC65 CC95 BDA8 88F1 E9F9 CEEF You can retrieve my public key at pgp.mit.edu.