From owner-freebsd-questions@FreeBSD.ORG Tue Apr 16 08:13:21 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0E89E1AD for ; Tue, 16 Apr 2013 08:13:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id CC3FA786 for ; Tue, 16 Apr 2013 08:13:20 +0000 (UTC) Received: from r56.edvax.de (port-92-195-80-247.dynamic.qsc.de [92.195.80.247]) by mx01.qsc.de (Postfix) with ESMTP id E50693CF51; Tue, 16 Apr 2013 10:13:18 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id r3G8DRtX001954; Tue, 16 Apr 2013 10:13:27 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 16 Apr 2013 10:13:27 +0200 From: Polytropon To: Mehmet Erol Sanliturk Subject: Re: FreeBSD fstab Entry for Windows Share Message-Id: <20130416101327.392a9d8f.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Questions Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 08:13:21 -0000 On Tue, 16 Apr 2013 00:45:24 -0700, Mehmet Erol Sanliturk wrote: > I could not be able to write an /etc/fstab entry to mount that share during > boot . > > When examples in many documents from Internet are imitated , no one of them > is working , or > man pages are not much helpful. Try to adapt the following configuration example I just copied from a system image which has been working many years ago: Edit the file /etc/nsmb.conf to contain access credentials if those are needed: [default] workgroup=THEGROUPNAMEHERE [WINPC] addr=192.168.123.456 [WINPC:Administrator] password=MYTOPSECRETPASSWORD In this example, "WINPC" is then name of the PC you want to mount the SMB shares from. Also "Administrator" will be the user account by which they are mounted. Please note that this might be a stupid practice. :-) Then add those entries to /etc/fstab: //Administrator@WINPC/a$ /smb/a smbfs rw,noauto 0 0 //Administrator@WINPC/c$ /smb/c smbfs rw,noauto 0 0 //Administrator@WINPC/d$ /smb/d smbfs rw,noauto 0 0 //Administrator@WINPC/e$ /smb/e smbfs rw,noauto 0 0 //Administrator@WINPC/f$ /smb/f smbfs rw,noauto 0 0 Of course you can be more specific by naming the shares by name. In this case here, the "drive letters" have been used to access the entire drives / logical partitions / whatever. If the shares should be mounted on boot time, remove ",noauto". If not, use "mount /smb/c" for example when needed. Of course make sure that the mount targets, /smb/[acdef] in this case, do exist. Finally, make sure that if you're using "WINPC" in /etc/fstab, put an IP for in in /etc/hosts, or it won't resolve: 192.168.123.456 WINPC This is also helpful as soon as you have to run network diagnostics as you can now use "WINPC" for the "Windows" PC in any commands. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...