[K12OSN] RE: automatically place shortcuts to windows share mounts

Tom Wolfe twolfe at sawback.com
Fri May 11 05:40:57 UTC 2007


Hi Levi, I plan to put it on the Wiki but I've been holding off because of
a few glitches, for example I'd like pam_mount to only create a mount for
shares that a user has any business using. RIght now pam_mount creates
shares for the teacher and the student for every domain user logging on.
So the log on process is delayed slightly. But logons are still only <10
seconds, which is about 10-20 seconds faster than my XP machines (with
Roaming Profiles and Deep Freeze...) usually!

Also, my script seems a little primitive. Maybe others have a better
solution?

Tom


On Thu, 10 May 2007, Kemp, Levi wrote:

> Tom it helps a ton. Now I understand why SMBFS gets me an empty folder
> where CIFS filled the User Home. I'm going to straigten this out in the
> morning and try you script. I'll let you know how it goes. By the way if
> it works I'd suggest this be put in the WIKI. I too have different
> locations for teachers, students, admins, and I think fred(default
> network admin) has a different locaction too. I'm more concerned with
> the first two, but eventually(I hope) I'll need it all. Thanks.
>
> Levi
>
> ________________________________
>
> From: Tom Wolfe [mailto:twolfe at sawback.com]
> Sent: Thu 5/10/2007 5:50 PM
> To: Support list for open source software in schools.
> Cc: Kemp, Levi
> Subject: automatically place shortcuts to windows share mounts
>
>
>
> I should have probably renamed the subject so that people could figure out
> what I was writing about (response to a query from Levi)
>
> On Thu, 10 May 2007, Kemp, Levi wrote:
>
> > Tom, You mentioned you had desktop links to there mounted windows
> > shares. Do you mind sharing the config files for that setup. I've been
> > running around in circles trying to figure out how to do what should be
> > a very simple task. Thanks
> >
> > Levi Kemp
> > Bolivar R-1 Schools
>
> Hi Levi, should be simple but isn't really. Complicated by the fact that I
> have different mount points for teacher vs. student dirs.
>
> I'll include the script I use, but you need to have the mounts already in
> place with pam_mount. I tried with a static mount but this doesn't work
> because of permissions issues. The script is a little rough-and-ready hack
> but so far so good. Any comments on how to improve it would be appreciated
> as it's my very own and I know nothing much about bash scripting.
>
> In the following, note the following:
> srv01 - teacher server
> srv02 - student server
> StudentHome$ - name of student share
> redirs$ - name of teacher share (don't ask why I called it that)
> MORLEYSCHOOL - the name of the subdirectoyr of /home where your K12LTSP
> user dirs are located
>
> ***Here's the permissions, path, contents of Default script***
>
> -bash-3.1$ ls -l Default
> -rwxr-xr-x 1 root root 731 Apr 20 09:25 Default
> -bash-3.1$ pwd
> /etc/gdm/PostLogin
> -bash-3.1$ cat Default
>
> #!/bin/sh
>
> DESKTOP=$HOME/Desktop
>
> if [ ! -d $DESKTOP ]; then
>         mkdir $DESKTOP
> fi
>
> TEACHER=`wbinfo -r $USER | grep 16777220`
> STUDENT=`wbinfo -r $USER | grep 16777221`
>
> if [ "$TEACHER" = "16777220" ]; then
>         if [ ! -d $DESKTOP/$USER\'s\ Documents ]; then
>                 ln -s $HOME/.TeacherShare/$USER/My\ Documents
> $DESKTOP/$USER\'s\ Documents
>         fi
>         if [ ! -d $HOME/$USER\'s\ Documents ]; then
>                 ln -s $HOME/.TeacherShare/$USER/My\ Documents
> $HOME/$USER\'s\ Documents
>         fi
> fi
>
> if [ "$STUDENT" = "16777221" ]; then
>         if [ ! -d $DESKTOP/$USER\'s\ Documents ]; then
>                 ln -s $HOME/.StudentShare/$USER $DESKTOP/$USER\'s\
> Documents
>         fi
>         if [ ! -d $HOME/$USER\'s\ Documents ]; then
>                 ln -s $HOME/.StudentShare/$USER $HOME/$USER\'s\ Documents
>         fi
> fi
>
>
> *** How do I get the gid? ***
>
> ===First get the SID===
> -bash-3.1$ wbinfo -n Teachers
> S-1-5-21-2740314747-2312880343-20781259-2795 Domain Group (2)
>
> ===Then copy and past the SID into wbinfo -Y===
> -bash-3.1$ wbinfo -Y S-1-5-21-2740314747-2312880343-20781259-2795
> 16777220
>
> *** Here is my pam_mount.conf ***
>
> -bash-3.1$ cat /etc/security/pam_mount.conf
>
> debug 1
> mkmountpoint 1
> fsckloop /dev/loop7
>
> lsof /usr/sbin/lsof %(MNTPT)
> fsck /sbin/fsck -p %(FSCKTARGET)
> losetup /sbin/losetup -p0 "%(before=\"-e\" CIPHER)" "%(before=\"-k\" KEYBITS)" %(FSCKLOOP) %(VOLUME)
> unlosetup /sbin/losetup -d %(FSCKLOOP)
> cifsmount /bin/mount -t cifs //%(SERVER)/%(VOLUME) %(MNTPT) -o "user=%(USER),uid=%(USERUID),gid=%(USERGID)%(before=\",\" OPTIONS)"
>
> umount /bin/umount %(MNTPT)
>
> lclmount /bin/mount -p0 -t %(FSTYPE) %(VOLUME) %(MNTPT) "%(before=\"-o\" OPTIONS)"
> cryptmount /bin/mount -t crypt "%(before=\"-o\" OPTIONS)" %(VOLUME) %(MNTPT)
> nfsmount /bin/mount %(SERVER):%(VOLUME) %(MNTPT) "%(before=\"-o\" OPTIONS)"
> mntagain /bin/mount --bind %(PREVMNTPT) %(MNTPT)
> mntcheck /bin/mount # For BSDs (don't have /etc/mtab)
> pmvarrun /usr/sbin/pmvarrun -u %(USER) -o %(OPERATION)
>
> volume * cifs srv01 redirs$ /home/MORLEYSCHOOL/&/.TeacherShare uid=& - -
> volume * cifs srv02 StudentHome$ /home/MORLEYSCHOOL/&/.StudentShare uid=& - -
>
> *** Note the bottom two lines are the most important. Note Fedora uses
> cifs now, NOT smbfs (does the same thing). ***
>
> Hope that helps,
> Tom Wolfe
>
> > >
> > >
> > > -----Original Message-----
> > > From: k12osn-bounces at redhat.com on behalf of Tom Wolfe
> > > Sent: Tue 5/1/2007 6:06 PM
> > > To: k12osn at redhat.com
> > > Subject: Re: [K12OSN] Update on Morley's K12LTSP situation
> > >
> > > Hi Nick, well I have to say it's not easy at all.
> > >
> > > I wrote my own wiki entry. The page you named was none too helpful, but at
> > > least it gave me the idea of trying pulseaudio. I hope that my own entry
> > > is at least a little better, but I haven't had any feedback on it and I
> > > can't yet say whether it has any errors. It uses yum instead of the rpm
> > > stuff. You might have to enable additional repositories, I've forgotten.
> > >
> > > See
> > > http://www.k12ltsp.org/mediawiki/index.php/Getting_flash_to_work_with_sound_in_64_bit_platform
> > >
> > > This works for K12LTSP 6.0 64-bit, but I would think you could adapt the
> > > bottom half for 32-bit and ignore the top half.
> > >
> > > Please let me know if it works for you. It's pretty straightforward once
> > > you figure it out (or so I seem to recall). But I went through misery
> > > trying many, many things that didn't work. Why it isn't a simple,
> > > functional default is beyond me.... the web as a multimedia tool depends
> > > on Flash with Sound. Or am I completely confused??
> > >
> > > The pleasure I felt when I first successfully fired up a noisy Google
> > > video cannot be described.
> > >
> > > Regards,
> > > Tom Wolfe
> > >
> > >
> > > On Tue, 1 May 2007, Nick Fenger wrote:
> > >
> > > > Tom,
> > > >
> > > > How did you get flash sound going? Did you use the wiki?
> > > >
> > > > http://www.k12ltsp.org/mediawiki/index.php/How_to_setup_Flash_Player_9_with_esd-pulse_audio_sound_support
> > > >
> > > > Thanks,
> > > >
> > > > Nick Fenger
> > > > Trillium Charter School
> > > > Portland, OR
> > > >
> > > >
> > > > ----- Original Message ----
> > > > From: Tom Wolfe <twolfe at sawback.com>
> > > > To: k12osn at redhat.com
> > > > Sent: Thursday, April 26, 2007 2:29:41 PM
> > > > Subject: [K12OSN] Update on Morley's K12LTSP situation
> > > >
> > > >
> > > > Hi folks, I've been quiet for a few months on this list but thought I'd
> > > > share what's going on here in Morley, Alberta, Canada.
> > > >
> > > > We now have a single K12LTSP server (dual processor Xeon 64-bit with 8 GB
> > > > RAM, K12LTSP 6.0) beaming out on a 1 gig switch to a total of 4 different
> > > > labs: a 10-station lab, an 18-station lab, a 7-station lab, and a
> > > > 2-station lab. They all have remote desktop (alt-F4) to a terminal server
> > > > "just in case". And miraculously they now all have Flash (nspluginwrapper)
> > > > and sound (and even better, flash WITH sound! - pulseaudio). User logons
> > > > seamlessly connect with Active Directory, including a desktop link to
> > > > their mounted windows document folders.
> > > >
> > > > It's awesome, and it smokes: very fast and clean user experience. Our
> > > > clients are a hodge-podge, the very best ones being a bunch of PIII IBM
> > > > Netvistas. Excellent machines, and so easy to configure for PXE it's
> > > > ridiculous. I also have a bunch of old IBM P1 machines that do fine,
> > > > except they are a little slow and the video craps out on them now and
> > > > then.
> > > >
> > > > SO that's where I'm at. We have another 20 Netvistas and about 10 Dell
> > > > GX110 PIIIs (also very capable machines) waiting to find a home.
> > > >
> > > > Thanks again for all the help you folks provided back in December and
> > > > January when I was getting things up and running.
> > > >
> > > > If there is anyone else nearby with or thinking of starting a K12LTSP lab,
> > > > drop me a line.
> > > >
> > > > Regards,
> > > > Tom Wolfe
> > > > Morley, AB (40 mins west of Calgary, 10 mins east of the Rockies)
> > > >
> > > > _______________________________________________
> > > > K12OSN mailing list
> > > > K12OSN at redhat.com
> > > > https://www.redhat.com/mailman/listinfo/k12osn
> > > > For more info see <http://www.k12os.org <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 <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 <http://www.k12os.org/> >
> >
>
>
>




More information about the K12OSN mailing list