Date: Wed, 20 Jul 2016 20:24:43 +0000 From: twilight <pipfstarrd@openmailbox.org> To: Polytropon <freebsd@edvax.de> Cc: freebsd-questions@freebsd.org Subject: Re: Unable to mount with mount_smbfs while smbclient works fine Message-ID: <8f5054ed-5d66-10d4-92c3-8ada9c84d20b@openmailbox.org> In-Reply-To: <20160720142422.520d2d08.freebsd@edvax.de> References: <094cb9cb-79fc-ee1f-062d-a1153b5e7fc6@openmailbox.org> <20160720142422.520d2d08.freebsd@edvax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8f5054ed-5d66-10d4-92c3-8ada9c84d20b>