"Unauthorised access" for admin user

Post Reply
Brutha
Newbie
Newbie
Posts: 6
Joined: Sat Jan 15, 2022 4:45 pm
Station model: GW1003
Software: WEEWX

"Unauthorised access" for admin user

Post by Brutha » Thu Jan 02, 2025 3:41 pm

Hi All,

I haven't really been keeping up with anything to do with my weather website for a while - it's mostly just been working very nicely as I wanted it for the last few years!

But recently I've been having issues with the website address - with newer versions of iOS and MacOS, it's pushing me to the https address instead of http. The http address works fine, but https doesn't.

So, I thought I'd start looking into it - but now I come to login to admin (the lock icon on bottom right of page) it won't let me: I get the message "Unauthorised access". I'm pretty sure I have the right password; if I use anything else I get a different message: "Unauthorized access! Incorrect password specified.".

Can anyone point me in the right direction to start moving forward? I'm on the older version of Meteotemplate (18.0) - this is one thing I also want to address!

Thanks!

User avatar
Jolumarali
Forecaster
Forecaster
Posts: 249
Joined: Sun Aug 20, 2017 2:06 pm
Location: Lignerolles
Station model: Vantage Vue
Software: WlIP
Contact:

Re: "Unauthorised access" for admin user

Post by Jolumarali » Thu Jan 02, 2025 4:42 pm

Find the FTP password in the config.php file ;)
Image
Station météo amateur Lignerolles
OS : Windows 11 Famille
Vantage Vue
Weatherlink 2.0 (WlIP)
Meteotemplate 18.0 Papaya

https://meteo-lignerolles.fr

José Luis

davidefa
Expert
Expert
Posts: 888
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: "Unauthorised access" for admin user

Post by davidefa » Thu Jan 02, 2025 5:25 pm

Also if you enabled the 'Additional Security' option in the main setup you are allowed to access the administrative pages only from the supplied adresses.
If this is the case and you can't login from those addresses anymore, I think you can edit the config.php script near line 152 and:
a) set $enableAdminIP to false ( so you can use any ip to access the admin panel )
or
b) set $adminIPs to the ip you are using now ( you can insert multiple ips separated by commas )

Code: Select all

$enableAdminIP = false;
$adminIPs = 'xxx.yyy.zzz.www';
adminip.png
adminip.png (125.51 KiB) Viewed 18738 times
Image

Brutha
Newbie
Newbie
Posts: 6
Joined: Sat Jan 15, 2022 4:45 pm
Station model: GW1003
Software: WEEWX

Re: "Unauthorised access" for admin user

Post by Brutha » Thu Jan 02, 2025 6:17 pm

Jolumarali wrote: Thu Jan 02, 2025 4:42 pm Find the FTP password in the config.php file ;)
Thanks - yes, in the meantime I had found a post about that, and checked the config.php - I am indeed using the correct password!

Brutha
Newbie
Newbie
Posts: 6
Joined: Sat Jan 15, 2022 4:45 pm
Station model: GW1003
Software: WEEWX

Re: "Unauthorised access" for admin user

Post by Brutha » Thu Jan 02, 2025 6:17 pm

davidefa wrote: Thu Jan 02, 2025 5:25 pm Also if you enabled the 'Additional Security' option in the main setup you are allowed to access the administrative pages only from the supplied adresses.
If this is the case and you can't login from those addresses anymore, I think you can edit the config.php script near line 152 and:
a) set $enableAdminIP to false ( so you can use any ip to access the admin panel )
or
b) set $adminIPs to the ip you are using now ( you can insert multiple ips separated by commas )

Code: Select all

$enableAdminIP = false;
$adminIPs = 'xxx.yyy.zzz.www';

adminip.png
Thanks - yes, was already false that one it seems, so does't help unfortunately!

davidefa
Expert
Expert
Posts: 888
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: "Unauthorised access" for admin user

Post by davidefa » Thu Jan 02, 2025 9:12 pm

You can try using this authorize.php script ( extract it in the admin folder it will overwrite the existing script ).
I've only commented out lines 40-42, so you should be able to login after providing the admin password.

P.S.
Which php version are you using?
Attachments
authorize.zip
(927 Bytes) Downloaded 416 times
Image

Brutha
Newbie
Newbie
Posts: 6
Joined: Sat Jan 15, 2022 4:45 pm
Station model: GW1003
Software: WEEWX

Re: "Unauthorised access" for admin user

Post by Brutha » Fri Jan 03, 2025 4:24 pm

Thanks! Will give that a try once work stop pinging me :)

I'm on 7.4 I believe.

Post Reply