drakkan / sftpgo

Full-featured and highly configurable SFTP, HTTP/S, FTP/S and WebDAV server - S3, Google Cloud Storage, Azure Blob
https://sftpgo.com
GNU Affero General Public License v3.0
8.68k stars 703 forks source link

Docker SFTPGo - 2.0.1 uncorrectly read /etc/sftpgo/httpauth #310

Closed skoriy88 closed 3 years ago

skoriy88 commented 3 years ago

When using /etc/sftpgo/httpauth mounted to docker image and user/password created by sudo htpasswd -B -c /etc/sftpgo/httpauth sftpgoweb, during login to web admin receive error "not found: sql: no rows in result set"

SFTPGo - 2.0.1

drakkan commented 3 years ago

Hi,

this seems a duplicate of #306 httpauth for web admin is gone, please login using the default user ("admin"/"password") and create other administrators from the web admin interface.

httpauth is now supported only for the telemetry server. Please let me know if I forgot to update the docs somewhere, thank you

skoriy88 commented 3 years ago

Oh, thanks! So is there any way to set up web admin password without first login? Maybe I can use some script or etc? I use the sftpgo docker in my infra and previous it was a very nice possibility to set up an admin password during infrastructure deployment. Thanks a lot for your great job!

drakkan commented 3 years ago

Hi,

if you are using the memory provider you can include your admins inside the dump, for example:

{"users":[],"folders":[],"admins":[{"id":1,"status":1,"username":"admin","password":"$argon2id$v=19$m=65536,t=1,p=2$cV3kU/yC9jmdLOxOFdsc2Q$J+n24soAOcYBrlH8w7q7sSdJKNJ8efCuM+x5gnSuO+I","email":"","permissions":["*"],"filters":{}}],"version":6}

for any other provider you can use the --loaddata-from serve option but you need to update to this commit, admins were ignored before, sorry

skoriy88 commented 3 years ago

Thanks for your support!