1
0

setup-sso-nc.sh 1.3 KB

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. #
  3. # SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. #
  6. set -e
  7. docker exec --user 33 apache ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
  8. docker exec --user 33 apache ./occ config:system:set trusted_domains 1 --value 'httpd.domain.test'
  9. # setup user_saml
  10. docker exec --user 33 apache ./occ app:enable user_saml --force
  11. docker exec --user 33 apache ./occ config:app:set user_saml type --value 'environment-variable'
  12. docker exec --user 33 apache ./occ saml:config:create
  13. docker exec --user 33 apache ./occ saml:config:set 1 --general-uid_mapping=REMOTE_USER
  14. # create user
  15. docker exec -e OC_PASS=test --user 33 apache ./occ user:add 'testuser@DOMAIN.TEST' --password-from-env
  16. # setup external storage
  17. docker exec --user 33 apache ./occ app:enable files_external --force
  18. docker exec --user 33 apache ./occ files_external:create smb smb smb::kerberosapache
  19. docker exec --user 33 apache ./occ files_external:config 1 host krb.domain.test
  20. docker exec --user 33 apache ./occ files_external:config 1 share netlogon
  21. docker exec --user 33 apache ./occ files_external:list