Paul on Fri, 28 Feb 2003 13:49:08 -0500


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

Re: [PLUG] Samba - user mounting a drive


I don't know what the difference is, but both "echo $USER" and "echo $LOGNAME" reveal the users' login name. Maybe that can be used to insert the users' login name into a command?

Would something like "/home/$USER/share" work?


eric@lucii.org wrote:

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




_________________________________________________________________________ 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