Samba fstab

Alexander Dalloz alexander.dalloz at
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
> ...
> //  /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

> Thanks


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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : 

More information about the users mailing list