Problem
Attempting to delete user via mmctl user delete fails with an error.
Environment
Mattermost Server with mmctl installed.
Diagnosis
ahmaddanial@mattermost:/opt/mattermost$ mmctl user delete ahmad.danial@mattermost.com
WARNING: server version 5.29.0.5.29.0.45a60588b1ed9e0018bed1e1377071b9.true doesn't match mmctl version 5.28.0
Have you performed a database backup? (YES/NO):
YES
Are you sure you want to delete the users specified? All data will be permanently deleted? (YES/NO):
YES
Unable to delete user 'ahmad.danial' error: : Permanent user deletion feature is not enabled. Please contact your System Administrator.,
Cause
The EnableAPIUserDeletion is set to false
.
Resolution
Make the change to the parameter via config.json
to set it to true
before running the mmctl user delete
command again:
ahmaddanial@mattermost:/opt/mattermost$ mmctl user delete ahmad.danial@mattermost.com
WARNING: server version 5.29.0.5.29.0.45a60588b1ed9e0018bed1e1377071b9.true doesn't match mmctl version 5.28.0
Have you performed a database backup? (YES/NO):
YES
Are you sure you want to delete the users specified? All data will be permanently deleted? (YES/NO):
YES
Deleted user 'ahmad.danial'