1

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?

1
  • 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, 2012 at 9:46

5 Answers 5

1

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

3
  • 1
    There should be a better way.. something like how live cds work, but for logoff and for user files..
    – Karthik T
    Dec 18, 2012 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, 2012 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. Dec 18, 2012 at 12:29
1

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'.

2
  • 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, 2012 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. Dec 18, 2012 at 9:04
1

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

1

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .