Pass passwords to `occ maintenance:install` via files/stdin/env variables
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
Hej
I use this command to finish my installation:
sudo -u www-data php occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "root" --database-pass "password" --admin-user "admin" --admin-pass "password"
This is working perfectly fine. :-)
But as I want to script this I'd like to avoid adding visible password credentials of database user (root) in this script. MySQL has an option called -defaults-file to handle this. Is it poissible to use it with this 'occ command' as well?
If not, what possibilities do I have to reach the same result like the occ command?
Kind regards
/neph
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the occ maintenance:install entry point and how its database and admin password options are handled. Define the supported non-visible credential inputs from the issue and verify that scripted installation works without exposing passwords in command arguments or scripts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100