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)  . 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.
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
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.
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.
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.
-- 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.