Package Details: systemd-guest-user 33.2-1

Git Clone URL: (read-only, click to copy)
Package Base: systemd-guest-user
Description: A simple systemd configurations for guest user support
Upstream URL:
Keywords: guest systemd user
Licenses: GPL3
Submitter: pavelshuvalov
Maintainer: Akrai
Last Packager: Akrai
Votes: 9
Popularity: 0.29
First Submitted: 2016-10-14 12:39
Last Updated: 2019-11-04 16:25

Required by (0)

Sources (1)

Pinned Comments

Akrai commented on 2018-08-01 14:49

Installing the package gets your system ready to use the guest user, which is basically a normal user with a tmpfs home folder (which gets erased after every reboot, not after a logout), but please notice two things:

  1. You probably want to add the guest user to some system groups you may consider in order to be able to use some resources of your computer, the same way as any other human user

  2. The script copies any file placed in the /etc/skel/ folder to the guest home after every reboot, intended mainly for copying config files you may consider useful to copy in every new guest session, for example if you need special graphical or network config files placed in order to get a properly working guest user. Any suggestion is welcomed

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

skidnik commented on 2019-02-12 20:09

the second and third line on that screenshot tell you where it's screwed. when copying symlinks you should cp -d, otherwise the files linked are copied.

Akrai commented on 2019-02-11 18:18

So i get this

And also i get that systemctl list-dependencies systemd-guest-config.service does show home-guest.mount but systemctl list-dependencies does not show any of both guest services

skidnik commented on 2019-02-10 20:21

Search through journalctl -b for home/guest and home-guest, see what systemd has to tell about the reasons. search for both service names and see if they're started.

systemctl list-dependencies systemd-guest-config.service must show the home-guest.mount.

systemctl list-dependencies must show both systemd-guest-config.service and systemd-guest-user.service.`

Akrai commented on 2019-02-10 18:46

doesn't get mounted

I don't understand, it isn't listed as mounted but i login as guest, make files, reboot and files get erased as a tmpfs should do, i don't get it

skidnik commented on 2019-02-10 18:33

Make sure to systemctl daemon-reload, then after reboot check if /home/guest got mounted, grep 'guest' /proc/mounts should show the mounted tmpfs, check if systemd-guest-config.service got loaded, it won't start without successfull mount, journalctl -b shows last boot log.

Akrai commented on 2019-02-10 14:40

Hmm systemd-guest-config.service seems to not be loading for me, no files are copied to /home/guest, and i can't find what is the problem

Akrai commented on 2019-02-10 14:07

Okay so then im gonna copy your repo over mine to use your modifications in the package, thanks for the job!

skidnik commented on 2019-02-10 12:02

it just uses the home-guest as /home/guest

weird af, but I thought of it as something systemd may do.

Anyways, I've copied your github to my gitlab as I have plans on implementing this on Xubuntu. It's in the state it's working on my laptop rn. What I did:

separated what's to be before (systemd-geust-user.service) and after (systemd-guest-config.service) home-guest.mount,

added Where= to home-guest.mount, cos it's kinda more obvious and clear this way,

removed home-guest.mount from, and stated Requires=home-guest.mount in systemd-guest-config.service,

removed After=systemd-tmpfiles-setup.service from home-guest.mount, 'cos otherwise it caused a circular dependency: any *.mount ,it seems, is part of, which has Before=systemd-tmpfiles-setup.service, so home-guest.mount can't be After=systemd-tmpfiles-setup.service, systemd was just removing the mount from tasks before I did this. It may have failed if the /home/guest did not exist, but I tried removing it and then rebooting and it seems that systemd is smart enough to create a mount target if it does not exist, and yes, it's stated in systemd documentation.

Akrai commented on 2019-02-09 22:09

About the missing Where=/home/guest in home-guest.mount, i was also surprised about it, i just didn't understand how a file basically without info about where to mount the home folder, will mount it anyway

But after researching a little bit it seems the path is encoded in the filename, it just uses the home-guest as /home/guest, Weird right?

So i should separate those two packs of commands in two services right?

skidnik commented on 2019-02-09 21:44

Now, that I thought a bit more on why:

There are two parts of systemd-guest-user.service which should be separate services:

 ExecStart=/usr/sbin/bash -c 'id guest >& /dev/null || useradd -c Guest guest'
 ExecStart=/usr/sbin/usermod -d /home/guest/ guest
 ExecStart=/usr/sbin/chsh -s /bin/sh guest
 ExecStart=/usr/sbin/passwd -d guest

which must be before mounting the tmpfs, as it makes sure the guest user exists and properly configured, and this part:

 ExecStart=/usr/sbin/bash -c 'cp -a /usr/share/guest-configuration/. /home/guest'
 ExecStart=/usr/sbin/chown -R guest:users /home/guest

must be after mounting because everything copied to /home/guest before mounting is replaced with an empty tmpfs.

p.s. I'm also puzzled about home-guest.mount as it doesn't have Where=/home/guest, yet tmpfs seems to be mounted...