[K12OSN] OT: Help with Template User Script

James P. Kinney III jkinney at localnetsolutions.com
Mon Nov 26 23:25:48 UTC 2007


On Mon, 2007-11-26 at 13:13 -1000, R. Scott Belford wrote:
> Peter Hartmann wrote:
> > Eric sent this beauty out a while back when I was stuck.
> > 
> > -Peter
> > 
> > version 0.4:
> > 
> >   getent passwd | awk -F: '$3>500 {print $3, $4, $6}' | while read u g h
> >   do
> >      chown -R $u:$g "$h"
> >   done
> 
> Man.  That seems too simple to be true, but it looks right.  Elegant. 
> I'll sandbox it.

I've been banging computers for nearly 20 years and *NIX never ceases to
amaze me. The getent is a new favorite tool now! I would look at merging
the getent process with your script for a "total world domination"
viewpoint :) I'm looking at munging in the group membership data (does
*buntu not use private groups like RedHat variants?) with a bit of
variable storage and a second call to getent groups for some detailed
printer access controls.
> 
> 
> James P. Kinney III wrote:
> 
> > Are the goofs "all perms not reset" or "some perms reset" or "unknown"?
> 
> It's just some, James.  It is bizarre.  So far, from the last reset, 
> only one user out of over 400.  Perhaps since I am running this script 
> on the ldap server hosting the home directories, I need to use "getent 
> passwd" as it is different than the result of $USER from ls?
> 
> > 
> > Also, is a space allowed in a group name? The chown line has a
> > backslashed space in "Domain Users". I thinks that's a no-no but I can't
> > pull a reference for it.
> 
> I believe this is okay.  The group is Domain Users, and the syntax for 
> handling the space is trail the first word with a \.
> 
> > 
> > There is a script in K12LTSP (in /opt/k12ltsp/templates) that is used to
> > reset user . files back to a sane pattern based on what's in /etc/skel.
> > That process explicitly names .gnome, .kde, etc directories.
> 
> Yes, but this is an Edubuntu install.  Time for a virtual K12LTSP 
> install so that I can start referencing all the amazing tweaks and 
> scripts in the K12LTSP.
> 
> I've said it before, and I'll say it again, all the tweaks and 
> modifications that make the K12LTSP so magically delicious are both 
> amazing and scary.  Finding what isn't ready out-of-the-box with 
> Edubuntu has been enlightening, to put it mildly.

I understand. I have an experiment running tomorrow using Edubuntu on
some new thin clients (sound and graphics chips are not supported at all
in K12LTSP and these are time sensitive so I can't rebuild the entire
tree for these tests). All of my current scripts, tweaks and add-ons are
for K12LTSP. It will be interesting.
> 
> --scott
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
> 
-- 
James P. Kinney III          
CEO & Director of Engineering 
Local Net Solutions,LLC        
770-493-8244                    
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/k12osn/attachments/20071126/a038ee82/attachment.sig>


More information about the K12OSN mailing list