Use Nextcloud’s occ command to unlock the admin (#1406)
authorPascal Garber <pascal@jumplink.eu>
Wed, 25 Jul 2018 19:37:09 +0000 (21:37 +0200)
committerJoshua Tauberer <jt@occams.info>
Wed, 25 Jul 2018 19:37:09 +0000 (15:37 -0400)
tools/owncloud-unlockadmin.sh

index 6a74d19..50e3b01 100755 (executable)
@@ -20,4 +20,4 @@ echo
 echo Press enter to continue.
 read
 
-sqlite3 $STORAGE_ROOT/owncloud/owncloud.db "INSERT OR IGNORE INTO oc_group_user VALUES ('admin', '$ADMIN')" && echo Done.
+sudo -u www-data php /usr/local/lib/owncloud/occ group:adduser admin $ADMIN && echo Done.