Subject: Re: SMBFS
To: None <netbsd-users@netbsd.org, current-users@netbsd.org>
From: David S. <davids@idiom.com>
List: netbsd-users
Date: 03/09/2004 11:07:58
> 
> > > I'm trying to use mount_smbfs to access a remote Windows share:
> > >
> > > mount_smbfs -I remote.server.name -W campus -u jschauma	\
> > > //jschauma@remote/jschauma /mnt
> > > Password:
> > >
> > > This only succeeds if I do this as root.  As a regular user, I get:
> > > mount_smbfs: unable to open connection: syserr = Operation not permitted
> > >
> > > Tracing it:
> > >    763 mount_smbfs CALL  open(0xbfbfed84,0x2,0x4805429c)
> > >    763 mount_smbfs NAMI  "/dev/nsmb0"
> > >    763 mount_smbfs RET   open 3
> > >    763 mount_smbfs CALL  ioctl(0x3,_IOW('n',0x6a,0x4),0xbfbfedc4)
> > >    763 mount_smbfs GIO   fd 3 wrote 772 bytes
> > > [...]
> > >    763 mount_smbfs RET   ioctl -1 errno 1 Operation not permitted
> > 
> > Setting sysctl vfs.generic.usermount=1 might help.
> 
> Sorry, no go.  Same error.

From mount(8):

     In NetBSD, a file system can only be mounted by an ordinary user who owns
     the point node and has access to the special device (at least read per-
     missions).  In addition, the vfs.generic.usermount sysctl(3) must be set
     to 1 to permit file system mounting by ordinary users.  See also
     sysctl(8)

David S.