[K12OSN] Scripters...I need your help! *please?*

David Trask dtrask at vcs.u52.k12.me.us
Thu Nov 18 22:26:55 UTC 2004


Hi all,

I can do some very basic scripting and I'm learning all the time, but now
I need something quite quickly.  I hosed my Samba/LDAP server the other
day...not sure exactly what went wrong, but the rebuild was quite smooth
and all the data was easy to reinsert.  The only big issue I have is that
the Windows (Samba) profiles have become a bit corrupted.  (we do roaming
profiles)  I've found the best way to fix this is to delete the profile
and let a new one be created from the default on the next log in.  My
dilemma....I need to copy the data from the users My Documents, Desktop,
and Favorites directories to another location...preferably a folder in
their home directory for safekeeping.  

Here's the layout of what I want to do.....

I need to create a folder named "win-backup" in each users home directory
in /home  

I then need to backup the My\ Documents/ , Desktop, and Favorites
directory from each users profile located in /opt/samba/profiles 
(/opt/samba/profiles/username...ex. /opt/samba/profiles/dtrask/) to the
"win-backup" folder in the same users home dir.  All dirs are owned by the
user if that makes a difference.  
That's it!  Then I can wipe the profiles myself and have them recreated. 
It'll also be a handy script to have on hand to back up peoples stuff once
in a while to thier home directory.  

So in outline form...

for each username...

mkdir /home/"username"/win-backup
cp /opt/samba/profiles/"username"/My\ Documents/ Desktop Favorites  to
/home/"username"/win-backup

then repeat for next user.....

Can anyone help?   


David N. Trask
Technology Teacher/Coordinator
Vassalboro Community School
dtrask at vcs.u52.k12.me.us
(207)923-3100




More information about the K12OSN mailing list