Skip to content
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

add notes to create an emergency user #1703

Open
wants to merge 7 commits into
base: 6.0
Choose a base branch
from
Open

Conversation

1letter
Copy link
Contributor

@1letter 1letter commented Sep 12, 2024

i created a subdirectory for users and groups and add a file with a short description to create an emergency user in a pip and buildout based installation of Plone.


📚 Documentation preview 📚: https://plone6--1703.org.readthedocs.build/

@1letter 1letter linked an issue Sep 12, 2024 that may be closed by this pull request
@1letter
Copy link
Contributor Author

1letter commented Sep 12, 2024

@stevepiercy can you check wording and spelling please?

Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged content from Plone 5 documentation, and added an introduction for each scenario.

There was one sentence remaining that confuses me. Please see my review comment. Thank you!

An emergency user is one that you can use to regain administrative access to a Plone site.
If you lose the administrator password, or you inherit a project without proper documentation, you can create an emergency user.

First of all, do the following steps not in a production environment!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would someone do in a Production environment? Are they out of luck?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, you can do this operations in a production env, but you should not do this. ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should someone do in production instead? We can't say "don't do this", then in the next section say "do this". It's very confusing.

Perhaps you can include what are the consequences and risks of doing this in production, aside from the obvious, specifically that the site will be down while adding the emergency user.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1letter can you answer the following questions? I want to move this PR forward.

  1. What should someone do in production instead?
  2. If someone does this in production, what are the risks?
  3. In which environments is it OK to do this?

@stevepiercy
Copy link
Contributor

@stevepiercy
Copy link
Contributor

The failing linkcheck for Docker Linux install can be ignored, as I fixed it in #1704.

@robgietema for https://nickcms.org, can you check its status? linkcheck says it is not responding. Alternatively, should I use https://docs.nickcms.org/ or https://github.com/robgietema/nick? Please advise.


```{important}
You should always stop your Plone site before adding a new user.
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? This is only necessary if the site uses a ZODB filestorage directly without using ZEO or Relstorage (then the storage is locked and can't be accessed by multiple processes at once).

```shell
./venv/bin/instance stop
./venv/bin/addzopeuser -c instance/etc/zope.conf <user> <password>
./venv/bin/instance start
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that Plone was installed into a Python virtualenv in the venv directory. That may or may not be the case.

It also assumes there is a script named instance, which is not usually the case when Plone was installed using pip.

bin/instance stop
bin/instance adduser <user> <password>
bin/instance start
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes the buildout includes a plone.recipe.zope2instance section named instance. That may or may not be the case.

@stevepiercy
Copy link
Contributor

@1letter would you please respond to @davisagli's suggestions?

Let's get this finished and published!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should now go in docs/admin-guide and be linked under the "Operate" heading of https://6.docs.plone.org/admin-guide/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add instructions to create an emergency user
3 participants