From owner-freebsd-questions@FreeBSD.ORG Tue Apr 16 09:28:34 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3011F6A7 for ; Tue, 16 Apr 2013 09:28:34 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-vb0-x233.google.com (mail-vb0-x233.google.com [IPv6:2607:f8b0:400c:c02::233]) by mx1.freebsd.org (Postfix) with ESMTP id E68D8E1D for ; Tue, 16 Apr 2013 09:28:33 +0000 (UTC) Received: by mail-vb0-f51.google.com with SMTP id x19so197498vbf.24 for ; Tue, 16 Apr 2013 02:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=7ICNZ94B9hwjT6Qy5OkLB4ZXxRm2lUKuZzT/hUVQqYg=; b=L8PUGaSpvOVSGdNYi5iHa3aOZZZZPx+BFcR9rGNUXQCTH84qT0GKkiqbjWh8jueInW 4iivwOG5Yn5axt66MjkljlNKjLvQ7XHuetQ93R4P5Zv24L8r8A2l1Umtuyehi6070gNl H5lG2pLxS+ZmssIwd6XNO/rvQGbELeYgmOBl5gk1/vqvlyJnRljiW6HOtKL+4CbLw43/ kvk3Iwz032jK3u9QcsdHuAj3iin1PFFhxA+FPDPj+tOdzm+0pQ/eY7E5vtET27j+VfoC 7k6soNeY7XaTv6aQRGiy22Pp6FNp4U8koeKfMghkaTWWRtO4LqFWiclOATkjKAVSvJhW qFyA== MIME-Version: 1.0 X-Received: by 10.52.27.52 with SMTP id q20mr833443vdg.16.1366104513209; Tue, 16 Apr 2013 02:28:33 -0700 (PDT) Received: by 10.58.132.203 with HTTP; Tue, 16 Apr 2013 02:28:33 -0700 (PDT) In-Reply-To: <20130416101327.392a9d8f.freebsd@edvax.de> References: <20130416101327.392a9d8f.freebsd@edvax.de> Date: Tue, 16 Apr 2013 02:28:33 -0700 Message-ID: Subject: Re: FreeBSD fstab Entry for Windows Share From: Mehmet Erol Sanliturk To: Polytropon Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Questions Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Apr 2013 09:28:34 -0000 On Tue, Apr 16, 2013 at 1:13 AM, Polytropon wrote: > 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, ... > Dear Polytropon , Your message has supplied important information . When their equivalent values are entered , they worked : "WINPC" : NetBIOS_NAME_in_Windows workgroup : Work_Group_NAME_in_Windows "Administrator" : user_name_in_Windows_Administrators F$ : Share_Name_in_Windows With the above values : /etc/nsmb.conf : ----------------------------- [default] Workgroup=Work_Group_NAME_in_Windows [NetBIOS_NAME_in_Windows] addr=192.168.10.25 ----------------------------- The following values are NOT required ( they are not taken into consideration ) : [WINPC:Administrator] password=MYTOPSECRETPASSWORD During boot , the password is asked . /etc/hosts : ----------------------------- 192.168.10.25 NetBIOS_NAME_in_Windows ----------------------------- /etc/fstab : ----------------------------- //user_name_in_Windows_Administrators@NetBIOS_NAME_in_Windows/Share_Name_in_Windows /mnt smbfs rw 0 0 ----------------------------- where /mnt is the mount directory in FreeBSD server , the sample IP number 192.168.10.25 will be replaced by actual IP number . Thank you very much . Mehmet Erol Sanliturk