FreeTAKTeam / UI

FreeTAKServer Web User Interface project
MIT License
30 stars 27 forks source link

Default login doesn't work #39

Closed ixtenebrae closed 7 months ago

ixtenebrae commented 1 year ago

Finally figured out the config to get the Web UI not to throw errors at me. Now I'm trying to login with the default "admin" & "password" for the first login. It tells me "wrong user or password." I've looked inside FTSServer-UI.db and don't see ANY login information. I've been trying to look through the code on here to see where the initial username and password is set, but I can't find it. The output is:

(55296) wsgi starting up on http://192.168.50.XXX:5000
(55296) accepted ('192.168.50.XX', 2307)
(55296) accepted ('192.168.50.XX', 2308)
192.168.50.XX - - [12/Sep/2022 11:58:09] "GET / HTTP/1.1" 302 406 0.009471
192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /login HTTP/1.1" 200 10981 0.033868
192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/jarvis.css?r=78 HTTP/1.1" 200 4815 0.002203
192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/jarvis_red.css?r=92 HTTP/1.1" 200 4867 0.001406
(55296) accepted ('192.168.50.XX', 2309)
(55296) accepted ('192.168.50.XX', 2310)
192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/jarvis_grey.css?r=2 HTTP/1.1" 200 4917 0.001352
192.168.50.XXX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/global.css?r=94 HTTP/1.1" 200 23760 0.001249
Starting new HTTP connection (1): 192.168.50.XXX:8080
http://192.168.50.XXX:8080 "GET /AuthenticateUser?username=admin&password=password HTTP/1.1" 404 232
192.168.50.XX - - [12/Sep/2022 11:58:13] "POST /login HTTP/1.1" 200 10874 0.012816
192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/jarvis_red.css?r=49 HTTP/1.1" 200 4867 0.001497
192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/jarvis.css?r=12 HTTP/1.1" 200 4815 0.001263
192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/global.css?r=8 HTTP/1.1" 200 23760 0.001427
192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/jarvis_grey.css?r=98 HTTP/1.1" 200 4917 0.001757

XX is the client and XXX is the server. I am using it unsecure (for now). I installed from pip using the latest release.

brothercorvo commented 1 year ago

Ha e you installed fts using zeroTouch? If so the systwm has generated a password for you. If you have not written down the password you may need to repeat the process

On Tue., Sep. 13, 2022, 3:59 p.m. ixtenebrae, @.***> wrote:

Finally figured out the config to get the Web UI not to throw errors at me. Now I'm trying to login with the default "admin" & "password" for the first login. It tells me "wrong user or password." I've looked inside FTSServer-UI.db and don't see ANY login information. I've been trying to look through the code on here to see where the initial username and password is set, but I can't find it. The output is:

(55296) wsgi starting up on http://192.168.50.XXX:5000 (55296) accepted ('192.168.50.XX', 2307) (55296) accepted ('192.168.50.XX', 2308) 192.168.50.XX - - [12/Sep/2022 11:58:09] "GET / HTTP/1.1" 302 406 0.009471 192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /login HTTP/1.1" 200 10981 0.033868 192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/jarvis.css?r=78 HTTP/1.1" 200 4815 0.002203 192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/jarvis_red.css?r=92 HTTP/1.1" 200 4867 0.001406 (55296) accepted ('192.168.50.XX', 2309) (55296) accepted ('192.168.50.XX', 2310) 192.168.50.XX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/jarvis_grey.css?r=2 HTTP/1.1" 200 4917 0.001352 192.168.50.XXX - - [12/Sep/2022 11:58:09] "GET /static/assets/css/global.css?r=94 HTTP/1.1" 200 23760 0.001249 Starting new HTTP connection (1): 192.168.50.XXX:8080http://192.168.50.XXX:8080 "GET /AuthenticateUser?username=admin&password=password HTTP/1.1" 404 232 192.168.50.XX - - [12/Sep/2022 11:58:13] "POST /login HTTP/1.1" 200 10874 0.012816 192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/jarvis_red.css?r=49 HTTP/1.1" 200 4867 0.001497 192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/jarvis.css?r=12 HTTP/1.1" 200 4815 0.001263 192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/global.css?r=8 HTTP/1.1" 200 23760 0.001427 192.168.50.XX - - [12/Sep/2022 11:58:13] "GET /static/assets/css/jarvis_grey.css?r=98 HTTP/1.1" 200 4917 0.001757

XX is the client and XXX is the server. I am using it unsecure (for now). I installed from pip using the latest release.

— Reply to this email directly, view it on GitHub https://github.com/FreeTAKTeam/UI/issues/39, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPIAPM23LZZPSDCMOYFWSLV6DFJ7ANCNFSM6AAAAAAQLXDS6E . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ixtenebrae commented 1 year ago

Nope, did it with pip install.

HeroesLament commented 1 year ago

The pip install should be using admin/password by default for sure. I would like to dig deeper into this as there a few gremlins seemingly popping up with the UI installs.

I will put together a SQL command to check for what credentials the FTS API will accept.

HeroesLament commented 1 year ago

We can verify the current admin credentials as follows:

  1. Install sqlite3: sudo apt install sqlite3
  2. Open up the database: sudo sqlite3 /opt/FreeTAKServer.db
  3. Print the SystemUser table: SELECT * FROM SystemUser;

If you follow these steps, this will show you the current username and password for your admin user.

ixtenebrae commented 1 year ago

Well, missed something obvious that leads to another issue. The initial GET command to the server is returning a 404 error. So the AuthenticateUser script is AWOL, it seems. Which is more of a Server issue than the UI project.

brothercorvo commented 1 year ago

given the fact that we install the CORE + UI continuously without this issue, I tent to think that something in your installation / configuration is wrong. To figure this out we need more details on your installation and the error logs

HeroesLament commented 1 year ago

Well, missed something obvious that leads to another issue. The initial GET command to the server is returning a 404 error. So the AuthenticateUser script is AWOL, it seems. Which is more of a Server issue than the UI project.

Were you able to confirm the credentials were in fact admin/password or whatever you changed them to?

SCWhite commented 1 year ago

@ixtenebrae HI, I'm wondering, do you remember to run "FreeTAKServer" and "FreeTAKServer-UI" simultaneously ?

brothercorvo commented 7 months ago

closing this has has not been followed-up