Hello all,
I am trying to setup my system such that a user can mount a shared Samba folder. I am using the following lines in my fstab
Code:
//server/misc /mnt/fileserver/misc smbfs noauto,users,username=knode111,uid=504,gid=503 0 0
//server/server /mnt/fileserver/server smbfs noauto,users,username=knode111,uid=504,gid=503 0 0
I have setuid on smbmnt and the directories on the system are owned by the user who is mounting the shares. I can mount and unmount the shares successfully as that user no problem. The problem comes in with trying to set the uid and gid for the mount. On my RedHat 9 system they are mounted with the uid and gid of the user who is mounting them, not the values in fstab, and on my Fedora Core 2 system the share seems to mount with the uid and gid of the share itself and the numbers do not correspond correctly on the two systems., again not the values in fstab.
I have tried using the actual user and group names in fstab rather than the numbers, but it makes no difference. Actually it does not seem to matter at all what values I put in for the uid and gid, they always end up the being the user who is mounting on RH9 and the uid and gid from the share itself on FC2 same on either system.
I am trying to do this as we are setting up a couple of test system running Linux in our office to see how successful a changeover from Windows would be.
I have searched both google and the forum and not seen an issue like this.
Any insight would be greatly appreciated
Thanks
mdkelly
update:
On my RH9 box, with the fstab exactly as above, if I execute the command
mount /mnt/fileserver/misc
as root, everything mounts as it should with the proper uid and gid on the mount directory and all files and folders within it. However if I exexute the same command as a regular user, the uid and gid on the mount, and everything in it, are the uid and gid of the user who is mounting.
There is no difference on the FC2 system. The mount seems to get its uid and gid from the share itself and then maps the numbers to corresonding uid's and gids on the system mounting the share. This just does not seem to be correct.
mdkelly