Users, Groups and the Portal
Outcome: you can explain YunoHost's people-model — one account per person, a mailbox with it, groups and permissions deciding who may open what, and one portal where each person sees exactly their own tiles.
This is the chapter YunoHost exists for. Everything else in this guide is plumbing; this is the promise the plumbing keeps.
One account per person
Only an administrator creates users —
from the webadmin's Users section
(the + New user button) or with
yunohost user create. Creating a user
creates, in one motion:
- a login for the portal;
- an email address, in the form
username@domain.tld, on the server's own mail stack (chapter 9) — the administrator chooses the main address; aliases and forwards can be added later, by the admin or by the user themselves; - an entry in the LDAP directory (chapter 2), which is how the same identity is recognised by mail, by the portal, and by every app that integrates with it.
Passwords must be at least 8 characters, and the documentation's advice is the usual good advice: a longer passphrase beats a short clever string. YunoHost also checks candidate passwords against a shipped list of the 100,000 most used passwords — the file sits in the core source, and chapter 12 returns to it.
The first user (created at the
postinstall, chapter 4) is special in
two ways: they are an administrator, and
mail sent to root@your.domain.tld and
admin@your.domain.tld lands in their
mailbox, so the server's own complaints
have a human reader.
The portal: sign in once
The user portal — the SSO, for
single sign-on — lives at
https://the.domain.tld/yunohost/sso.
A user signs in there once and sees a
page of tiles, one per application
they are allowed to use. Clicking a tile
opens the app; for apps integrated with
the SSO/LDAP, they are already signed in
inside it too.
Two honest qualifications, both from the documentation:
- "Integrated" is doing work in that sentence. The docs say users are logged in automatically to "those (apps) who are integrated with the SSO/LDAP, since this is sometimes technically complicated or not possible at all". An app's integration level (chapter 8) is your best predictor.
- The portal needs the domain. The SSO can only be reached through the actual domain name, not by IP address — one more reason chapter 3 insisted the domain is structural.
In the portal, users manage their own corner: click the avatar to change their identity details, mail aliases, mail forwards and password. Routine changes — a new alias, a new password the user chooses for themselves — do not need the administrator at all. But note what users cannot do: create accounts, change permissions, or see tiles they have not been given.
Groups and permissions
Access is controlled by permissions: a permission says these people may use this thing — an application, or a service such as mail or the chat (XMPP) service, or even just one part of an app (the WordPress administration screens, in the documentation's example).
Permissions can be granted user by user,
but the tool provided is groups.
Collect people into a group — a family,
a committee, the people who run the
photo library — and grant the group.
Groups can also have mail aliases:
mail to the group's address is delivered
to every member (the admins group's
aliases include the root@ and admin@
addresses from above). Group mail
aliases are, for now, a command-line
feature (yunohost user group info will
show them).
Three groups are special, created by the system, with membership you cannot edit — only the permissions given to them:
all_users— every registered user. Grant a permission to it and every account on the box has it.visitors— people not logged in. Granting a permission to visitors makes that app or page public to the whole internet. This is the single most consequential click in the webadmin; some permissions are marked protected, meaning visitors cannot be added to them at all.admins— the administrators. Membership here is what allows SSH and SFTP access as well as the webadmin (chapter 12).
Each app permission also controls whether its tile shows in the portal at all — an administrator can let a group use an app while hiding its tile, or show a tile as a simple link. The permission record in the source carries exactly these fields: a URL, a label, a "show tile" flag, and whether it is protected.
The model, tested
Walk it once, end to end. You create an
account for a neighbour. They instantly
have a mailbox at neighbour@your.domain.tld
and a portal login. You put them in the
household group; the group's
permissions open the photo library and
the file sync, so two tiles appear on
their portal page and both apps accept
their single sign-on. The finance app is
granted to a different group, so it
never appears for them — not greyed out,
not locked: absent. Later they leave the
household; removing them from the group
removes the tiles and the access in one
edit, while their account and mailbox
can stay for forwarding. That is the
whole system, and it is genuinely as
simple as it sounds — which is the
point of the project.