Skip to content

Commit 6ca3507

Browse files
authored
1 parent b4273e2 commit 6ca3507

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

docs/backend/users-groups/emergency-user.md

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,61 @@ myst:
44
"description": "Create an emergency user"
55
"property=og:description": "Create an emergency user"
66
"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"
88
---
99

10-
1110
(user-groups-emergency-user-label)=
1211

1312
# Emergency user
1413

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+
```
1635

17-
First of all, do the following steps not in a production environment! Shutdown your instance.
1836

1937
(user-groups-emergency-user-pip-installation-label)=
2038

21-
## Create an emergency user in a pip based Plone instance
39+
### pip based Plone instance
2240

23-
```bash
41+
You can run the following shell commands to create an emergency user.
42+
43+
```shell
44+
./venv/bin/instance stop
2445
./venv/bin/addzopeuser -c instance/etc/zope.conf <user> <password>
46+
./venv/bin/instance start
2547
```
2648

27-
start your instance and login with the created user.
49+
Now you can login with the created user.
50+
2851

2952
(user-groups-emergency-user-buildout-installation-label)=
3053

31-
## Create an emergency user in a buildout based Plone instance
54+
### Buildout based Plone instance
3255

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

35-
```bash
58+
```shell
59+
bin/instance stop
3660
bin/instance adduser <user> <password>
61+
bin/instance start
3762
```
3863

39-
start your instance and login with the created user.
40-
64+
Now you can login with the created user.

0 commit comments

Comments
 (0)