Date: Wed, 20 Jul 2016 14:24:22 +0200 From: Polytropon <freebsd@edvax.de> To: twilight <pipfstarrd@openmailbox.org> Cc: freebsd-questions@freebsd.org Subject: Re: Unable to mount with mount_smbfs while smbclient works fine Message-ID: <20160720142422.520d2d08.freebsd@edvax.de> In-Reply-To: <094cb9cb-79fc-ee1f-062d-a1153b5e7fc6@openmailbox.org> References: <094cb9cb-79fc-ee1f-062d-a1153b5e7fc6@openmailbox.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160720142422.520d2d08.freebsd>