Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
E
ecloud-selfhosting
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
e
infra
ecloud-selfhosting
Commits
014865ea
Commit
014865ea
authored
Nov 06, 2019
by
Felix Ableitner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve delete-account script and documentation
parent
87a1584f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
13 deletions
+17
-13
docs/delete-account.md
docs/delete-account.md
+3
-10
scripts/delete-account.sh
scripts/delete-account.sh
+14
-3
No files found.
docs/delete-account.md
View file @
014865ea
Delete User Cccount
-------------------
1.
Delete email account and data
-
login to mail.$DOMAIN
-
click on domain list
-
select the correct domain
-
search for the username on the top right
-
delete the correct account
2.
delete nextcloud account
1.
Delete email account, Nextcloud account and all data
-
`ssh user@$DOMAIN`
-
`cd /mnt/repo-base/`
-
`sudo
docker-compose exec -u www-data nextcloud php occ user:delete user@$DOMAIN
`
-
`sudo
./scripts/delete-account $USER
`
4
.
onlyoffice data
2
.
onlyoffice data
-
go to
[
https://office.$DOMAIN/products/people/#sortorder=ascending
](
https://office.$DOMAIN/products/people/#sortorder=ascending
)
-
search for the username
-
click on the arrow at the far right and press "Delete profile"
scripts/delete-account.sh
View file @
014865ea
...
...
@@ -5,8 +5,19 @@ source /mnt/repo-base/scripts/base.sh
ACCOUNT
=
$1
docker-compose
exec
-T
-u
www-data nextcloud php occ user:delete
"
$ACCOUNT
"
if
!
docker-compose
exec
-T
-u
www-data nextcloud php occ user:info
"
$ACCOUNT
"
|
grep
"
$ACCOUNT
"
--quiet
;
then
echo
"Error: The account
$ACCOUNT
does not exist"
exit
fi
docker-compose
exec
-T
postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox delete
"
$ACCOUNT
"
echo
"Please confirm to delete the user account
$ACCOUNT
including all data. This is not reversible."
read
-r
-p
"[y/N] "
response
if
[[
$response
=
~ ^
([
yY][eE][sS]|[yY]
)
$
]]
;
then
echo
"Deleting Nextcloud account"
docker-compose
exec
-T
-u
www-data nextcloud php occ user:delete
"
$ACCOUNT
"
# TODO: delete onlyoffice account???
echo
"Deleting email account"
docker-compose
exec
-T
postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox delete
"
$ACCOUNT
"
# TODO: delete onlyoffice account???
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment