mount a smb filesystem

Ion-Mihai Tetcu itetcu at apropo.ro
Sat Feb 7 08:47:59 PST 2004


On Fri, 06 Feb 2004 16:58:18 -0500
"HOLLOW, CHRISTOPHER" <christopher.hollow at cgi.com> wrote:

> Try:
> 
> 
> //servername/sharename /mountdirectory smbfs 
> username=windowsuserename,password=windowspassword 0 0

On my 5.2CURRENT:

1. with one of the following in fstab:
//itetcu at fnan/d /vol/fnan/d smbfs  rw,noauto,username=itetcu,password=q  0 0
//itetcu at fnan/d /vol/fnan/d smbfs  rw,noauto,password=q  0 0
//fnan/d /vol/fnan/d smbfs  rw,noauto,username=itetcu,password='q'  0 0
//fnan/d /vol/fnan/d smbfs  rw,noauto,username=itetcu,password=qcc  0 0
etc.

I get:
itetcu at it> /tmp [18:38:45] 0
 # mount /vol/fnan/d
smbfs: -o username=: option not supported

Having in fstab:
//itetcu at fnan/d /vol/fnan/d     smbfs   rw,noauto 0 0
and in /usr/local/etc/nsmb.conf :
[FNAN:ITETCU:D]
password=q
results in:
itetcu at it> /tmp [18:42:22] 0
 # mount /vol/fnan/d
Password:

However, if I have the password in /root/.nsmbrc, the mount /vol/fnan/d
doesn't promt for password. So it seems that entries in
/usr/local/etc/nsmb.conf aren't used as defaults, but only overrides the
entries in ~/.nsmbrc.

 
> HTH,
> 
> Christopher Hollow
> 
> 
> Darryl Hoar wrote:
> 
> >Greetings,
> >If you put a line like:
> >
> >//guest at myserver/misc       /test      smbfs     ro,noauto     0     0
> >
> >in /etc/fstab, is there a way to specify the pasword so that when you
> >mount the filesystem, it doesn't prompt for the password ?
> >
> >I see that mount_smbfs uses .nsmbrc, but that has no effect when
> >you use fstab.
> >
> >any help greatly appreciated.
> >
> >-Darryl


-- 
IOnut
Unregistered ;) FreeBSD user


More information about the freebsd-questions mailing list