LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-03-2003, 05:56 PM   #1
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Rep: Reputation: 15
Question Samba: Operation not permitted--smbmnt failed


I am trying to set up a Samba share in my /etc/fstab so that any user can mount the share. I can mount the share using "su" but not as a normal user.

Here is my fstab entry:
//encoder/c /mnt/encoder smbfs noauto,users,guest,rw,username=xxx,password=xxxx 0 0

ls -l /usr/bin/smb*
-rwxr-xr-x 1 root root 2036 Apr 5 2003 smbadduser
-rwxr-xr-x 1 root root 1001080 Apr 5 2003 smbcacls
-rwxr-xr-x 1 root root 558744 Apr 5 2003 smbclient
-rwxr-xr-x 1 root root 360572 Apr 5 2003 smbcontrol
-rwsr-xr-x 1 root root 491128 Apr 5 2003 smbmnt
-rwxr-xr-x 1 root root 504056 Apr 5 2003 smbmount
-rwxr-xr-x 1 root root 966072 Apr 5 2003 smbpasswd
-rwxr-xr-x 1 root root 2293 Apr 5 2003 smbprint
-rwxr-xr-x 1 root root 490840 Apr 5 2003 smbspool
-rwxr-xr-x 1 root root 363480 Apr 5 2003 smbstatus
-rwxr-xr-x 1 root root 4899 Apr 5 2003 smbtar
-rwxr-xr-x 1 root root 490680 Apr 5 2003 smbumount

ls -l /mnt
drwxr-xr-x 2 root root 4096 Aug 8 17:44 cdrom
drwxrwx--- 2 root root 4096 Oct 17 09:58 encoder
drwxr-xr-x 2 root root 4096 Aug 8 17:44 floppy
drwxr-xr-x 2 root root 4096 Oct 24 02:08 zip

mount /mnt/encoder (as normal user)
cannot mount on /mnt/encoder: Operation not permitted
smbmnt failed: 1

Have any idea why the mount is failing?
 
Old 11-03-2003, 06:44 PM   #2
idaho
Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: RedHat, Libranet
Posts: 438

Rep: Reputation: 30
Try changing the permissions on /mnt/encoder to allow anyone read and execute permisssions (chmod a+rx /mnt/encoder)
 
Old 11-04-2003, 12:41 PM   #3
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Original Poster
Rep: Reputation: 15
Thumbs up

Thanks! That fixed the problem.

Quote:
Originally posted by idaho
Try changing the permissions on /mnt/encoder to allow anyone read and execute permisssions (chmod a+rx /mnt/encoder)
UPDATE:
It did fix the problem initially but when I booted up today, the problem has returned. When I type
$ mount /mnt/encoder
I get this message:
cannot mount on /mnt/encoder: Operation not permitted smbmnt failed: 1

I checked the fstab file and it has not changed. The mount command does work as root. Here is the mount directory list:

$ ls -l
drwxr-xr-x 2 root root 4096 Aug 8 17:44 cdrom
drwxrwxr-x 2 root root 4096 Oct 17 09:58 encoder
drwxr-xr-x 2 root root 4096 Aug 8 17:44 floppy
drwxr-xr-x 2 root root 4096 Oct 24 02:08 zip

Any ideas on what could have happened? It worked so well yesterday after the chmod.

Last edited by andrewstr; 11-05-2003 at 12:27 PM.
 
Old 05-12-2004, 09:39 PM   #4
juanx
LQ Newbie
 
Registered: Nov 2003
Location: ˇˇˇArgentina!!!
Posts: 13

Rep: Reputation: 0
Hi, I bumped into your post, and maybe I have some kind of solution.
I have the same problem as you. Apparently it all works fine if you set the directory's (/mnt/encoder in your case) owner to the user that mounts the share.
I know it sucks, but it's the only solution I've found so far.
If you have anything better, please let me know. I'd really like everyone to be able to mount my shares, but don't want to set them automount.
OK, hope it helps,

Juan
 
Old 05-13-2004, 12:31 PM   #5
andrewstr
Member
 
Registered: Oct 2003
Location: WA--USA
Distribution: Red Hat 9, Suse 10.2
Posts: 144

Original Poster
Rep: Reputation: 15
Jaun,

I discovered the same thing. What I have done to bypass the issue is to create a mnt directory under my home directory. I use that to mount shares or other drives not listed in fstab. Maybe not the best solution, but it works.
 
Old 05-14-2004, 03:58 PM   #6
juanx
LQ Newbie
 
Registered: Nov 2003
Location: ˇˇˇArgentina!!!
Posts: 13

Rep: Reputation: 0
andrewstr, I've been thinking about the same thing. Maybe making some shell script to let users mount shares easier, not typing the hole mount -t smbfs ..... command.
Thanks for the idea.
Juan
 
Old 05-16-2004, 02:09 AM   #7
lordra
LQ Newbie
 
Registered: May 2004
Location: florida
Distribution: Red Hat Enterprise 4.0
Posts: 8

Rep: Reputation: -2
Question linux/windows 2000 lan


HELP: I'm reunning a lan with a linux file server and a windows 2000 laptop. I'm trying to map a network drive from linux to the windows 2000 laptop without success.

the following line is from my /ETC/FSTAB
//WHISTLER/c /mnt/whistler/c smbfs noauto,users,guest,rw,username=administrator,password=xxxx 0 0

what am I doing wrong

Chris
lordra@bellsouth.net
 
Old 05-16-2004, 03:31 AM   #8
juanx
LQ Newbie
 
