|
4 | 4 | "description": "Create an emergency user"
|
5 | 5 | "property=og:description": "Create an emergency user"
|
6 | 6 | "property=og:title": "Create an emergency user"
|
7 |
| - "keywords": "Plone, user and groups, emergency user, pip, buildout" |
| 7 | + "keywords": "Plone, users, groups, emergency user, pip, buildout" |
8 | 8 | ---
|
9 | 9 |
|
10 |
| - |
11 | 10 | (user-groups-emergency-user-label)=
|
12 | 11 |
|
13 | 12 | # Emergency user
|
14 | 13 |
|
15 |
| -sometimes it is needed to create an emergency user. the password of admin ist lost or you have inherit a project without a proper documentation. The usecase: you will login as admin to your, but you can't. |
| 14 | +An emergency user is one that you can use to regain administrative access to a Plone site. |
| 15 | +If you lose the administrator password, or you inherit a project without proper documentation, you can create an emergency user. |
| 16 | + |
| 17 | +First of all, do the following steps not in a production environment! |
| 18 | + |
| 19 | + |
| 20 | +(user-groups-create-an-emergency-user-label)= |
| 21 | + |
| 22 | +## Create an emergency user |
| 23 | + |
| 24 | +There are two procedures to create an emergency user, depending on how you created and manage the Plone site. |
| 25 | +For both scenarios, the commands you run will stop the Plone site, add a new user, and start the Plone site. |
| 26 | + |
| 27 | +```{important} |
| 28 | +You should always stop your Plone site before adding a new user. |
| 29 | +``` |
| 30 | + |
| 31 | +```{important} |
| 32 | +The new username must not be an existing one. |
| 33 | +Therefore you should avoid the username `admin`, but use another arbitrary name, such as `admin2`. |
| 34 | +``` |
16 | 35 |
|
17 |
| -First of all, do the following steps not in a production environment! Shutdown your instance. |
18 | 36 |
|
19 | 37 | (user-groups-emergency-user-pip-installation-label)=
|
20 | 38 |
|
21 |
| -## Create an emergency user in a pip based Plone instance |
| 39 | +### pip based Plone instance |
22 | 40 |
|
23 |
| -```bash |
| 41 | +You can run the following shell commands to create an emergency user. |
| 42 | + |
| 43 | +```shell |
| 44 | +./venv/bin/instance stop |
24 | 45 | ./venv/bin/addzopeuser -c instance/etc/zope.conf <user> <password>
|
| 46 | +./venv/bin/instance start |
25 | 47 | ```
|
26 | 48 |
|
27 |
| -start your instance and login with the created user. |
| 49 | +Now you can login with the created user. |
| 50 | + |
28 | 51 |
|
29 | 52 | (user-groups-emergency-user-buildout-installation-label)=
|
30 | 53 |
|
31 |
| -## Create an emergency user in a buildout based Plone instance |
| 54 | +### Buildout based Plone instance |
32 | 55 |
|
33 |
| -With buildout and plone.recipe.zope2instance you can do |
| 56 | +With buildout and `plone.recipe.zope2instance`, you can run the following shell commands to create an emergency user. |
34 | 57 |
|
35 |
| -```bash |
| 58 | +```shell |
| 59 | +bin/instance stop |
36 | 60 | bin/instance adduser <user> <password>
|
| 61 | +bin/instance start |
37 | 62 | ```
|
38 | 63 |
|
39 |
| -start your instance and login with the created user. |
40 |
| - |
| 64 | +Now you can login with the created user. |
0 commit comments