2014-08-26 21:15:09 +00:00
|
|
|
#!/bin/bash
|
2014-09-03 15:02:09 +00:00
|
|
|
#
|
2017-04-02 09:19:21 +00:00
|
|
|
# This script will give you administrative access to the Nextcloud
|
2014-09-03 15:02:09 +00:00
|
|
|
# instance running here.
|
|
|
|
#
|
|
|
|
# Run this at your own risk. This is for testing & experimentation
|
|
|
|
# purpopses only. After this point you are on your own.
|
2014-08-26 21:15:09 +00:00
|
|
|
|
|
|
|
source /etc/mailinabox.conf # load global vars
|
|
|
|
|
2023-10-01 05:13:27 +00:00
|
|
|
ADMIN=$(./management/cli.py user admins | head -n 1)
|
|
|
|
test -z "$1" || ADMIN=$1
|
2014-08-26 21:15:09 +00:00
|
|
|
|
|
|
|
echo I am going to unlock admin features for $ADMIN.
|
|
|
|
echo You can provide another user to unlock as the first argument of this script.
|
2017-04-02 09:19:21 +00:00
|
|
|
echo
|
|
|
|
echo WARNING: you could break mail-in-a-box when fiddling around with Nextcloud\'s admin interface
|
2014-08-26 21:15:09 +00:00
|
|
|
echo If in doubt, press CTRL-C to cancel.
|
2023-10-01 05:13:27 +00:00
|
|
|
echo
|
2014-08-26 21:15:09 +00:00
|
|
|
echo Press enter to continue.
|
|
|
|
read
|
|
|
|
|
2022-06-19 11:12:02 +00:00
|
|
|
sudo -u www-data php$PHP_VER /usr/local/lib/owncloud/occ group:adduser admin $ADMIN && echo Done.
|