LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-08-2003, 09:24 PM   #1
ja_nch
LQ Newbie
 
Registered: Sep 2003
Location: Costa Rica
Distribution: RED HAT 9
Posts: 18

Rep: Reputation: 0
Lightbulb Mount Samba Share on Linux RH9


Hi,

I am starting @ Linux, and think this really has future.

I just installed and RH9 Server with Samba 3.0.x and shared a folder as Read Write to Everyone.

It is working pretty much fine on Windows Clients accessing that server.

I am now trying to make the disk accessible to users (non root) on other linux boxes and even on the same server.

Could some experienced guy help me on this? What steps should be taken.

I can do it using root, but with other users, I get only RO permissions and cannot mount/unmount the share.

Is it possible to find some 1.2.3 steps guidance on simply mounting a samba share from a user other than root as Read+Write permissions?

Please be aware that a very detailed / practical explanation answering this thread would help many people in the net to do such task, and of course impulse Linux Adoption.

Thanks in advance...

JN
 
Old 10-08-2003, 11:00 PM   #2
ja_nch
LQ Newbie
 
Registered: Sep 2003
Location: Costa Rica
Distribution: RED HAT 9
Posts: 18

Original Poster
Rep: Reputation: 0
Hi, I just posted this thread question. And I will answer it very quickly.

Be aware that a RW-to-Everyone drive is by far the least secured one, but may work on very familiar networks.

To mount a RW - to - Everyone Samba Shared in Linux using a normal non root user:

1. the commands are as follows, but please read on to understand the prerequisites:

cd /usr/sbin
. /usr/sbin/smbmount //server/share /shareMountPoint -o guest &

This will mount the shared drive 'share' into the /shareMountPoint mount point.

Please note the final ampersand (&) which will allow terminal execution to continue regardless of the timing the command takes.

In order to be successfull with this take the following in count.

1. The user that mounts the drive must be the OWNER of the mount point directory.

2. It is necessary to set user ID flag (SUID) as root for the smbmnt file and the smbumount file. (DO NOT TOUCH THE smbmount file)
This is the same as setting 4775, 4755 or 4777 permissions. The higher the value, the more permisive.

3. DO NOT INCLUDE A fstab DEFINITION.

4. It is interesting, you set uid for smbmnt and use smbmount... This is normal...

5. It is also very intersting that the user gets full RW access to the mounted directories and files.

I hope this may help some starters to do the configuration. Also, I will try to take time to publish another thread detailing how to set up the shared drive in SAMBA server.

Finally please let me know if this thread has been useful for you through replying to it with and small comment.

Thanks

JN
 
Old 10-16-2003, 01:50 PM   #3
Xantin
LQ Newbie
 
Registered: Oct 2003
Location: France
Distribution: Yellow Dog Linux 2.3
Posts: 5

Rep: Reputation: 0
Hi,

Why did you say:
>3. DO NOT INCLUDE A fstab DEFINITION.

I just did it, with success. This way I can easily mount and unmount the connection, using the KDE KwikDisk utility...

Thanks
 
Old 10-16-2003, 03:36 PM   #4
ja_nch
LQ Newbie
 
Registered: Sep 2003
Location: Costa Rica
Distribution: RED HAT 9
Posts: 18

Original Poster
Rep: Reputation: 0
Well, I have done so to avoid a "only root can do that" message. I have to recognize I have not test it enough to say that it won't work the other way.

Now, I got two questions for you:

1. Are you able to mount / unmount the shared drive using a non-root user?
2. Could you please share the fstab entry and the procedure you followed to do so?

Thanks

JN
 
Old 10-17-2003, 12:58 PM   #5
Xantin
LQ Newbie
 
Registered: Oct 2003
Location: France
Distribution: Yellow Dog Linux 2.3
Posts: 5

Rep: Reputation: 0
Argh! I had not tested it enough too: actually with the etc/fstab entry below, the non-root user can mount the share very conveniently, but then only root can unmount it!

//server/share /mnt/mountpoint smbfs defaults,noauto,user,guest,rw 0 0

I just tried your method too, removing the fstab entry, but the result is the same: can mount, cannot unmount!

Going to browse other threads... to see if there is a missed point
 
Old 10-17-2003, 01:32 PM   #6
Xantin
LQ Newbie
 
Registered: Oct 2003
Location: France
Distribution: Yellow Dog Linux 2.3
Posts: 5

Rep: Reputation: 0
Now fixed! Wonderful after so much time on the issue. I found the answer in thread 100619, the fstab entry has to be modified to:

//server/share /mnt/mountpoint smbfs noauto,users,guest,rw 0 0

2 clicks to mount, 2 clicks to unmount, so easy now...
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 01:35 AM
mount a samba share? trey85stang DamnSmallLinux 2 05-16-2005 06:58 AM
Mount Partition As Samba Share? Terje Linux - General 1 11-28-2004 05:53 PM
samba share mount on boot anthjaz Linux - Software 4 11-04-2003 04:56 PM
XP not able to mount Linux share through SAMBA Peter2003 Linux - Software 2 06-04-2003 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:52 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
Open Source Consulting | Domain Registration