Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Nov 2002 23:40:08 -0500 (EST)
From:      Fuzzy <fuzzy@pooh.ASARian.org>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Accessing Windows Share
Message-ID:  <Pine.BSF.4.44.0211292254540.45266-100000@pooh.ASARian.org>
In-Reply-To: <200211291925.22763.timothyk@wallnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.44.0211292254540.45266-100000>