You are not logged in.

#1 2011-12-16 20:49:20

From: Hungary
Registered: 2011-12-16
Posts: 1

Guest sandbox account daemon with tmpfs

>>AUR link<<

I've made a little script based on RtroX's contribution (AUR). As the title suggests, the daemon adds a guest user, mounts a tmpfs directory in /home, then copies the permanent data stored at a different place formerly. When stopped, it copies back the specified files (if any) to the permanent storage, and unmounts the tmpfs. Next time you start it, you'll have the original state (except the specified files).

How to use it:

  1. Install it from AUR.

  2. By default it creates a user called 'guest' with password 'guest'. You may change the latter with passwd.

  3. Start the daemon.

  4. Log in as guest user.

  5. Perform all of the configurations that you want with your software.

  6. Run '/etc/rc.d/guestd-tmpfs init' to make the changes permanent.

  7. Add a list of files (bash syntax, recursive) to /home/guest-permanent/.keep to set certain files to be kept updated after shut-down.

  8. Add guestd-tmpfs to the DAEMONS array in /etc/rc.conf

Alternatively if you already have a guest home directory:

  1. Do the above steps from 1 to 2.

  2. Copy the contents of guest dir to /home/guest.

  3. Run '/etc/rc.d/guestd-tmpfs init'.

  4. Start the daemon.

  5. Add guestd-tmpfs to the DAEMONS array in /etc/rc.conf

It's recommended to exclude .thumbnails and all kind of cache directories to keep booting times fast.

Feel free to ask if something is not working as intended. As you can see I'm not a native English speaker so if you find strange sentences please correct me.

Last edited by szbence (2011-12-16 21:01:29)


#2 2012-04-04 09:22:34

Registered: 2012-04-04
Posts: 3

Re: Guest sandbox account daemon with tmpfs

Daemon name is false in code.
This is patch.

--- guestd-tmpfs.orig	2011-12-16 23:06:31.000000000 +0200
+++ guestd-tmpfs	2012-04-03 15:31:09.200042526 +0300
@@ -37,7 +37,7 @@
 		chmod -R 770 $GUEST_DIR
 		chmod -R 550 $PERMA_DIR
-		add_daemon guestd
+		add_daemon guestd-tmpfs
 		echo "Permanent directory $PERM_DIR does not exist"
@@ -50,11 +50,11 @@
 		umount $GUEST_DIR
-		rm_daemon guestd
+		rm_daemon guestd-tmpfs
       echo "Failed to remove directory; $PERM_DIR and/or $GUEST_DIR does not exist or the latter is not a monted tmpfs filesystem"
-      rm_daemon guestd
+      rm_daemon guestd-tmpfs


Board footer

Powered by FluxBB