Samba fstab

Alexander Dalloz alexander.dalloz at uni-bielefeld.de
Fri Apr 23 17:18:42 UTC 2004


Am Fr, den 23.04.2004 schrieb Adam T. Gautier um 18:40:

> I am trying to add a line /etc/fstab that is a Samba mount of a windows 
> share.
> 
> /etc/fstab
> ...
> //192.168.2.101/movies  /mnt/movies             smbfs         
> noauto,user,user,username=guest,password=password 0 0
> ...
> (All on one line, can't help the line wrap in email)
> 
> sudo mount /mnt/movies works fine but when I right click in the Gnome 
> desktop or try to do the mount as a regular user I get:
> 
> smbmnt must be installed suid root for direct user mounts (500,500)
> smbmnt failed: 1

Why "user" two times? And it must be entred to the end of the 4 column,
or even use "users" instead (see man mount). There is not need for
setting smbmnt and smbumount suid.

Instead of using password data inside the worldreadable /etc/fstab file
I would recommend using "credentials=/home/$user/.samba" syntax in the
4th column to pass the authentification data. The credentials file in
the user home then contains the username and password data.

> How do I fix this so I can do smb mounts as a user?  Would't setuid be a 
> big security hole? I can mount a cdrom as a user no problem, does this 
> us setuid?

Yes, setting suid bit is not recommended. Where it is really needed to
set special permissions I would use sudo (setting permissions with
visudo).

> Thanks

Alexander


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 1 (Yarrow) on Athlon CPU kernel 2.4.22-1.2179.nptl
Sirendipity 19:10:40 up 5 days, 1:56, load average: 0.05, 0.12, 0.09 
                   [ Γνωθι σ'αυτον - gnothi seauton ]
             my life is a planetarium - and you are the stars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040423/b6170d4f/attachment-0001.sig>


More information about the fedora-list mailing list