James wrote:
> Andrey Asadchev <(E-Mail Removed)> wrote in news:bt2947$2k02b$1
> @ID-134500.news.uni-berlin.de:
>
>
>>James wrote:
>>
>>>Hi
>>>
>>>I'm trying to mount a windows share from a linux box as a regular user
>>>
>>>~$ mount -t smbfs -o username=james,password=123 //caspian/E caspian
>>>
>>>and I get "mount: only root can do that"
>>
>>Try
>>
>>$ smbmount -o username=james,password=123 //caspian/E caspian
>>$ smbumount caspian
>>
>>if you do mount through /etc/fstab, give "user" as one of the options.
>>
>>//caspian/E /caspian smbfs defaults,user,username=james,pasword=123 0 0
>>
>>
>>
>
>
> Hmmm - tried that and get the following
>
>
> "Usage: mount.smbfs service mountpoint [-n] [-o options,...]
> Version 3.0.0-Debian
>
> Options:
> username=<arg> SMB username
> ...
> ...
> ...
> This command is designed to be run from within /bin/mount by giving
> the option '-t smbfs'. For example:
> mount -t smbfs -o username=tridge,password=foobar //fjall/test
> /data/test"
>
> My conclusion so far, is if smbmount and smbmnt are suid root but won't
> mount a smb share as a regular user it must be (a) hard coded at compile
> time or (b) managed by a wrapper or (c) be referring to an external
> config file or system wide security setting much like Suse has with their
> permissions.XXX file, don't know if Debian has a similar option,
>
> any ideas ??
>
> J
Hi
Sorry man, i messed up a bit
$ smbmount -o username=james,password=123 //caspian/E caspian
should be
$ smbmount //caspian/E caspian -o username=james,password=123
optionss go in the back
I double checked on my machine just to make sure (i run debian too) :-)
Anyways.
mount is setuid but only filesystems listed in fstab are allowed for
mounts (with user flag) - afaik.
when you pass "-t smb(fs)?", mount actually calls /sbin/mount.smb(fs)?
If you do
$ ls /sbin/mount.smb*
lrwxrwxrwx 1 root root 17 Dec 31 21:12 /sbin/mount.smb
-> /usr/bin/smbmount
lrwxrwxrwx 1 root root 17 Dec 31 21:12
/sbin/mount.smbfs -> /usr/bin/smbmount
From man page of smbmout
NOTE: smbmount calls smbmnt(8) to do the actual mount. You must make
sure that smbmnt is in the path so that it can be found
$ ls -al /usr/bin/smbmnt
-rwsr-xr-x 1 root root 430760 Apr 7 2003 /usr/bin/smbmnt
smbmnt does final magic and it is setuid.
hope this does not make stuff too muddy. good luck.
|