-
-
Notifications
You must be signed in to change notification settings - Fork 175
add notes to create an emergency user #1703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
caf2251
add notes to create an emergency user
1letter b4273e2
Sentence-case index.md
stevepiercy 6ca3507
Merge content from Plone 5 docs in https://5.docs.plone.org/manage/de…
stevepiercy c695357
Merge branch '6.0' into create-an-emergency-user
stevepiercy 8f92fa0
Merge branch '6.0' into create-an-emergency-user
stevepiercy 634806d
Merge branch '6.0' into create-an-emergency-user
stevepiercy 5fb84db
Merge branch '6.0' into create-an-emergency-user
stevepiercy 5b489d6
Merge branch '6.0' into create-an-emergency-user
ale-rt 94baa83
Merge remote-tracking branch 'origin/6.0' into create-an-emergency-user
ale-rt 33b3ad3
Move the how to to the Admin guide section
ale-rt 9d3abb9
Add some more examples and clarifications
ale-rt 6692187
Merge pull request #1854 from plone/ale/add-zope-user
ale-rt f5fb944
Clarify and rework the docs for adding a Zope manager user
ale-rt b9157e3
Merge pull request #1860 from plone/ale/add-zope-user-fixup
ale-rt 247a999
Merge branch '6.0' into create-an-emergency-user
stevepiercy 64b80ca
Update docs/backend/index.md
davisagli c89eb53
rename file, update metadata
davisagli 45aa742
Restore users-groups
stevepiercy c661110
Polish up Zope manager users (#1867)
stevepiercy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
myst: | ||
html_meta: | ||
"description": "How to create an emergency user in an existing Zope instance" | ||
"property=og:description": "How to create an emergency user in an existing Zope instance" | ||
"property=og:title": "How to create an emergency user" | ||
"keywords": "Plone, Zope, users, emergency user, administration, pip, buildout" | ||
--- | ||
|
||
(admin-guide-zope-manager-user-label)= | ||
|
||
# Zope Manager Users | ||
|
||
Zope manager users have full access to the whole Zope instance. | ||
|
||
Some installation methods automatically create a zope `admin` user for you already. | ||
|
||
This guide explains how to add a Zope manager user to an existing Zope instance. | ||
|
||
There are multiple reasons why you might need to do that, such as: | ||
|
||
- Your installation method did not create one. | ||
- You lost access to your instance. | ||
- You inherited a project without proper documentation. | ||
|
||
```{note} | ||
If you need to regain access to your instance, this user is also referred to as an **emergency user**. | ||
``` | ||
|
||
```{note} | ||
The emergency user is a superuser with full access to the Zope instance. | ||
It is not limited to a specific Plone site. | ||
Please be aware of the security implications. | ||
You might want to change the passwords of the already existing manager users after you regained to your instance. | ||
``` | ||
|
||
(admin-guide-adding-a-new-zope-manager-user-label)= | ||
|
||
## Adding a New Zope Manager User | ||
|
||
There are multiple ways to create a Zope manager user. | ||
That depends on how you created and managed your Zope instance. | ||
|
||
```{important} | ||
If you are running a standalone instance, it must be stopped before adding the user. | ||
``` | ||
|
||
(admin-guide-using-the-adduser-instance-command-label)= | ||
|
||
### Using the `adduser` instance command | ||
|
||
If your site was installed with `buildout` and `plone.recipe.zope2instance`, you can add a Zope manager user via an instance script. | ||
|
||
Run the following command in the terminal: | ||
|
||
```bash | ||
$ bin/instance adduser username password | ||
Created user: username | ||
``` | ||
|
||
The name of the instance script might vary based on your installation. | ||
Replace `username` and `password` with the desired values. | ||
|
||
If the user already exists: | ||
|
||
- No user will be created | ||
- The password will not be changed | ||
|
||
The command will return a message like this: | ||
|
||
```bash | ||
$ bin/instance adduser foo baz | ||
Created user: None | ||
``` | ||
|
||
(admin-guide-using-the-addzopeuser-command-label)= | ||
|
||
### Using the `addzopeuser` command | ||
|
||
For `pip` based installations, you will have a script called `addzopeuser` in the `bin` directory of your virtual environment. | ||
|
||
The `addzopeuser` script might also be available in `buildout` based installations. | ||
|
||
Run in the terminal: | ||
|
||
```bash | ||
$ .venv/bin/addzopeuser -c path/to/etc/zope.conf username password | ||
User username created. | ||
``` | ||
|
||
The `addzopeuser` script and `zope.conf` locations might vary based on your installations. | ||
Replace `username` and `password` with the desired values. | ||
|
||
If the user already exists: | ||
|
||
- No user will be created | ||
- The password will not be changed | ||
|
||
The command will return a message like this: | ||
|
||
```bash | ||
$ .venv/bin/addzopeuser -c tmp/zeoclient/etc/zope.conf foo baz | ||
Got no result back. User creation may have failed. | ||
Maybe the user already exists and nothing is done then. | ||
Or the implementation does not give info when it succeeds. | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ install-pip | |
|
||
run-plone | ||
add-site | ||
add-emergency-user | ||
configure-zope | ||
add-ons | ||
export-import | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.