Skip to content

feat(core): Add option to disable creating an admin user when installing #53212

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 2 commits into from
Jun 10, 2025

Conversation

provokateurin
Copy link
Member

Summary

When using non-database backends it can be annoying being forced to create an admin user during the installation process. Admin users can still be created through LDAP, OIDC and so on, so it's really not necessary to have a user with a database backend. Having to create this admin user is an additional burden since a password needs to be set and it should neither be simple nor random.

I did not add this option to the web installer because I believe for a lot of people using the web installer it's the only way they are able to install Nextcloud (due to technical restrictions not abilities). Enabling this option would result in a "bricked" instance for them since there is no way they could create a user after installation in order to login.

Checklist

@provokateurin provokateurin added this to the Nextcloud 32 milestone May 30, 2025
@provokateurin provokateurin requested a review from a team as a code owner May 30, 2025 20:02
@provokateurin provokateurin requested review from Altahrim, nfebe and sorbaugh and removed request for a team May 30, 2025 20:02
@provokateurin provokateurin requested review from susnux and removed request for sorbaugh May 31, 2025 04:44
@susnux
Copy link
Contributor

susnux commented May 31, 2025

I did not add this option to the web installer because I believe for a lot of people using the web installer it's the only way they are able to install Nextcloud (due to technical restrictions not abilities).

👍 Makes sense because if you have a bad hoster without occ access you might get locked out with misconfiguration.

@provokateurin provokateurin requested a review from come-nc June 3, 2025 07:50
Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

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

You messed up the cli options.
Just add a flag to disable admin creation, do not change behavior of --admin-user and --admin-pass.

@provokateurin provokateurin force-pushed the feat/core/install-without-admin-user branch from 43caeb5 to 0a9fb0f Compare June 4, 2025 05:23
@provokateurin provokateurin requested a review from come-nc June 4, 2025 05:25
@provokateurin provokateurin force-pushed the feat/core/install-without-admin-user branch from 0a9fb0f to c4034b0 Compare June 6, 2025 07:48
@provokateurin provokateurin requested a review from come-nc June 6, 2025 07:49
@provokateurin
Copy link
Member Author

@come-nc I reverted some of the changes that were not necessary anymore. I did the casting because in a previous version I also ensured that no admin-user, admin-pass and admin-email values are passed if --disable-admin-user was passed

@provokateurin provokateurin force-pushed the feat/core/install-without-admin-user branch from c4034b0 to d11d5b7 Compare June 10, 2025 09:16
@provokateurin provokateurin enabled auto-merge June 10, 2025 09:16
@provokateurin provokateurin merged commit 3943f08 into master Jun 10, 2025
237 of 247 checks passed
@provokateurin provokateurin deleted the feat/core/install-without-admin-user branch June 10, 2025 11:58
provokateurin added a commit to provokateurin/nixpkgs that referenced this pull request Jun 20, 2025
…loud >= 32

With nextcloud/server#53212 it is not longer necessary to specify a username and password for an initial admin account during installation.
provokateurin added a commit to provokateurin/nixpkgs that referenced this pull request Jun 20, 2025
…loud >= 32

With nextcloud/server#53212 it is not longer necessary to specify a username and password for an initial admin account during installation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants