Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to install a Linux machine (latest Linux Mint Debian Edition) as a shared computer for multiple users. All of the users should share one account with the same password.

Think of it as a classroom PC or a Kiosk PC

After every login - all prior bookmarks/user settings should be reset to a default.

Is there a good documentation/tutorial/blog entry (from your prior experience) available for this?

share|improve this question
    
I found an article in a german tech magazine (heise.de/ct/artikel/Der-oeffentliche-PC-1168000.html) which covers this. Unfortunately - it is in german (which is OK for me) and payed content :P. The author suggests a Union Filesystem, a GDM PostLogin/PostSession hookscript (simple) and a Grub Password. This would do it for me - but maybe there are english resources available for the non-german interested ? –  madflow Dec 18 '12 at 9:46

5 Answers 5

up vote 0 down vote accepted

I found an article in a german tech magazine (heise.de/ct/artikel/Der-oeffentliche-PC-1168000.html) which covers this. Unfortunately - it is in german (which is OK for me) and payed content :P. The author suggests a Union Filesystem, a GDM PostLogin/PostSession hookscript (simple) and a Grub Password.

Unfortunatly I could not find any good english documentation on this.

share|improve this answer

It should also be possible to control this type of activity from /etc/profile which is read before the /home/user/.profile and is owned by root. (See: http://bash.cyberciti.biz/guide/Startup_scripts).

However, this would not prevent the issue of opening up another xterm or a second user logging in at the same time. If the system is not multi-user, i.e. there is only one user active at a time, then you should be able to get the desired effects of clearing the home directory by using .bash_logout. (see: Create a logoff script/task for Linux)

To ensure that users don't edit these files make sure that they do not have access to chown and chmod. If they do not have access to these commands and the file has some restrictive permissions set say 0440 and is owned by a different user, then the files should be secure enough to prevent tampering.

share|improve this answer

make a daemon (while true) which checks every 2 sec or so if the user is logged in. if he's not and the home dir is not empty, then it will clear the home

share|improve this answer

If all the users share one account with the same password, then you need one login which is associated with one home directory. For example: '/home/user'. You need to clear this home directory for every login event. You can write a script to clear this home directory and run it by writing a command in .bashrc inside '/home/user'.

share|improve this answer
    
That's true - but the user could alter this file and destroy my precious script. Also: As far as I know .bashrc .profile etc are read when you open a terminal. So if I open xterm as user "user" - than all of the files would be deleted, right? –  madflow Dec 18 '12 at 9:00
    
As it is a shared access, chances will be there that the user deletes this script. You need to keep a backup in /root and you can place an automatic check, to see, if the file is missing, it should be copied automatically. –  Manoj Agarwal Dec 18 '12 at 9:04

The simplest thing to do would be to put entries in something like /etc/profile to remove everything in the home directory.

share|improve this answer
1  
There should be a better way.. something like how live cds work, but for logoff and for user files.. –  Karthik T Dec 18 '12 at 8:43
    
This would create to many side effects and pitfalls. What if the user opens a shell - what if another user logs in with ssh etc. I guess I am looking for more complex tutorial - where all the pitfalls have been discovered already ;) –  madflow Dec 18 '12 at 8:57
    
the file in /etc/profile is read ONLY by login shells, not ordinary shells, and it is not writeable. Therefore it is safe. –  Michael Tsang Dec 18 '12 at 12:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.