LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 11-12-2004, 10:25 AM   #1
mdkelly
LQ Newbie
 
Registered: Jan 2003
Posts: 15

Rep: Reputation: 0
smbmnt not setting right uid


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

Last edited by mdkelly; 11-12-2004 at 11:13 AM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
smbmnt must be installed suid root figadiablo Linux - Networking 29 08-09-2007 11:12 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
question about smbmnt/smbmount Lleb_KCir Linux - General 7 11-23-2004 01:16 AM
smbmnt DoubleOTeC Linux - Networking 2 08-13-2004 11:01 AM
smbmnt - setuid root harperonline Linux - General 1 11-16-2003 05:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:46 AM.

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