Package Details: systemd-guest-user 33.2-1

Git Clone URL: https://aur.archlinux.org/systemd-guest-user.git (read-only, click to copy)
Package Base: systemd-guest-user
Description: A simple systemd configurations for guest user support
Upstream URL: https://github.com/Akrai/systemd-guest-user
Keywords: guest systemd user
Licenses: GPL3
Submitter: pavelshuvalov
Maintainer: akrai
Last Packager: akrai
Votes: 10
Popularity: 0.000001
First Submitted: 2016-10-14 12:39 (UTC)
Last Updated: 2019-11-04 16:25 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Pinned Comments

akrai commented on 2018-08-01 14:49 (UTC) (edited on 2019-11-04 16:11 (UTC) by akrai)

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 7 Next › Last »

akrai commented on 2018-07-30 22:12 (UTC)

yeah i know it, i meant we could erase the sysusers.d config file and create the user using an execstart command

azurata commented on 2018-07-30 22:01 (UTC) (edited on 2018-07-30 22:02 (UTC) by azurata)

It is being created with sysusers.d as the package is now

u guest - - /home/guest


Because sysusers.d/guest.conf runs first, it will create the user guest before ExecStart=/usr/sbin/bash -c 'id guest >& /dev/null || useradd guest'

akrai commented on 2018-07-30 21:52 (UTC)

https://www.freedesktop.org/software/systemd/man/sysusers.d.html no, it seems it is not the best idea to create the user using sysusers.d, maybe using an execstart in the service should do it safer, but i don't know enough bash to write it, it should be an easy if guest doesn't exist, create it

by the way, what does id guest >& /dev/null || useradd guest do then?

azurata commented on 2018-07-30 21:33 (UTC) (edited on 2018-07-30 21:36 (UTC) by azurata)

The guest user is not created with the command: ExecStart=/usr/sbin/bash -c 'id guest >& /dev/null || useradd guest'

It is created at sysusers.d/guest.conf

I don't know if it's safe or the best option, but adding a line to sysusers.d/guest.conf will solve this:

r - 1000-60000

u guest - Guest /home/guest

akrai commented on 2018-07-30 16:53 (UTC)

i see, what do you suggest? the man page of useradd mentions an option to create a system account, but i can't find one for creating an user account

azurata commented on 2018-07-30 15:34 (UTC) (edited on 2018-07-30 15:37 (UTC) by azurata)

If guest user doesn't exist it will be created as a system account. According to /etc/login.defs

Min/max values for automatic uid selection in useradd

UID_MIN 1000 UID_MAX 60000

System accounts

SYS_UID_MIN 500 SYS_UID_MAX 999

akrai commented on 2018-07-30 09:50 (UTC)

also, you can manually create the guest user, it should be created with id >= 1000 as normally happens, i did it just to add it to some system groups needed for using some hardware of my computer

akrai commented on 2018-07-30 09:48 (UTC)

my guest user has id 1001, created with this script as for the shell error, im testing and changing it as you proposed

azurata commented on 2018-07-29 13:21 (UTC)

One more problem, lightdm by default will list users with ID >= 1000 but the guest user will be created with ID less than 1000.