LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 12-11-2008, 06:42 PM   #1
soylentgreen
Member
 
Registered: Sep 2004
Location: old village
Distribution: android, BSD, CentOS, Ubuntu
Posts: 221

Rep: Reputation: 30
In redhat, if you change the fstab, do you have to sync it or something?


I have a redhat box that I am mounting a samba share.

I need to have read/write access for a user (that is in the group 'user'). The original /etc/fstab had

//IP/exchange /mount/point/ smbfs username=username,password=password 0 0

I changed it to
//IP/exchange /mount/point/ smbfs credentials=/root/.smbcred,gid=user 0 0



is my syntax 'correct' in order for the user in the group 'user' to be able to have read/write access to the share?

Thanks in advance for your advice

Last edited by soylentgreen; 12-12-2008 at 08:44 AM. Reason: I took out the question that appears to be confusing the issue.
 
Old 12-11-2008, 06:52 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by soylentgreen View Post
I have a redhat box that I am mounting a samba share.

I need to have read/write access for a user (that is in the group 'user'). The original /etc/fstab had

//IP/exchange /mount/point/ smbfs username=username,password=password 0 0

I changed it to
//IP/exchange /mount/point/ smbfs credentials=/root/.smbcred,gid=user 0 0

but it seems to be mounting the old way.

Two questions:
1) do I need to 'resync' the fstab or something to get it to read the line the 'new' way?

2) is my syntax 'correct' in order for the user in the group 'user' to be able to have read/write access to the share?

Thanks in advance for your advice
It's hard to tell with your "generic" example. Can you post your real fstab.


-C
 
Old 12-11-2008, 07:00 PM   #3
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you rebooted and/or umounted/remounted?

Apologies in advance if that's insultingly obvious.
 
Old 12-11-2008, 07:08 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
The smbfs filesystem is obsolete and not included in newer kernels. Use cifs instead. That has better support for Linux permissions including acls. If the server doesn't support cifs, then the uid, gid, file_mask and dir_mask options are fallback options. I noticed that your fstab options don't include the file_mode & dir_mode options or the uid or gid options. You can use either the numeric or text values for the user & group options (uid= & gid=).

On the server side, the person or group member accessing the share also need permission to access the directory being shared. If you are mounting the share with "gid=users", then the group owner of the directory being shared should be "users" or "others" should have write permissions.

Also, there are different password backends that you might be using. The default security mode is "security = user", with user account information contained in the smbpasswd file. If this is the case, users should be Linux users on a samba server, and should have their usernames and passwords entered using the smbpasswd file. You might use ldap or a password database backend instead.

If you made changes in the server, then you need to restart the samba service on the server. The nmbd service could be restarted on the client.

Changing the fstab entry to use a credentials file was the right thing to do. Otherwise any user on that client would be able to read the password.

Last edited by jschiwal; 12-11-2008 at 07:13 PM.
 
Old 12-11-2008, 09:11 PM   #5
soylentgreen
Member
 
Registered: Sep 2004
Location: old village
Distribution: android, BSD, CentOS, Ubuntu
Posts: 221

Original Poster
Rep: Reputation: 30
I changed it to:

//10.0.10.89/exchange /usr/graphicStore1/ cifs credentials=/root/.smbcred,uid=graphics,file_mode=0777,dir_mode=0777 0 0

the share mounted, but no read/write for the user 'graphics'

then I tried:

//10.0.10.89/exchange /usr/graphicStore1/ cifs credentials=/root/.smbcred,gid=100,file_mode=0777,dir_mode=0777 0 0

and that didn't work either.

The windows boxes can read/write to the share fine. I can also read/write as root no problem, but I cannot read/write as the user 'graphics' (who is in the group 'users' which is gid 100).

yes, i have umounted / mounted the share after each time.

the 'mount' command shows:

//10.0.10.89/exchange on /usr/graphicStore1 type cifs (rw,mand)

