Skip to content

Commit 9d8d535

Browse files
committed
docs: document account-to-guest conversion and custom guest login names
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
1 parent 0f0afeb commit 9d8d535

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Guests may be deleted in the same way you would remove (or disable) regular user
5959
The command `occ guests:add` can be used to create guest users on the command-line.
6060

6161
```
62-
php occ guests:add [--generate-password] [--password-from-env] [--display-name [DISPLAY-NAME]] [--language [LANGUAGE]] [--] <created-by> <email>
62+
php occ guests:add [--uid [UID]] [--generate-password] [--password-from-env] [--display-name [DISPLAY-NAME]] [--language [LANGUAGE]] [--] <created-by> <email>
6363
```
6464

6565
For example:
@@ -70,6 +70,14 @@ OC_PASS=somepassword php occ guests:add --password-from-env --display-name "Max
7070

7171
The user will then be able to login with "maxmustermann@example.com" using the given password.
7272

73+
By default the guest's login name (user ID) is derived from the email address, or a hash of it when the *"Use a hash of the email as user ID for improved privacy"* setting is enabled. To give the guest a free-form login name instead, pass `--uid`:
74+
75+
```bash
76+
OC_PASS=somepassword php occ guests:add --password-from-env --uid maxm admin maxmustermann@example.com
77+
```
78+
79+
The guest can then log in with "maxm".
80+
7381
When using `--generate-password` instead of giving a password, a random password will be generated. The guest user should then use the "forgot password" link to reset it.
7482

7583
> [!NOTE]
@@ -168,6 +176,20 @@ Remove the override to fall back to the Quick presets default again:
168176
occ config:app:delete guests guest_quota
169177
```
170178

179+
### Converting accounts to guests
180+
181+
An administrator can convert a regular account into a guest account. In *Administration settings → Users*, open the account's `` menu and choose **Convert to guest account**. The account keeps its login name and password but becomes a limited guest, restricted to the apps allowed for guests, and receives the [default guest quota](#default-quota-for-new-guests). The conversion cannot be undone automatically.
182+
183+
This is only possible for accounts that
184+
185+
* use the database backend,
186+
* are not already a guest, and
187+
* have **never logged in**.
188+
189+
A typical use case is self-registration through the [registration](https://apps.nextcloud.com/apps/registration) app with *"Require administrator approval"* enabled: those accounts are created disabled and never logged in, so instead of enabling them an administrator can downgrade them to guests. Once such an account has logged in, conversion is no longer possible.
190+
191+
If you would rather registered users keep their email address as login name, enable *"Force email as login name"* in the registration app settings.
192+
171193
### Converting guest users to full users
172194

173195
Guest users can be automatically converted into full users (provided by any other user back end like SAML, LDAP, OAuth, database...) on their **first** login. When this happens they will retain their shares.
@@ -185,4 +207,4 @@ By default the old (guest) account will be disabled after successful conversion.
185207
- Enhancement ideas: https://github.com/nextcloud/guests/issues
186208
- Pull requests: https://github.com/nextcloud/guests/pulls
187209
- Troubleshooting assistance: https://help.nextcloud.com
188-
- Code: https://github.com/nextcloud/guests/tree/master
210+
- Code: https://github.com/nextcloud/guests/tree/main

0 commit comments

Comments
 (0)