LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mount Samba Share on Linux RH9 (https://www.linuxquestions.org/questions/linux-general-1/mount-samba-share-on-linux-rh9-101878/)

ja_nch 10-08-2003 09:24 PM

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

ja_nch 10-08-2003 11:00 PM

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

Xantin 10-16-2003 01:50 PM

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

ja_nch 10-16-2003 03:36 PM

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

Xantin 10-17-2003 12:58 PM

:mad: 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 ;)

Xantin 10-17-2003 01:32 PM

:D :D :D 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... :)


All times are GMT -5. The time now is 09:44 AM.