1
0

setup-sso-nc.sh 1.2 KB

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. set -e
  3. AUTH=${1:-"smb::kerberosapache"}
  4. 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
  5. docker exec --user 33 apache ./occ config:system:set trusted_domains 1 --value 'httpd.domain.test'
  6. # setup user_saml
  7. docker exec --user 33 apache ./occ app:enable user_saml --force
  8. docker exec --user 33 apache ./occ config:app:set user_saml type --value 'environment-variable'
  9. docker exec --user 33 apache ./occ saml:config:create
  10. docker exec --user 33 apache ./occ saml:config:set 1 --general-uid_mapping=REMOTE_USER
  11. # create user
  12. docker exec -e OC_PASS=test --user 33 apache ./occ user:add 'testuser@DOMAIN.TEST' --password-from-env
  13. # setup external storage
  14. docker exec --user 33 apache ./occ app:enable files_external --force
  15. docker exec --user 33 apache ./occ files_external:create smb smb "$AUTH"
  16. docker exec --user 33 apache ./occ files_external:config 1 host krb.domain.test
  17. docker exec --user 33 apache ./occ files_external:config 1 share netlogon
  18. docker exec --user 33 apache ./occ files_external:list