epike on Fri, 28 Feb 2003 14:02:12 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Samba - user mounting a drive


I'm not sure if this is what your looking for:

you'd probably be better off with automount.
the way it works is, if you set up the mount
point in certain directories, all you go to do
is access that directory and the mount just
automagically appears.

if memory serves (i did this for somebody a while
ago but cant reach his machine now):

-----------------
# /etc/auto.master 
# you make up auto.fileserv yourself

/misc/fileserv /etc/auto.fileserv
-----------------
# /etc/auto.fileserv
# the second arg contains smbmount syntax, should be called
# by mount.   You probably have to specify other params
# such as workgroup names, etc...

share1        -fstype=smbfs,uid=1024,gid=1024 ://fileserv/share
share2        -fstype=smbfs,uid=1025,gid=1024 ://fileserv/share2
-----------------

This is surely NOT exactly correct (I forgot
the complete syntax) but the main points are: 

/misc/fileserv/share1  will connect to //fileserv/share,
with files appearing as owned by uid=1024 and gid=1024

/misc/fileserv/share2  will connect to //fileserv/share2
with files appearing as owned by uid=1025 and gid=1024

the nice thing about this is, you just
access /misc/fileserv/share1 (i.e., ls -l) and
the mount should appear. 

hope this helps!

e pike



> 
> I'm mostly samba illiterate but I have an e-smith server that's 
> got some shares and I connect to them with windows PC's.  No problem.
> 
> My difficulty arises when I want to mount the drive on a Linux box.
> I put an entry like this in /etc/fstab:
>  //fileserv/share    /home/eric/share  smbfs  noauto,exec,workgroup=\
>    ourgroup,fmask=777,dmask=777,users,username=eric,password=password 0 0
> 
> I have to make smbmnt setuid root so I: chmod u+s /usr/bin/smbmnt
> 
> Then I can just do this as me (eric):
> 
> # mount ~/share
> 
> and poof!  This works... For ONE user.  
> 
> Unfortunately, user eric logs out of Gnome/KDE/Whatever and leaves.
> Another user walks up and uses the computer.  That person is not "eric"
> so the fstab entry does not work for them.
> 
> What can I do to make this "generic" so that whoever logs in to the
> computer gets their shares mounted?  I found that I can get a 
> "start up" job run in Gnome so I could script this for each user but
> that could be painful :-)  Also, there is no "shutdown" or "logout"
> script that I could find so the drive would remain mounted :-(
> 
> I have never used automount but I did work at GE where I could log into
> any of their sun boxs in the the division, from Florida to New York, and
> get my own home directory (albeit slowly in some cases).
> Is automount a solution for this type of situation?
> 
> Anybody have suggestions?
> 
> TIA
> 
> Eric
> 
> -- 
> ------------------------------------------------------------------------
> #   Eric Lucas 
> ========================================================================
> I do not recognize anyone's right to one minute of my life, nor to any
> part of my energy, nor to any achievement of mine, no matter who makes
> the claim, how large their number or how great their need. 
>   --Ayn Rand, The Fountainhead
> _________________________________________________________________________
> Philadelphia Linux Users Group        --       http://www.phillylinux.org
> Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug
> 

_________________________________________________________________________
Philadelphia Linux Users Group        --       http://www.phillylinux.org
Announcements - http://lists.netisland.net/mailman/listinfo/plug-announce
General Discussion  --   http://lists.netisland.net/mailman/listinfo/plug