LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-30-2012, 04:32 AM   #1
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 141

Rep: Reputation: 15
Question Creating an user that resets at every reboot


Hello,
I have a machine running Ubuntu 12.04/64bit.
I got a friend-son that uses it when he comes to my home, quite frequently. However I don't like him to clutter the pc with rubbish or play on my account.
So I created him an account. The problem is that he keeps downloading things, changing desktop, cluttering everything..so i have to step in from time to time and clearup..
Is there a way to create an user that will automatically reset to a predefined setup at each reboot? Example: reset to a desktop wallpaper I choose, with unity apps I choose and so on? and delete every change made by him when shut down?
Many thanks
 
Old 10-30-2012, 05:20 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
That actually is pretty easy. Set up the account in the way you want it to be, then make a copy of the users home-directory. Now you can simply remove the user's /home directory and copy back the original one when rebooting or starting the system. Just put this into your rc.local:
Code:
rm -rf /home/USERNAME
cp -pr /path/to/the/copy /home
If you don't want to happen that at every boot just put those lines into a separate script that you can launch manually if needed.
Of course there are more sophisticated and elegant solutions (like mounting a unionfs to the user's home-directory), but I would think that this is the simples method.
 
1 members found this post helpful.
Old 10-30-2012, 02:39 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
As above.

Might even look at using a kiosk or usb/cd/dvd type of boot or get real exotic with a iscsi booted system.

Might be able to use features of btrfs or zfs or some other snapshot of the time.
 
Old 06-06-2014, 04:25 PM   #4
assasukasse
Member
 
Registered: Mar 2006
Location: UK
Distribution: Debian, Ubuntu
Posts: 141

Original Poster
Rep: Reputation: 15
Tobi that's a fantastic idea..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
resolv.conf resets to default after every reboot mehetmet Linux - Networking 2 08-10-2012 04:38 AM
Fedora resets the screen resolution at reboot roberco Fedora 4 11-25-2010 03:20 AM
/etc/resolv.conf resets after every reboot in FC3 RAMMS+EIN Linux - Hardware 2 05-19-2005 11:00 PM
Resolution resets after reboot mouldy_punk SUSE / openSUSE 0 01-26-2005 10:49 AM
Sound resets to LOUD after reboot! Unknown_User Linux - Hardware 2 04-21-2003 10:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration