LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 09-20-2008, 11:01 AM   #1
icarus127
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.2
Posts: 22

Rep: Reputation: 15
Mounting Samba share with fstab


Hi all,
I'm trying to set up a Buffalo Pro Duo NAS drive to be user mountable via an fstab entry. I can mount and use it perfectly with:

Code:
mount -t cifs -o guest //192.168.0.194/krayNetDrive /X:
However no matter what I put in the fstab entry I get this
Code:
icarus@daedalus:~$ mount /X:/
mount error 1 = Operation not permitted
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
My fstab entry currently looks like this:

Code:
//192.168.0.194/krayNetDrive /X:  cifs guest,noauto,user,umask=000    0   0
If I take away the guest option I get a password prompt which gives me the abover error if I leave it blank, put in the admin password for the NAS or the password for the one user I have setup.

If I put in the username = icarus I get a password prompt that gives the same behavior.

I've tried removing the umask option thinking that maybe I can't set a umask for a samba share, but that doesn't change my results. Can anyone tell me where I'm going wrong?

As an aside, is there any way to suppress the error messages about not being able to maintain file permissions when I copy stuff onto the NAS?
It's not that annoying when using command line tools, but when I'm melding a file tree onto the NAS and Meld gives me a prompt for every single file it's incredibly frustrating. I can't find an option in meld for this, will any of the share options do this?

Thanks in advance.

Last edited by icarus127; 09-20-2008 at 11:03 AM.
 
Old 09-20-2008, 12:02 PM   #2
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 31
try doing it as root
 
Old 09-26-2008, 09:51 AM   #3
icarus127
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.2
Posts: 22

Original Poster
Rep: Reputation: 15
When I try it as root it works perfectly. Does that tell you anything?

The users option in the fstab allows me to try to mount it as a user, but apparently cifs is not getting the right options. I can't find anything in the specified man page that sheds any light on the subject. I've tried a bunch of the options, sec=none, guest, user=guest, etc. with no effect.

Anyone have any more suggestions?
 
Old 09-26-2008, 10:05 AM   #4
Chromezero
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Slackware, RHEL, others
Posts: 470

Rep: Reputation: 40
Give this a shot
Code:
//192.168.0.194/krayNetDrive /X:  cifs noauto,username=icarus    0   0
This will prompt you for a password for icarus. However, the password is not the password on the local machine. It will be the password on the remote machine, the samba account for icarus. You might also try changing icarus to guest, if that worked when manually mounting it. You can also add the password to the fstab entry to avoid manually typing this each time, although this may not be the most secure approach.

Last edited by Chromezero; 09-26-2008 at 10:08 AM.
 
Old 09-26-2008, 11:26 AM   #5
icarus127
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.2
Posts: 22

Original Poster
Rep: Reputation: 15
That won't allow me to mount it except as root. If I add the users option I get the same error with either icarus or guest as the username, operation not permitted.
 
Old 09-30-2008, 09:46 AM   #6
Chromezero
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Slackware, RHEL, others
Posts: 470

Rep: Reputation: 40
Sorry for the delayed response, been busy the past few days. Anyway,this sounds like a permissions issue to me. You may want to do an ls -l on /sbin/mount.cifs and find out what group/permissions are set on the mount command. Chances are, this is set to root/root. You could setup a samba group and add yourself, and anyone else you need, to the samba group. Then change /sbin/mount.cifs to root/samba with permissions of 750 or something similar. Then anyone that's part of the samba group should be able to execute that command.
 
Old 10-01-2008, 09:51 PM   #7
icarus127
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.2
Posts: 22

Original Poster
Rep: Reputation: 15
I checked the file permissions all the way down the tree. mount.cifs, and the link to it which is used in the path, have permissions 755 or higher. All the directories in the paths leading to the link and the actual binary are set with permissions 755.
As far as I can tell all the permissions should allow normal users to use mount.cifs. Also, I'm not sure if this matters or not, but I set the permissions of the mount point itself to allow all users rwx access.

Thanks for the suggestion, does anything else come to mind?

Last edited by icarus127; 10-01-2008 at 09:54 PM.
 
Old 10-02-2008, 01:58 PM   #8
Chromezero
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Slackware, RHEL, others
Posts: 470

Rep: Reputation: 40
Honestly, I'm out of ideas here. At this point all I can suggest is to double check everything: smb.conf on the remote machine, samba user accounts on the remote machine, fstab on the local machine, mount point on the local machine. If root is able to mount this successfully and users can not, it just seems like a permissions issue to me...
 
Old 10-03-2008, 12:07 AM   #9
icarus127
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.2
Posts: 22

Original Poster
Rep: Reputation: 15
I don't think it's a permissions issue at the OS level because the error doesn't seem to be coming from the OS. It seems that I have permission to executre mount.cifs, but when I do the application itself is saying I'm not permitted to do something. I guess I need to do more digging into what mount.cifs actually needs.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount samba share at boot with fstab keyboard1973 Linux - Server 2 09-04-2008 02:27 PM
Samba share problems with an NSLU2: smbmount works, fstab doesn't chsims1 Linux - Server 1 05-20-2007 10:11 AM
Problem mounting samba share with fstab MBrinkley Linux - Software 3 01-21-2007 09:00 PM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM
mounting an smbfs share using mount vs /etc/fstab sichen Linux - Networking 4 08-13-2004 06:40 PM


All times are GMT -5. The time now is 06:43 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration