Mounting smbfs as user?

Roland Smith rsmith at xs4all.nl
Thu Oct 18 10:15:28 PDT 2007


On Thu, Oct 18, 2007 at 04:08:09PM +0200, Ivan Voras wrote:
> Hi,
> 
> I'm trying to implement smbfs mounting by regular non-root users and I
> can't make any progress. vfs.usermount is set to 1.
> 
> When I try mounting a remote file system, this is what I get:
> 
> > mount_smbfs -I server //user at server/pre mt
> Warning: no cfg file(s) found.
> mount_smbfs: can not setup kernel iconv table (ISO8859-1:tolower):
> syserr = Operation not permitted
> 
> The same command works under root, and the appropriate klds are loaded:
<snip>
> Any ideas?

The user in question probably needs read/write access to the /dev/smbX
device in question.

An elagant solution is to create a group called e.g. smbusers. All the
users who need to mount an smb share should be added to this group.

Then you have to add the following rule to your /etc/devfs.rules file;

[local_ruleset=10]
add path 'smb*' mode 0660 group smbusers

The following then needs to be set in /etc/rc.conf.

devfs_system_ruleset="local_ruleset"

Then reboot or re-start devfs and try again.

Normally when mounting a drive as a normal user, the user in question
needs to _own_ the mount point. I'm not sure if this applies to smb
devices, but try it.

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071018/43bc5625/attachment.pgp


More information about the freebsd-stable mailing list