Mounting smbfs as non-root

Peter Jeremy peterjeremy at
Wed Dec 13 01:11:55 PST 2006

I am trying to mount a SMB filesystem as an ordinary user (because
I don't want to give root to this particular person).  Whilst
running mount_smbfs as root works, attempting the same command
as non-root consistently returns
mount_smbfs: can not setup kernel iconv table (ISO8859-1:tolower): syserr = Operation not permitted

I've looked at a ktrace and the source code and the offending code is
sysctlbyname("kern.iconv.add", ...)

I've looked through iconv_sysctl_add() and can't see any way for the
code to return EPERM.

My reading of all the code also suggests that once the relevant iconv
tables are loaded, then iconv_sysctl_add() should return EEXIST
(via iconv_register_cspair()).  But even if the relevant translation
table is loaded (by mounting a SMB filesystem as root), I still get
the above error when trying to use mount_smbfs as a user.  I've even
written some code to let me look at the kern.iconv MIB tree which
confirms the above but doesn't get any me any closer to a solution.

This is the same on two 6.2-PRERELEASE systems and I get the same
behaviour on an oldish 7-current system.  Does anyone have any
suggestions on what is going wrong?

Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-stable mailing list