Bug 40183 - Add guest account support
Summary: Add guest account support
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Matthias Clasen
QA Contact:
Depends on:
Reported: 2011-08-17 18:32 UTC by Robert Ancell
Modified: 2018-08-07 09:34 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Description Robert Ancell 2011-08-17 18:32:30 UTC
It would be handy to be able to create temporary accounts using accounts service, useful for things like guest logins from a display manager.

LightDM currently does this (with code modified from an Ubuntu patch to GDM) [1] [2].  The behaviour is basically:

1. Something requests a guest account
2. A new account is created with a random username guest-XXXXXX
3. Some OS dependant code is run to lock the account down
4. The username is returned
5. The account can be deleted using the username

Are there any plans for this in accounts service?  If not, I'll start working on a patch.

[1] http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/view/head:/src/guest-account.c
[2] http://bazaar.launchpad.net/~ubuntu-desktop/lightdm/ubuntu/view/head:/debian/guest-account
Comment 1 Matthias Clasen 2011-10-17 12:42:04 UTC
Hey Robert,

if you want to work on something like this, that would be great.
Some things to consider:

- it is probably a good idea to have an IsGuestAccount? method on the user object, so we can eg. do the right thing in the user panel

- should it be possible to turn a guest account into a 'real' account ?

- probably needs to be possible to disable guest account creation
Comment 2 Robert Ancell 2011-10-24 13:31:57 UTC
The converting a guest account to a real account is an interesting idea - do you expect a user to "try before they buy" by logging in as a guest then opting in to convert to a full account (i.e. keeping their user data).  I suspect this could get have some nasty side-effects.

Agree with the other points.
Comment 3 Cosimo Cecchi 2017-04-12 23:52:42 UTC
We are interested in exploring this at Endless as well; see https://bugzilla.gnome.org/show_bug.cgi?id=619526 and in particular Ray's comment here https://bugzilla.gnome.org/show_bug.cgi?id=619526#c4, for more details on how systemd could be leveraged to create a temporary user account.

From the perspective of AccountsService, it strikes me that there could be different implementations possible, depending on what the desired user experience is. In particular, a high-level decision is whether being guest is a property of a given account, or a feature that is made available by the account system, when enabled.
Those map respectively to an user experience where accounts are created normally and then set up as being guest (as opposed to standard or admin), vs a "Enable guest logins" switch that maps to a single "Guest" entry in the login screen.

I lean heavily towards the latter; the case of two guest seats being logged in at the same time is covered equally well by an implementation that generates those user accounts dynamically.

I don't know enough now GDM/LightDM use AccountsService though, so haven't thought yet about the kind of API that would make an implementation possible.
Comment 4 Robert Ancell 2017-04-13 00:09:09 UTC
I never got around to implementing this feature in Accounts Service but I'll just note that it is still highly desirable to move as much of the guest account code out of LightDM as possible.
Comment 5 GitLab Migration User 2018-08-07 09:34:15 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/accountsservice/accountsservice/issues/50.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.