Web Admin Password Reset
On first launch, you create a web admin user in the web admin portal. If you forget these credentials, you will need to reset them via the command line.
This article goes over how to reset your web admin credentials in SFTP Gateway. This involves deleting all web admin users in the database. This re-triggers the first-launch experience, where you can create a new web admin user.
Delete all web admin users in the database
Step 1. SSH into the VM, and elevate your privileges to root:
Step 2. Change directories to
Step 3. Run the script to remove all web admin users:
If all goes well, you should see the word
Step 4. Refresh your browser, and the web admin portal should take you back to the first launch screen where you can create a new admin user.
For reference, here are the contents of the
#!/bin/bash sudo -u postgres psql -d sftpgw -c "BEGIN; \ DELETE \ FROM authorities \ WHERE user_id IN (select id from users where user_type = 'ADMIN'); \ DELETE FROM users \ WHERE user_type = 'ADMIN'; \ END;" echo "Admins have been cleared. Visit the admin web interface in your browser to create a new admin."
This runs a postgres command that deletes all admin users.