Subject: Re: SMBFS
To: Hubert Feyrer <email@example.com>
From: Ron Roskens <firstname.lastname@example.org>
Date: 03/10/2004 00:36:01
* Hubert Feyrer <email@example.com> [2004-03-10 01:40:34 +0100]:
> In article <20040309192212.GH15902@netmeister.org> you wrote:
> > $ ls -l /dev/nsmb0
> > crw-rw-rw- 1 root wheel 98, 0 Mar 9 13:30 /dev/nsmb0
> on an 1.6.2/i386 system, I have:
> crw-r--r-- 1 root wheel 88, 0 May 25 2002 /dev/nsmb0
If you do this, as a normal user you get:
mount_smbfs: can't get handle to requester (no /dev/nsmb* device)
> Maybe also check PR bin/23401 (which I still had no time to verify after
> not getting past the Password prompt :/).
No, its something different. The error message pops up from smb_ctx_lookup()
inside src/dist/smbfs/lib/smb/ctx.c. Its tried to do an SMBIOC_LOOKUP ioctl()
on the /dev/nsmb0 device and thats failed. Is it possible that the netsmb
kernel code here is using the user's credentials to create the network
connection to find the remote server?
I would try and compile a kernel with some debugging around the
function smb_vc_create() inside src/sys/netsmb/smb_conn.c and see what
gets reported back. Specifically, what are the values of uid, gid, realid,
isroot, and groupmember(gid, cred)? Is EPERM getting returned at this point?
An interesting data point, is that as a user on a FBSD 4.9 box I cannot
mount a smb share either. I get the same "Operation not permitted" message,
although mount_smbfs is a little more verbose there:
roskens@webdev$ mount_smbfs -I screamer.tx.elfin.net -W ELFIN //roskens@screamer/data /d/data
Warning: no cfg file(s) found.
mount_smbfs: can not setup kernel iconv table (default:tolower): syserr = Operation not permitted