setup-sso-nc.sh 1.2 KB

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