edit: for the record, the share is hosted on a FreeBSD box with SAMBA 3.0.32, and has been of no issue with any other machines than this one.

Thank you again for your responses, any ideas?

Last edited by soylentgreen; 12-11-2008 at 09:30 PM.
 
Old 12-11-2008, 10:26 PM   #6
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,579

Rep: Reputation: 187Reputation: 187
Quote:
Originally Posted by soylentgreen View Post

1) do I need to 'resync' the fstab or something to get it to read the line the 'new' way?
Yes. /etc/fstab is read and executed at boot. If you make changes to /etc/fstab they will not take effect automatically until the next boot.

If you want your changes to /etc/fstab to take effect immediately then you should issue a mount -a command. Read about the mount command in the mount man pages before you try a mount -a.

-------------------
Steve Stites
 
Old 12-11-2008, 10:38 PM   #7
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , Solaris 10, RHEL
Posts: 1,935
Blog Entries: 1

Rep: Reputation: 188Reputation: 188
Quote:
Originally Posted by jailbait View Post
Yes. /etc/fstab is read and executed at boot. If you make changes to /etc/fstab they will not take effect automatically until the next boot.

If you want your changes to /etc/fstab to take effect immediately then you should issue a mount -a command. Read about the mount command in the mount man pages before you try a mount -a.

-------------------
Steve Stites
Also a mount -o remount /mount/point would work too.

-C
 
Old 12-12-2008, 08:39 AM   #8
soylentgreen
Member
 
Registered: Sep 2004
Location: old village
Distribution: android, BSD, CentOS, Ubuntu
Posts: 221

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jailbait View Post
Yes. /etc/fstab is read and executed at boot. If you make changes to /etc/fstab they will not take effect automatically until the next boot.

If you want your changes to /etc/fstab to take effect immediately then you should issue a mount -a command. Read about the mount command in the mount man pages before you try a mount -a.

-------------------
Steve Stites
I appreciate your response; we are kind of past that part now. I was asking specifically about Red Hat, not fstab in general.

Perhaps you didn't see the part where I stated that I have re-mounted the share -several- times, with no read / write for the user.

Now the question is the syntax, and why the user is unable to read/write.

Last edited by soylentgreen; 12-12-2008 at 10:27 AM.
 
Old 12-12-2008, 10:15 AM   #9
soylentgreen
Member
 
Registered: Sep 2004
Location: old village
Distribution: android, BSD, CentOS, Ubuntu
Posts: 221

Original Poster
Rep: Reputation: 30
I have also tried taking out the gid / uid and using simply:

//10.0.10.89/exchange /usr/graphicStore1 cifs credentials=/root/.smbcred,file_mode=0777,dir_mode=0777 0 0

but no non-root user can read/write.

Does anyone know where I'm going wrong?
 
Old 12-12-2008, 05:54 PM   #10
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
Have you verified that the user has write permissions to the mount pt? This is separate from the samba/cifs permissions.
 
Old 12-12-2008, 08:15 PM   #11
soylentgreen
Member
 
Registered: Sep 2004
Location: old village
Distribution: android, BSD, CentOS, Ubuntu
Posts: 221

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lazlow View Post
Have you verified that the user has write permissions to the mount pt? This is separate from the samba/cifs permissions.
Thank you kind sir, may I buy you a donut?

That was it. I was so wrapped up in the share permission, I hadn't checked the mount point.
 
  


Reply

Tags
fstab, smbfs


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
fstab-sync fedora core 5 nigelc Linux - Newbie 3 10-02-2006 04:03 PM
How do i use fstab-sync ginda Fedora 2 02-03-2005 10:34 AM
fstab-sync Fedora Core 3 doralsoral Linux - Software 3 02-02-2005 08:03 PM
How to use fstab-sync? ginda Fedora 0 01-25-2005 01:42 PM
Using fstab-sync ?? mickeyboa Fedora 0 12-05-2004 09:17 AM


All times are GMT -5. The time now is 05:14 PM.

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