Page 1 of 1

"Unauthorised access" for admin user

Posted: Thu Jan 02, 2025 3:41 pm
by Brutha
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!

Re: "Unauthorised access" for admin user

Posted: Thu Jan 02, 2025 4:42 pm
by Jolumarali
Find the FTP password in the config.php file ;)

Re: "Unauthorised access" for admin user

Posted: Thu Jan 02, 2025 5:25 pm
by davidefa
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 18737 times

Re: "Unauthorised access" for admin user

Posted: Thu Jan 02, 2025 6:17 pm
by Brutha
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!

Re: "Unauthorised access" for admin user

Posted: Thu Jan 02, 2025 6:17 pm
by Brutha
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!

Re: "Unauthorised access" for admin user

Posted: Thu Jan 02, 2025 9:12 pm
by davidefa
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?

Re: "Unauthorised access" for admin user

Posted: Fri Jan 03, 2025 4:24 pm
by Brutha
Thanks! Will give that a try once work stop pinging me :)

I'm on 7.4 I believe.