From nobody@FreeBSD.org  Tue Aug 27 06:38:06 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 4BA4AE53
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Aug 2013 06:38:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 3A0C52ED2
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Aug 2013 06:38:06 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7R6c5Xm070192
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Aug 2013 06:38:05 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7R6c5kn070187;
	Tue, 27 Aug 2013 06:38:05 GMT
	(envelope-from nobody)
Message-Id: <201308270638.r7R6c5kn070187@oldred.freebsd.org>
Date: Tue, 27 Aug 2013 06:38:05 GMT
From: Martin Laabs <info@martinlaabs.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mount_smbfs fails to mount with non-root privileges
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         181578
>Category:       bin
>Synopsis:       mount_smbfs(8) fails to mount with non-root privileges
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 27 06:40:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Tue Aug 27 23:59:45 UTC 2013
>Originator:     Martin Laabs
>Release:        9-STABLE-p5
>Organization:
-
>Environment:
FreeBSD laabs.hf.ifn.et.tu-dresden.de 9-STABLE-p5 FreeBSD 9-STABLE-p5 #0: Tue Jul 30 16:02:30 UTC 2013     root@amd64-builder.pcbsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
With vfs.usermount=1 you can allow ordinary users to mount a file system. This can be handy for e.g. USB-Sticks and for samba shares since the user might has to type its password (that is not known at system boot time)

However the mount_smbfs tool seems to need root privileges even if the sysctl is set:

[martin@laabs ~]$ mount /home/net-shared-all/
mount_smbfs: can not setup kernel iconv table (ISO8859-1:tolower): syserr = Operation not permitted

With root privileges the mount call work as expected
>How-To-Repeat:
Try the follwoing as a normal user:
sudo sysctrl vfs.usermount=1
mount_smbfs <SMB-Mountpoint> <Mountpoint you own>


>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
