Re: Mounting smbfs as user?

2007-10-22 Thread Ivan Voras
On 18/10/2007, Roland Smith [EMAIL PROTECTED] wrote:

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

There is no such device:

# ls /dev/smb*
ls: No match.

(with and without a smbfs mount point mounted by root)
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting smbfs as user?

2007-10-22 Thread Stefan Lambrev

Hi,

Ivan Voras wrote:

On 18/10/2007, Roland Smith [EMAIL PROTECTED] wrote:

  

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



There is no such device:

# ls /dev/smb*
ls: No match.
  
Err, /dev/smb stands for System Management Bus and have nothing to do 
with smbfs :)
What I found is the claim that only root is allowed to set up the 
kernel's iconv table
And now I'm thinking, may be, if the root setup this table, the right 
way before the user try to mount ...

(with and without a smbfs mount point mounted by root)
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]
  


--

Best Wishes,
Stefan Lambrev
ICQ# 24134177

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting smbfs as user?

2007-10-22 Thread Roland Smith
On Mon, Oct 22, 2007 at 02:04:15PM +0200, Ivan Voras wrote:
 On 18/10/2007, Roland Smith [EMAIL PROTECTED] wrote:
 
  The user in question probably needs read/write access to the /dev/smbX
  device in question.
 
 There is no such device:
 
 # ls /dev/smb*

My bad. That's a device for the system management bus.

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)


pgpzDF78rdz7e.pgp
Description: PGP signature


Re: Mounting smbfs as user?

2007-10-22 Thread Ivan Voras
On 22/10/2007, Stefan Lambrev [EMAIL PROTECTED] wrote:

 Err, /dev/smb stands for System Management Bus and have nothing to do
 with smbfs :)
 What I found is the claim that only root is allowed to set up the
 kernel's iconv table
 And now I'm thinking, may be, if the root setup this table, the right
 way before the user try to mount ...

As I've said, I've mounted smbfs file systems as root before
attempting to do it as a user, so it's not it.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting smbfs as user?

2007-10-19 Thread Andriy Gapon
on 18/10/2007 17:29 Ivan Voras said the following:
 Krassimir Slavchev wrote:
 Hi,

 Ivan Voras wrote:
 
 
 The same command works under root, and the appropriate klds are loaded:
 Only superuser can load modules. If you try to load module by regular
 user you will get: kldload: can't load .ko: Operation not permitted
 
 
 To clarify: the modules were loaded before I tried either as user or as
 root.


This doesn't seem to be entirely smbfs-specific, but rather specific to
internal workings of iconv modules. Here's some information from a while
ago:
http://lists.freebsd.org/pipermail/freebsd-stable/2006-December/031501.html

I didn't get any useful information since then and still have to use a
workaround of doing any mount as root to get iconv initialized first and
then all subsequent user mounts are successful.
While on one hand this seems like only a minor annoyance, on the other
hand it indicates a problem in iconv internal workings and this should
be considered a bug as this breaks a user-mount feature.

Probably a PR is due here, I was just too lazy to open it when I first
hit the problem.

-- 
Andriy Gapon
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Mounting smbfs as user?

2007-10-18 Thread Ivan Voras
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 //[EMAIL PROTECTED]/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:

 kldstat
Id Refs AddressSize Name
 1   15 0xc040 6d599c   kernel
 21 0xc0ad6000 169fcgeom_raid3.ko
 31 0xc0aed000 2464 accf_http.ko
 41 0xc0af 653f4acpi.ko
 51 0xc0b56000 972c dummynet.ko
 61 0xc0b6 23c64smbfs.ko
 73 0xc0b84000 49f4 libiconv.ko
 83 0xc0b89000 2c2c libmchain.ko
 91 0xc5107000 4000 nullfs.ko
101 0xc5165000 1a000linux.ko

Any ideas?

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting smbfs as user?

2007-10-18 Thread Krassimir Slavchev
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

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 //[EMAIL PROTECTED]/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:

Only superuser can load modules. If you try to load module by regular
user you will get: kldload: can't load .ko: Operation not permitted

 
 kldstat
 Id Refs AddressSize Name
  1   15 0xc040 6d599c   kernel
  21 0xc0ad6000 169fcgeom_raid3.ko
  31 0xc0aed000 2464 accf_http.ko
  41 0xc0af 653f4acpi.ko
  51 0xc0b56000 972c dummynet.ko
  61 0xc0b6 23c64smbfs.ko
  73 0xc0b84000 49f4 libiconv.ko
  83 0xc0b89000 2c2c libmchain.ko
  91 0xc5107000 4000 nullfs.ko
 101 0xc5165000 1a000linux.ko
 
 Any ideas?
 
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQFHF2sDxJBWvpalMpkRAkoDAJ4vnIc8qx7cxdtBvirv/5y5E+UTPwCfTIlG
oYuiOLhWpiX198tgfOSBrsE=
=uth8
-END PGP SIGNATURE-
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting smbfs as user?

2007-10-18 Thread Ivan Voras
Krassimir Slavchev wrote:
 Hi,
 
 Ivan Voras wrote:


 The same command works under root, and the appropriate klds are loaded:
 
 Only superuser can load modules. If you try to load module by regular
 user you will get: kldload: can't load .ko: Operation not permitted


To clarify: the modules were loaded before I tried either as user or as
root.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Mounting smbfs as user?

2007-10-18 Thread Roland Smith
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 //[EMAIL PROTECTED]/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)


pgpCULMLubPSo.pgp
Description: PGP signature