LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 02-05-2004, 03:38 PM   #1
hopmedic
Member
 
Registered: Sep 2003
Location: in a small town west of Chicago
Distribution: Fedora
Posts: 30

Rep: Reputation: 15
Windows shares - auto mount problem


I've been working on this problem for a while, and have tried numerous different solutions that I've found here, as well as other places on the net, and have yet to get my problem solved. I know this subject is worn out, but I've tried without success. Here's my setup:

Windows XP Pro system with files to share
Redhat 9 trying to auto mount the windows shares

First I tried putting this in /etc/rc.local
Code:
smbmount //windows/share /mnt/point -o rw,username=xxx,password=xxx
I could get the share mounted, but only root had write permissions. chmod 777 did not work - I could not change the permissions of the shares, even as root. If I launched the application that I wanted to use as root, I could open/read/write as expected. If I launched as a user, only rx permissions granted.

Then I tried putting this in /etc/fstab:
Code:
//windows/share /mnt/work smbfs username=xxx,password=xxx 0 0
I'm sure the answer is right in front of my face, but try as I might, it's not working. I appreciate any help you can give me.

Thanks,

Rich
 
Old 02-05-2004, 03:47 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Try adding a umask option:
umask=0000
 
Old 02-05-2004, 09:46 PM   #3
hopmedic
Member
 
Registered: Sep 2003
Location: in a small town west of Chicago
Distribution: Fedora
Posts: 30

Original Poster
Rep: Reputation: 15
David,

I've tried several variations of what you suggest - using both 0000 and 0777 as the umask value, to no avail. Any other suggestions? I should note that the permissions of my mounted share show up as follows:
Quote:
drwxr-xr-x 1 root root 4096 Jan 1 1980 mountpoint
With the following, I get automatic mount, but no write permissions except for root
fstab:
Code:
//windows/share /mnt/point smbfs umask=0777,username=xxx,password=xxx 0 0
rc.local
Code:
smbmount //windows/share /mnt/point -o username=xxx,password=xxx
With the following, it's the same... and when I try to chmod as superuser, I get
Quote:
chmod: changing permissions of `shamim_c' (requested: 0777, actual: 0755): Operation not permitted
fstab:
Code:
//windows/share /mnt/point smbfs umask=0777,rw,username=xxx,password=xxx 0 0
rc.local
Code:
smbmount //windows/share /mnt/point -o username=xxx,password=xxx
With the following, it's the same - the share is mounted, but no write permissions except for root. chmod as root results in:
Quote:
chmod: changing permissions of `shamim_c' (requested: 0777, actual: 0755): Operation not permitted
fstab:
Code:
//windows/share /mnt/point smbfs username=xxx,password=xxx 0 0
rc.local
Code:
smbmount //windows/share /mnt/point -o umask=0777,username=xxx,password=xxx

Ditto with the following:
fstab:
Code:
//windows/share /mnt/point smbfs username=xxx,password=xxx 0 0
rc.local:
Code:
smbmount //windows/share /mnt/point -o umask=0000,username=xxx,password=xxx
I don't know what to do to get this to work, and would really appreciate your help.

Thanks,

Rich

Last edited by hopmedic; 02-05-2004 at 09:47 PM.
 
Old 02-06-2004, 01:55 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Try:
umount /mnt/point
smbmount //windows/share /mnt/point -o umask=000,username=xxx,password=xxx
 
Old 02-07-2004, 10:14 PM   #5
hopmedic
Member
 
Registered: Sep 2003
Location: in a small town west of Chicago
Distribution: Fedora
Posts: 30

Original Poster
Rep: Reputation: 15
David,

Thanks! I ended up tying your suggestions with ones that I gleaned from http://www.linuxquestions.org/questi...threadid=47914 and ended up with the problem solved. Here's the code I ended up using:
Code:
fstab:
//win/share /mnt/point smbfs username=xxx,password=***,gid=groupname,umask=000,fmask=0777,dmask=0777,rw,user 0 0
rc.local:
smbmount //win/share /mnt/point -o umask=0000,fmask=0777,dmask=0777,username=xxx,password=***
With this configuration, I get what I needed - automatic mounting and rwx permissions. Thanks again!

Rich

Last edited by hopmedic; 02-07-2004 at 10:16 PM.
 
  


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
auto mount shares before login Archer12 Linux - Networking 2 01-13-2004 07:05 PM
Linux can mount samba shares but not windows shares bindsocket Linux - Software 1 12-01-2003 05:28 PM
Auto Mount On Boot Win32 Shares zipur Linux - Networking 1 10-08-2002 02:38 AM
mount windows shares? Dave Campbell Linux - Networking 7 09-01-2002 04:54 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 07:04 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