[K12OSN] PostSession script, rm command and user directories
meelis at nlib.ee
Fri Dec 15 10:56:10 UTC 2006
I have a weird problem and can't solve it by myself :)
I'm using K12 project for about 6 months now and started with version 4.
My server has been set up to provide workstations for readers in library. So the main idea is to use ltsp user accounts as kiosk accounts.
My solution for this in version 4 is the following :
1. Create a user
2. Window manager : KDE
3. Set permissions and limitations by kiosktool
4. in the PostSession script I have a code that will remove the users' directory from the system and replaces it with a previously created profile in the tar file.
So every time a user ends his/her session, home directory will be removed and replaced with the one in the tar file. (with the needed permissions )
This works fine but now as I'm setting up so called backup server with LTSP 5, FC 5, Gnome 2.8 and Sabayon ... my solution won't work :(
in the old system I have the following code that will erase the home directory of a user who logged off :
cp /usr/BACKUP/terminal1.tar /home/terminal1.tar
rm -R terminal1
tar -xvf terminal1
rm -f terminal1.tar
in the new system I have the same code for the same user for the same directory but for my suprise ... it won't erase it ! It keeps files like .name and directories like .name
Made a debug script to throw me a log to show what the PostSession RM command is doing. Found out that it event won't look at the directories like "Desktop" or "Drives" in the user home directory as like they are not there.
Also if a user creates a directory or saves a file on the desktop or in the home direcory those won't be erased as well. I have googled my brains out but with no luck .
In the manuals and webpages I have read ... rm -R removes the directoryes and sub-directories. If I but a "-f " parameter, there shall be no problems removing the "read only" files. The PostSession script will run with root privileges so there can't be a problem with the file permissions. Hei ... it works in my current server (LTSP 4, FC4) that is in use as we speak.
Can someone please help me to solve this weird problem beacause we need to replace the running server before the end of this year and my ideas have ran out :(
Also there is a little idea for LTSP developers :) Maybe in the future releaces there can be some kind of module for this kind of terminals ? Built-in kiosk module I mean :)
meelis at nlib.ee
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the K12OSN