Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I don't know of any off the top of my head, but it *might* be possible to have you're root file system mounted as read only in something like /rootfs/ and then mount a second partition (possibly a ram-disk) to / and create a writable shadow directory using 'lndir' to / that way any changes would take place in the shadow directory and not actually effect the real root directory. You would just have to clear the shadow directory and re-make it each time you rebooted.
Using tmpfs for the guest user home directory with a good system wide configuration probably works. Only the stuff in the home directory can be messed with, and that stuff will disappear when it reboots, so the system is back to the way it was. If you fear that you will bork the system as root, the best way is probably to make a backup ghost image that can be restored if something bad happens. A / partition of about 2 Gigs helps a lot cause the image doesn't use up as much space.
Would you mind elaborating? For example, can I set a startup script to mount the user's home directory as tmpfs so that every time I reboot, the user's home directory will load as if it had never been touched before? I'm probably misunderstanding this a bit...
Just create a mountpoint in /etc/fstab. The LQ Wiki has info on that. Because, like a ramdisk, a tmpfs filesystem is in memory, so the whatever is in there will disappear when the system reboots. Unlike a ramdisk, it can grow to fit the temp storage needs of the guest and is faster(I think).
Yes, I read the sparse LQ Wiki entry. As a Linux newbie I'm still a bit confused about how to set it up, execute it, and exactly what it will do. Is there an in-depth article on tmpfs you might recommend? Or, would you be willing to explain it to me more verbosely?
Sorry, I'm just not getting it. I need a more thorough and newbie-friendly explanation of what's going on with tmpfs and how to do it. I appreciate your willingness to help, but it's not getting through to my thick skull! Please be patient!
For Slackware
1. run "adduser guest" to make a normal user account with the name called "guest"
2. add this fstab entry either right after /home or / entries, depending on your
setup.
Code:
/dev/shm /tmp defaults 0 0
3. setup all the system-wide preferences, so that your guest isn't stuck confused because the defaults aren't tuned to your system. These settings are probably a good idea for yourself as well, so that is why it can be in the system-wide settings.
4. reboot and enjoy
Only the first step is possibly Slackware dependent, just use the method in your distro instead. The nice thing about this setup is that a guest cannot break your system in any way, just their account, which will reset when you reboot (or remount). At the same time, you can administrate your system without fear it will be rolled back when you reboot.
Thank you for elaborating. I'm getting there. Please have patience!
Is fstab system wide? If so, how does the fstab entry you recommended apply only to user guest?
Where's the tmpfs command in your instructions?
I'd like to, for example, create a guest account and configure the session and panels for it, then setup this tmpfs thing so that the guest account loads like I set it up every time I reboot the computer, but changes made in my root account remain.
The fstab is a File System TABle of all the devices that are either mounted at boot(/,swap,proc) or when needed(floppy,cdrom,usb). Since the mountpoint is /home/guest which is supposed to be the home directory of the guest account, the guest only has control of that directory and cannot touch any other part of the system. It gets cleared every time you reboot, so nothing done to the account stays. For things that must be in the account cause there is no way to make a system-wide config for it, you can put those configs in /etc/skel. I am not sure whether you have to copy those configs over to the guest account when it reboots, but I think you do. This is taking advantage of Linux's excellent multi-user security model, with the only adjustment is that the account has purely temporary files. It has the "deepfreeze" effect on the guest, but normal users and of course root can change things permanently.
1. Create a non-sudo "all" account on my Ubuntu machine.
2. Login as all, disable panels (don't know how just yet), put Kiosk Firefox in startup programs, etc.
3. as root, add "/dev/shm /home/all tmpfs defaults 0 0" to fstab.
4. Reboot
The etc/skel stuff would only be if I want to make permanent changes to the all account, right? Or I could simply remove the fstab entry, reboot, make changes in the all account and re-add the fstab entry, and reboot again.
Otherwise, I'm confused, and I need to create a startup script to copy files from etc/skel to etc/all, or something?
If I can get this working that'd be awesome and then I'll write a tutorial post for LQ, because I know a DeepFreeze-esque solution is something a lot of people want!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.