[K12OSN] Roaming profiles
Mark Gumprecht
gumprechtm at msln.net
Fri Sep 23 15:14:15 UTC 2005
Thank you Dave, you just saved me from having to move 700+ profiles,
one at a time. What's a good source for learning scripting?
Mark
David Trask wrote:
>This is my backup script that creates a folder in each user's home
>directory called "win-backup" (my users know that if they lose something
>it may be in there)....it backs up My Documents, Desktop, and Favorites.
>(This first part is mostly what you're looking for Mark)....the next part
>of the script is the part where I archive the files and move them to a
>directory mounted via NFS from another server (an E-Smith/SME box) for
>safe-keeping. I have another script that deletes the older backup
>archives later on. I have not yet done the date and time variables....I
>manually enter the date for the filename....I may change that soon, but
>I'm lazy. ;-)
>
>Remember....simply using "cp" will prompt you each time before
>overwriting.....however, if you use /bin/cp it will overwrite.
>
>Here's the script....
>
>################
>#Begin Backup Script####
>################
>
>!#/bin/bash
>for x in `ls /home`; do
>echo "Doing $x ..."
>mkdir /home/${x}/win-backup
>chown ${x}.users /home/${x}/win-backup
>
>echo "Copying /opt/samba/profiles/${x}/My\ Documents/
>/home/${x}/win-backup"
>/bin/cp -Rf /opt/samba/profiles/${x}/My\ Documents/ /home/${x}/win-backup
>
>echo "Copying /opt/samba/profiles/${x}/Desktop/ /home/${x}/win-backup"
>/bin/cp -Rf /opt/samba/profiles/${x}/Desktop/ /home/${x}/win-backup
>
>echo "Copying /opt/samba/profiles/${x}/Favorites/ /home/${x}/win-backup"
>/bin/cp -Rf /opt/samba/profiles/${x}/Favorites/ /home/${x}/win-backup
>
>chown -R ${x}.users /home/${x}/win-backup
>
>######################
>##Create an archive of win-backup##
>######################
>
>echo "Now let's archive everything for safe-keeping"
>cd /home/${x}/win-backup
>zip -r sept14 *
>
>###################################
>##Archive "tgz" the files on another server mounted via NFS##
>###################################
>
>cp -f sept14.zip /mnt/backup/bakup-0506/home/${x}/
>cd /home/${x}/
>echo "Making an archive of all files in the home directory and backing
>them up"
>tar -czvf /mnt/backup/bakup-0506/home/${x}/sept14.tgz --exclude sept14.zip
>*
>
>#########################
>##Remove the zip file to save space#####
>#########################
>
>echo "Now we'll remove the zip file to save space"
>cd /home/${x}/win-backup
>rm -f sept14.zip
>
>done
>
>###########
>##End Backup###
>###########
>
>"Support list for opensource software in schools." <k12osn at redhat.com> on
>Friday, September 23, 2005 at 10:40 AM +0000 wrote:
>
>
>>Is there a script that some one may have written to move the My
>>Documents and Desktop of the /opt/samba/profiles/$users$ to the
>>/home/$user$ directory? Possibly merge the files if the directory exists?
>>Mark
>>
>>Doug Simpson wrote:
>>
>>
>>
>>>We use roaming profiles, but delete them automatically every Friday
>>>
>>>
>>night
>>
>>
>>>using a cron job (on the student's home directories, not teacher's and
>>>others.) This way, they don't keep growing, they don't keep all the
>>>
>>>
>>danged
>>
>>
>>>Temporary Internet Files (they really need to rename that to "Permanent
>>>Internet Files), history lists and such. I modified samba to put
>>>
>>>
>>profiles
>>
>>
>>>under their own share that is non-browseable and they do not live in the
>>>user's home directory anymore. Make it easy to clean them up as a group
>>>
>>>
>>or
>>
>>
>>>individually, if one gets messed up beyond usability.
>>>
>>>That way, every monday, they copme back with a clean, fresh profile
>>>(default) and it fixes the messes they make out of their desktops,
>>>wallpapers, icons and all. . .
>>>
>>>In this instance, students are not allowed to use My Documents to save
>>>
>>>
>>to.
>>
>>
>>>They use their H: drive which is their home directory. This way when
>>>
>>>
>>the
>>
>>
>>>profile is deleted, they don't lose documents. We also run Centurion
>>>Driveshield on the computers so they can't mess them up anyway.
>>>
>>>
>>>
>>>Doug Simpson
>>>Technology Specialist
>>>DeQueen Public Schools
>>>DeQueen, AR 71832
>>>simpsond at leopards.k12.ar.us
>>>Tux for President!
>>>
>>>On Fri, 23 Sep 2005, Mark Gumprecht wrote:
>>>
>>>
>>>
>>>
>>>
>>>>I thought I did that, Maybe I screwed that up and it is not working as
>>>>should. Thanks for direction
>>>>Mark
>>>>
>>>>cliebow at downeast.net wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>touch with Jason Ingalls who wrote a startup.bat that works very nicely
>>>>>with roaming profiles..only allows some pirces to raom and hooks My
>>>>>Documents directly to the users fileserver "My Documents" chuck
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>On Fri, 2005-09-23 at 06:54, Mark Gumprecht wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Heeeeeelp. Roaming profiles on the /opt partition are growing
>>>>>>>
>>>>>>>
>>rapidly.
>>
>>
>>>>>>>What can one do after the cow is out the barn? Is it possible to set
>>>>>>>
>>>>>>>
>>a
>>
>>
>>>>>>>manditory profile after the fact? How about adding a hard drive and
>>>>>>>
>>>>>>>
>>grow
>>
>>
>>>>>>>the partition? Any thoughts? I obviously didn't plan well....
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>Somewhere on the list a while back there was a discussion about
>>>>>>how to force registry settings to move the default place to
>>>>>>save things to a server drive which seems much more sane
>>>>>>than what roabat that works vewry nicelyming profiles does. Does
>>>>>>
>>>>>>
>>anyone
>>
>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>remember the
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>resolution to that.
>>>>>>
>>>>>>Also, it isn't particularly hard to add a drive and move
>>>>>>a directory or partition. Or if you are using LVM you
>>>>>>can merge in a new partition to grow it.
>>>>>>
>>>>>>--
>>>>>>Les Mikesell
>>>>>> les at futuresource.com
>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>K12OSN mailing list
>>>>>>K12OSN at redhat.com
>>>>>>https://www.redhat.com/mailman/listinfo/k12osn
>>>>>>For more info see <http://www.k12os.org>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------
>>>>>This message was sent from Downeast.Net.
>>>>>http://ellsworthme.com/
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>K12OSN mailing list
>>>>>K12OSN at redhat.com
>>>>>https://www.redhat.com/mailman/listinfo/k12osn
>>>>>For more info see <http://www.k12os.org>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>--
>>>>Mark Gumprecht
>>>>Data Systems Specialist
>>>>MSAD3
>>>>Unity, ME
>>>>gumprechtm at msln.net
>>>>
>>>>_______________________________________________
>>>>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>
>>>
>>>
>>>
>>>
>>>
>>--
>>Mark Gumprecht
>>Data Systems Specialist
>>MSAD3
>>Unity, ME
>>gumprechtm at msln.net
>>
>>_______________________________________________
>>K12OSN mailing list
>>K12OSN at redhat.com
>>https://www.redhat.com/mailman/listinfo/k12osn
>>For more info see <http://www.k12os.org>
>>
>>
>
>
>
>David N. Trask
>Technology Teacher/Coordinator
>Vassalboro Community School
>dtrask at vcsvikings.org
>(207)923-3100
>
>_______________________________________________
>K12OSN mailing list
>K12OSN at redhat.com
>https://www.redhat.com/mailman/listinfo/k12osn
>For more info see <http://www.k12os.org>
>
>
>
--
Mark Gumprecht
Data Systems Specialist
MSAD3
Unity, ME
gumprechtm at msln.net
More information about the K12OSN
mailing list