LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 08-10-2006, 01:58 PM   #1
mrknight
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Rep: Reputation: 0
Question Samba shares mount ro only


I have some smb shares I want mounted on startup on my SuSE 10.1 workstation. The only problem is that when they are mounted they are only read-only - I cannot otherwise interact with the data. If I do an smb://server/share and provide the same creds I use for the mount I have full access (as I should). When I created the local mount points in /mnt/samba I created a group, set this group as the owner of /mnt/samba and added myself to the group. I then made sure to set 770 on /mnt/samba.

My /etc/fstab has lines like the one here:
//server/share /mnt/samba/share smbfs rw,credentials=/home/user/smb-credentials.txt 0 0

All of the shares mount but again in read only. What did I miss? Thanks in advance for any help.
 
Old 08-10-2006, 02:55 PM   #2
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK - South Coast.
Distribution: Ubuntu (usually the latest....)
Posts: 2,672
Blog Entries: 9

Rep: Reputation: 45
I'm no expert - it took me forever to sort out samba last time I was running it, but things like that always seemed more connected to the smb.conf i.e. it didn't matter what I had set for various files etc, if I had the perms set wrongly in the smb.conf it didn't want to play nice.
 
Old 08-10-2006, 04:44 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,388
Blog Entries: 2

Rep: Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900
AFAIK, there is no connection between the Samba client (used to mount remote shares), and the smb.conf file. Also, AFAIK, the smbmount tool gets all of it's configuration parameters from the command line.

Can you please post the relevant line from your /etc/fstab file?

It should look something like:

Code:
//Server/sharename /mnt/samba/dir smbfs rw,uid=smbuser,gid=smbuser,fmask=770,dmask=770,credentials=/etc/samba/smbCreds.smbuser0 0
--- rod.
 
Old 08-10-2006, 05:11 PM   #4
mrknight
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Original Poster
Rep: Reputation: 0
This is an example of a line from my fstab file. Note that if I go to this share using smb://server/share and supply the same credentials as are listed in smb-credentials.txt I have read/write to the data.

//server/share /mnt/samba/share smbfs rw,credentials=/home/user/smb-credentials.txt 0 0
 
Old 08-10-2006, 11:48 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,388
Blog Entries: 2

Rep: Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900
I think you need to supply a uid &/or gid parameter in your fstab entry. The mounting is done by root at boot time, and that makes the user & group root, in the absense of any other information. When you connect to the share as you, you are granted user and group ownership, which includes rw access.

Credentials have nothing to do with any of this; they are simply the username & password used to satisfy the windows/samba server of your authenticity to access the share.

--- rod.
 
Old 08-22-2006, 07:23 PM   #6
mrknight
LQ Newbie
 
Registered: Mar 2006
Posts: 10

Original Poster
Rep: Reputation: 0
theNbomber - thanks for including your fstab line - based on that I was able to get mine working and now understand what is happening during an smb mount.

One more question, if I reboot my server and attempt to connect to these mounts again after it comes back up, they error out. Is there a way to force a reconnect without rebooting my workstation?
 
Old 08-23-2006, 09:27 AM   #7
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,388
Blog Entries: 2

Rep: Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900Reputation: 900
I think if you just run mount -a, it should try to remount everything. You might have to deliberately umount those shares first.

--- rod.
 
  


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
Samba 3.0.6 - How to mount Samba Shares from Windows 2003? kp1 Linux - Software 2 09-10-2004 06:03 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM
samba won't mount windows shares ixion Linux - Software 6 02-28-2003 12:51 AM
mount samba shares (?) bkeating Linux - General 7 07-01-2002 11:23 PM
Using samba to mount windows shares King V Linux - Software 2 10-13-2001 01:30 PM


All times are GMT -5. The time now is 02:01 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