mount sambashare with non-root-user

Hello, I want to mount a samba-share in my linux-box but don't want do this as root. I put an entry in my /etc/fstab like this: "//smbserver/share /mnt smbfs username=abc,password=abc,uid=500,gid=100,rw,noauto,users,exec 0 0" ... and I am able to mount this share as root and root is not the owner of the files. BUT when I try to mount this as an user I get the error message: "cannot mount on /mnt: operation is not allowed". Does anybody know a way to do this with a standard user? Thanks and regards Ruediger

did you syncronise /etc/passwd (or the shadow file) with smbpasswd? Did you activate the user with: smbpasswd -a username ???? have you configured the share with a force user or force group parameter? Michael ----- Original Message ----- From: "ic_admin" <admin@i-concept.de> To: "SuSE-Security_MailList" <suse-security@suse.com> Sent: Friday, July 12, 2002 12:01 PM Subject: [suse-security] mount sambashare with non-root-user
Hello,
I want to mount a samba-share in my linux-box but don't want do this as root. I put an entry in my /etc/fstab like this:
"//smbserver/share /mnt smbfs username=abc,password=abc,uid=500,gid=100,rw,noauto,users,exec 0 0"
... and I am able to mount this share as root and root is not the owner of the files. BUT when I try to mount this as an user I get the error message: "cannot mount on /mnt: operation is not allowed".
Does anybody know a way to do this with a standard user?
Thanks and regards
Ruediger
-- To unsubscribe, e-mail: suse-security-unsubscribe@suse.com For additional commands, e-mail: suse-security-help@suse.com Security-related bug reports go to security@suse.de, not here
--- Ausgehende Mail ist zertifiziert virenfrei. Überprüft durch AVG Antivirus System (http://www.grisoft.com/de). Version: 6.0.371 / Virendatenbank: 206 - Erstellungsdatum: 14.06.2002

On Friday 12 July 2002 06:01 am, ic_admin wrote:
I want to mount a samba-share in my linux-box but don't want do this as root. I put an entry in my /etc/fstab like this:
"//smbserver/share /mnt smbfs username=abc,password=abc,uid=500,gid=100,rw,noauto,users,exec 0 0"
... and I am able to mount this share as root and root is not the owner of the files. BUT when I try to mount this as an user I get the error message: "cannot mount on /mnt: operation is not allowed".
Take a close look at the syntax above. You have "...noauto,users,exec 0 0" in your fstab file. That should be "...noauto,user,exec 0 0" ("user" not "users"). Try changing this and you'll probably fix your problem. Now, some of the things others have suggested may *also* need to be fixed, but this is a definite syntax error so fix it first. :-) BTW, non-root mounts do not have to have the mount point owned by the user, nor do they have to be in the user's home directory. I do user-level mounts on my system all the time with neither of these constraints. Example lines from my /etc/fstab file: # For a USB-Storage type digicam /dev/sda1 /media/camera vfat defaults,noauto,user 0 0 # For a generic IDE CDROM /dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0 The mount points in /media are owned by root:root and all have permissions of 755. I can (as a user) mount, read, write, and umount the digicam media. For the CDROM media, of course, writes are not allowed either by the hardware or by the mount option "ro". Kind regards, Scott -- -----------------------+------------------------------------------------------ Scott Courtney | "I don't mind Microsoft making money. I mind them courtney@4th.com | having a bad operating system." -- Linus Torvalds http://4th.com/ | ("The Rebel Code," NY Times, 21 February 1999) | PGP Public Key at http://4th.com/keys/courtney.pubkey
participants (3)
-
ic_admin
-
Michael Haunzwickl
-
Scott Courtney