Cindy-

Great work. 

You may want to consider having the rc.d script be simply:

ssh -Y -l $thisUser -S ${LDM_SOCKET} ${LDM_SERVER}
"/usr/local/bin/refresh-login"


And have refresh-login be:

#!/bin/sh

case $USER in 
    root|user1|user2|user3)  #the users you want to exclude
    # of course, this never actually gets seen by the user:
    echo "Really not a good idea!"
    ;;
    *)
    rsync -az --delete /var/userbackups/$USER/ /home/$USER
    ;;
esac



This way, you don't need to reroll the image to exclude more users or
expand the script...

-Gadi


On Fri, 2008-07-18 at 16:03 -0400, Cindy Murdock wrote:
> Hi,
> 
> Here's an rc script for refreshing user accounts (excluding users of 
> your choice) that I thought I'd share...thanks to the guys in the IRC 
> channel who helped me figure it out!
> 
> In /opt/ltsp/i386/usr/share/ldm/rc.d/S02-refresh-user:
> 
> thisUser=$(ssh -Y -S ${LDM_SOCKET} ${LDM_SERVER} 'echo ${USER}')
> 
> case "$thisUser" in
>     root|user1|user2|user3)  #the users you want to exclude
>     echo "Really not a good idea!"
>     ;;
>     *)
>     ssh -Y -l $thisUser -S ${LDM_SOCKET} ${LDM_SERVER} 
> "/usr/local/bin/refresh-login"
>     ;;
> esac
> 
> 
> In /usr/local/bin/refresh-login:  (this is assuming you've copied the 
> backup of your users to /var/userbackups/username)
> 
> #!/bin/bash
> 
> rsync -az --delete /var/userbackups/$USER/ /home/$USER
> 
> 
> 
> Cheers!
> 
-- 
--------------------------------------------------------
Gideon Romm | Proud LTSP Developer
[EMAIL PROTECTED]

Support LTSP!  Buy your hardware at:

        www.DisklessWorkstations.com
        www.DisklessThinClients.com 
 
(use coupon code: LTSP5P for 5% off thin clients from DisklessThinClients.com)


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to