From owner-freebsd-questions Fri Nov 29 20:40:44 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01D2B37B404 for ; Fri, 29 Nov 2002 20:40:41 -0800 (PST) Received: from pooh.ASARian.org (pooh.ASARian.org [216.21.171.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id D410B43EBE for ; Fri, 29 Nov 2002 20:40:38 -0800 (PST) (envelope-from fuzzy@pooh.ASARian.org) Received: from localhost (fuzzy@localhost.ASARian.org [127.0.0.1]) by pooh.ASARian.org (8.12.6/8.12.6) with ESMTP id gAU4e8H4046541 for ; Fri, 29 Nov 2002 23:40:08 -0500 (EST) (envelope-from fuzzy@pooh.ASARian.org) Date: Fri, 29 Nov 2002 23:40:08 -0500 (EST) From: Fuzzy To: freebsd-questions@FreeBSD.ORG Subject: Re: Accessing Windows Share In-Reply-To: <200211291925.22763.timothyk@wallnet.com> Message-ID: X-No-Archive: Yes Organization: ASARian Inc. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 29 Nov 2002, Tim Kellers wrote: > If you want to mount Windows shares without Samba, though, you need > SMBFS and a comman like: > > mount_smbfs -W [Workgroup or Domain] -I [IP address of Windows server] > //windowsuser@netbiosname/sharename /FreeBSD mount point > I'm running: FreeBSD 4.7-release smbclient 2.2.2 I've been using smbclient to access the //EEYORE/C share. I tried the command below to access the same share. This works, but I'd like to put the mount in /etc/fstab I usied the -N option, which reads the password information from either /usr/local/etc/nsmb.conf or ~/.nsmbrc. Both files exist 0640 root:wheel. The mount point directory exists 0770 fuzzy:wheel. works: mount_smbfs -c l -d 770 -f 660 -g wheel -u fuzzy \ -N //QWILLPEN@EEYORE/C /qwills_c reading the ~root/.nsmbrc file for the password. How do I write the line in /etc/fstab to make it possible to mount the share, after the network is available, via a script maybe out of /etc/rc.local or crontab @boot? //QWILLPEN@EEYORE/C /qwills_c smbfs rw,noauto ?? I need a way to tell mount_smb when its using /etc/fstab its command line options. Is it root's .nsmbrc that's read for the mount's password? /usr/local/etc/nsmb.conf is not read if the ~root/.nsmbrc doesn't exist the mount fails with the message: mount_smbfs: unable to open connection: syserr = Authentication error not sure what I'm doing wrong? Fuzzy ~root/.nsmbrc # First, define a workgroup. [default] workgroup=ASARIAN [EEYORE:QWILLPEN:C] workgroup=ASARIAN password=[[:actual password:]] /usr/local/etc/nsmb.conf # $Id: dot.nsmbrc,v 1.7 2002/04/10 04:21:11 bp Exp $ # # Example for .nsmbrc file # # smbfs lookups configuration files in next order: # 1. ~/.nsmbrc # 2. /usr/local/etc/nsmb.conf - if this file found it will # override values with same keys from user files. # # # This file consist from a set of sections. Each section started by section name # surrounded with square brackets: # [section_name] # # End of the section marked either by new section or by the end of file. # Each section can contain zero or more parameters: # [section_name] # key=value # # where 'key' represents parameter name and 'value' a value assigned # to this parameter. # # SMB library uses next forms of section names (please note that the section # name should be in upper case when it refers to server, user or share): # A) [default] # B) [SERVER] # C) [SERVER:USER] # D) [SERVER:USER:SHARE] # # Here is the map of possible keywords: # # keyword/section A B C D Comment # # addr - + - - IP or IPX address of SMB server # charsets + + + + local:remote charset pair # nbns + + - - address of NetBIOS name server (WINS) # nbscope + + - - NetBIOS scope # nbtimeout + + - - timeout for NetBIOS name servers # password - - + + a plain text password used to access to the given share # retry_count + + - - number of retries before connection marked as broken # timeout + + - - SMB request timeout # workgroup + + + + name of workgroup # # A simple configuration example: # First, define a workgroup. [default] workgroup=ASARIAN [EEYORE:QWILLPEN:C] workgroup=ASARIAN password=[[:actual password:]] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message