Registered: Nov 2003
Location: ˇˇˇArgentina!!!
Posts: 13

Rep: Reputation: 0
You should post the output of your mount command to have an idea of the error you are getting.
Anyway, there are two possibilities, as long as I've seen working with this:
1. Your smbmnt command doesn't have SUID, and it needs it for any user to be able to mount the share, otherwise it only allows root user to mount.
(in this case you get a "only root can mount.... smbmount needs to run with SUID" or something like that)
2. You do have SUID for smbmnt, but you don't have ownership of the /mnt/whistler/c directory, and you need that to mount.
(here you get a "Operation not permitted..." error)
Don ask why, but it just appears to be te way smbmount works.
SOLUTION: add SUID for /sbin/smbmnt (this have some security implications) and change ownership of /mnt/whistler/c/ directory to the user thet mounts the share, or better, put some mount directory on the home directory of that user. If you need multiple users to mount that, then I just don't have the solution yet.

Hope that helps. It came out a little messy.
Juan

Last edited by juanx; 05-16-2004 at 03:33 AM.
 
Old 05-16-2004, 11:10 PM   #9
lordra
LQ Newbie
 
Registered: May 2004
Location: florida
Distribution: Red Hat Enterprise 4.0
Posts: 8

Rep: Reputation: -2
Question linux/windows 2000 lan



sorry that didn't work

//WHISTLER/c$ /mnt/whistler/c smbfs noauto,users,guest,rw,username=administrator,password=xxx,uid=root,gid=administratror 00

I get the following error: could not mount device the reported error was
could not resolve mount point /mnt/whistler/c

Chris
 
Old 05-17-2004, 01:21 AM   #10
tipaul
Member
 
Registered: Apr 2003
Location: Laval, Quebec, Canada
Distribution: Ubuntu
Posts: 121

Rep: Reputation: 15
Exclamation smbmnt - general users

OK... So if i follow this thread, there's no chance to have multiple users mount and unmount an smbfs to a directory under /mnt ???

I've tried to do it:

paul@nuxtek:~$ mount /mnt/Karaoke-Reseau/
Password:
Anonymous login successful
paul@nuxtek:~$ umount /mnt/Karaoke-Reseau/
umount: seul l'usager ROOT peut démonter //karaoke/Donnees de /mnt/Karaoke-Reseau
paul@nuxtek:~$

My /mnt/Karaoke-Reseau/ is...

drwxr-xr-x 1 paul users 4096 2004-05-14 10:15 Karaoke-Reseau/

I've tried with normal attibutes (full access):
drwxrwxrwx 1 root root 4096 2004-05-14 10:15 Karaoke-Reseau/

But it's worst:
paul@nuxtek:~$ mount /mnt/Karaoke-Reseau/
Password:
Anonymous login successful
cannot mount on /mnt/Karaoke-Reseau: Operation not permitted
smbmnt failed: 1
paul@nuxtek:~$

As i saw, we can't mount an smbfs to a directory wich isn't owned by the user who want's to mount it.!!!? This is Odd...

I've searched many forums but it seems everyone's blocked at the same place...

The only way for a user to mount & unmount an smbfs is on a directory located under is "home"...

No one have a clue to bypass this? Is yes, i'll have a big job to advise many people out-there on the net! hehehe

NB: Why I want to enabled users to be able to mount/unmount an smbfs share (from an entry in fstab) is because i want to use the new feature of Gnome 2.6 (showing the user-accessible fstab's entries with icons under "My Computer")...
 
Old 05-17-2004, 11:38 PM   #11
juanx
LQ Newbie
 
Registered: Nov 2003
Location: ˇˇˇArgentina!!!
Posts: 13

Rep: Reputation: 0
Chris, that's wierd. Did you copy your fstab line literally? because window$ uses inverted slashes that's \ and not /. So your share should be \\server\share\something and not
//server/share/something, as you seem to have.
that could be something. Anyway, I suggest to use webmin or some other application to help you with your fstab file. I think that could be the problem.

About you, tipaul, the problem unmouting the share is because you should give /usr/bin/smbumount SUID as well.
If you find the way to let anybody mount smb shares please let me know

Hope that helps,

Juan
 
Old 05-21-2004, 11:00 PM   #12
lordra
LQ Newbie
 
Registered: May 2004
Location: florida
Distribution: Red Hat Enterprise 4.0
Posts: 8

Rep: Reputation: -2
Juan -
I found out that I fourgot to create the user whistler on my computer and that is why it was not working.
 
Old 05-22-2004, 10:30 AM   #13
tipaul
Member
 
Registered: Apr 2003
Location: Laval, Quebec, Canada
Distribution: Ubuntu
Posts: 121

Rep: Reputation: 15
Juan:

Nope the SUIDed smbumount didn't worked...

And for letting a user mounting a smbfs under /mnt, we must change the owner of the /mnt/xxx directory to the user that want's to mount it... That's a bit problematic...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HDIO_SET_DMA failed: Operation not permitted new.thing Slackware 21 09-15-2007 06:46 PM
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 04:49 AM
HDIO_SET_DMA failed: Operation not permitted kernel 2.6.4 Gaghiel Slackware 4 03-31-2004 07:18 PM
HDIO_SET_DMA failed: Operation not permitted acjt Linux - Hardware 4 05-02-2003 11:52 PM
HDIO_SET_DMA failed: Operation not permitted markus1982 Linux - General 2 10-28-2002 05:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration