[K12OSN] Is it possible to mount user shares with pam_mount?

john lists.john at gmail.com
Fri Oct 27 20:56:25 UTC 2006


Thanks again for the script. I put it in /etc/gdm/PostLogin/Default

It doesn't quite work the way I would like, and I hope you or somebody can
help me tweak it. Here's what I have:

ln -s /home/VANGUARD/$USER/.2006/$USER  /home/VANGUARD/$USER/Desktop/ZDrive

This maps the drive and creates a short cut on the users Desktop if they
don't have one already. However, once they have logged in and executed this
script for the first time, they can no longer log in via GDM. So I need some
sort of conditional statement that says if you don't have a shortcut, make
one, if you do have one, then log in anyway. Something like:

[ ! -e "/home/VANGUARD/$USER/Desktop/ZDrive" ] && ln -s
/home/VANGUARD/$USER/.2006/$USER  /home/VANGUARD/$USER/Desktop/ZDrive [ELSE
Go Ahead and login]

I don't know anything about scripting, any advice would be appreciated
(including a good intro to bash scripting)

Thanks!

John

On 10/26/06, john <lists.john at gmail.com> wrote:
>
> Thanks Gideon,
>
> That is very helpful. I would like to mount the drives using CIFS but the
> mount fails when I try. I haven't figured out if Ubuntu 6.06 is compiled
> without CIFS support yet, or not.
>
> I guess one other problem for me, right now, is that my shares don't
> unmount on logout, which means I get lots of persistant connections. I
> wonder if I should end up mounting my shares from fstab and give up the
> whole pam_mount approach.
>
> John
>
> On 10/26/06, Gideon Romm <ltsp at symbio-technologies.com> wrote:
> >
> > I would put it in a postlogin script, which you could execute either
> > from:  ....../gdm/PostSession/Default  or   /etc/Xsession.d/
> >
> > Just have the script create the symlink if its not there.  A one-liner
> > like:
> >
> > [ ! -e "$HOME/Windows" ] && ln -s $HOME/.Windows/$USER $HOME/Windows
> >
> > That way, it'll be done for the kiddies when they log in next.
> >
> > On, cifs, you should prolly connect with cifs anyway, as you may find
> > you have problems connecting if you don't.  (Windows keeps a'changin').
> > Unfortunately, I don't think cifs will allow you to map the child folder
> > of a share.  :(
> >
> > -Gadi
> >
> > On Wed, 2006-10-25 at 14:50 -0700, john wrote:
> > > Hi Gideon how would you create the symlink? Would you use a file that
> > > ran after login, would you do this in smb.conf or through some magic
> > > pam_mount option?
> > >
> > > Thanks!
> > >
> > > John
> > >
> > > On 10/25/06, Gideon Romm <ltsp at symbio-technologies.com> wrote:
> > >         It is not possible.  That is a limitation of SMB.  You can
> > >         mount shares,
> > >         but not subfolders of shares.
> > >
> > >         I usually work around this by mounting the entire share with
> > >         the user's
> > >         credentials, in a hidden subfolder of his/her homedir (like
> > >         ~/.Windows),
> > >         and then symlink ~/Windows -> ~/.Windows/$USER
> > >
> > >         Ugly, but functional, when you don't have admin rights to the
> > >         ADS
> > >         server.
> > >
> > >         -Gadi
> > >
> > >         On Wed, 2006-10-25 at 09:44 -0700, john wrote:
> > >         > Hi all,
> > >         >
> > >         > Does anyone know if its possible to mount a user
> > >         directory  nested
> > >         > inside of a shared directory with pam_mount?
> > >         >
> > >         > I can mount //share but not //share/user_name using
> > >         wildcards. Here's
> > >         > the releveant part from my pam_mount.conf:
> > >         >
> > >         > # works
> > >         > volume * smbfs wserver share /home/DOMAIN/&/Desktop/MyDocs
> > >         > uid=&,gid=&,dmask=750,workgroup=DOMAIN - -
> > >         >
> > >         > # doesn't work
> > >         > volume * smbfs wserver
> > >         share/group1/& /home/DOMAIN/&/Desktop/MyDocs
> > >         > uid=&,gid=&,dmask=750,workgroup=DOMAIN - -
> > >         >
> > >         > Thanks in advance!
> > >         >
> > >         > John
> > >         > _______________________________________________
> > >         > K12OSN mailing list
> > >         > K12OSN at redhat.com
> > >         > https://www.redhat.com/mailman/listinfo/k12osn
> > >         > For more info see < http://www.k12os.org>
> > >         --
> > >         --------------------------------------------------------
> > >         Gideon Romm | Proud LTSP Developer
> > >         ltsp at symbio-technologies.com
> > >
> > >         Support LTSP!  Buy your hardware at:
> > >
> > >                 www.DisklessWorkstations.com
> > >                 www.DisklessThinClients.com
> > >
> > >         (use coupon code: LTSP5P for 5% off thin clients from
> > >         DisklessThinClients.com)
> > >
> > >         _______________________________________________
> > >         K12OSN mailing list
> > >         K12OSN at redhat.com
> > >         https://www.redhat.com/mailman/listinfo/k12osn
> > >         For more info see <http://www.k12os.org>
> > >
> > > _______________________________________________
> > > K12OSN mailing list
> > > K12OSN at redhat.com
> > > https://www.redhat.com/mailman/listinfo/k12osn
> > > For more info see <http://www.k12os.org>
> > --
> > --------------------------------------------------------
> > Gideon Romm | Proud LTSP Developer
> > ltsp at symbio-technologies.com
> >
> > Support LTSP!  Buy your hardware at:
> >
> >         www.DisklessWorkstations.com
> >         www.DisklessThinClients.com
> >
> > (use coupon code: LTSP5P for 5% off thin clients from
> > DisklessThinClients.com)
> >
> > _______________________________________________
> > K12OSN mailing list
> > K12OSN at redhat.com
> > https://www.redhat.com/mailman/listinfo/k12osn
> > For more info see < http://www.k12os.org>
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/k12osn/attachments/20061027/abb7c15a/attachment.htm>


More information about the K12OSN mailing list