Unable to reset OpenLiteSpeed WebAdmin Console password

mica

New Member
#1
I've made multiple attempts via both /usr/local/lsws/admin/misc/admpass.sh and /usr/local/lsws/admin/misc/lsup.sh -a, always receiving the confirmation:
Administrator's username/password is updated successfully!
But attempting to log in produces an error:
Invalid credentials.
As per a suggestion on my StackOverflow post, I checked the hash via cat /usr/local/lsws/admin/conf/htpasswd before and after resetting, and it is changing, but still doesn't work on the WebAdmin login page.
 

Cold-Egg

Administrator
#2
Hi,

May I know which OpenLiteSpeed version it is? And please raise a ticket with litespeed for support if you can reproduce it.

Best,
Eric
 

ploink

New Member
#4
I just encountered the same issue with an OLS install on a Vagrant Bento/Ubuntu-18.04 box.
(I did a fresh install following these instructions: https://openlitespeed.org/kb/install-ols-from-litespeed-repositories/)

My server error log (/usr/local/lsws/logs/error.log) revealed permission problems:

[NOTICE] [(serverip):51533:HTTP2-45#_AdminVHost] [STDERR] PHP Warning: fopen(/usr/local/lsws/admin/conf/htpasswd): failed to open stream: Permission denied in /usr/local/lsws/admin/html.open/lib/CAuthorizer.php on line 227


Solution for me was to change/open up permissions for htpasswd from 600 to 644, i.e.

chmod 644 /usr/local/lsws/admin/conf/htpasswd
 

David

Active Member
#6
Normal installation should be 600. But the own is lsadm/lsadm.
And lsadm should belong to two groups.

root@ubuntu-s-DDD:/usr/local/lsws/admin/conf# ll
total 76
drwxr-xr-x 2 lsadm lsadm 4096 May 11 13:41 ./
drwxr-xr-x 9 root root 4096 May 11 13:41 ../
-rw-r--r-- 1 lsadm lsadm 648 May 8 00:46 admin_config.conf
-rw-r--r-- 1 root root 648 May 11 13:41 admin_config.conf0
-r--r--r-- 1 root root 871 May 11 13:41 admin_config.conf0,v
-rw------- 1 lsadm lsadm 41 May 11 13:42 htpasswd
-rw------- 1 lsadm lsadm 529 May 8 00:46 jcryption_keypair
-rw-r--r-- 1 lsadm lsadm 38186 May 8 00:46 php.ini
-r-------- 1 lsadm lsadm 1257 May 11 13:41 webadmin.crt
-r-------- 1 lsadm lsadm 1675 May 11 13:41 webadmin.key
root@ubuntu-s-DDD:/usr/local/lsws/admin/conf# id lsadm
uid=997(lsadm) gid=998(lsadm) groups=998(lsadm),65534(nogroup)

Can you tell me how did you install it?
 

KRV

New Member
#10
Today we have absolute the same situation. /tmp directory grew to a huge size and logging into the WebAdmin console constantly failed due to an incorrect credentials. I think this should be mentioned in the official OpenLiteSpeed documentation so that users can avoid unnecessary actions. Because all they had to do was to empty the /tmp folder.
 
#11
I need help troubleshooting please @Cold-Egg .
I have the same problem as stated here: https://forum.openlitespeed.org/threads/unable-to-login-to-openlitespeed-admin-gui.5850/
I get the login.php screen with Invalid credentials already printed to the login screen.

When I enter the admin login details I set with the script the button stays still and nothing happens.

How do I go about troubleshooting?
I build OLS with a custom script in a custom prefixed location: https://github.com/unypkg/openlitespeed
I tried building the minimal php (admin_php and lsphp in the fcgi-bin folders) as 7.4 and 8.2, both have the same thing happen.
Do I need to download the litespeed php package from your closed sources for it to work, is it a ownership problem of some folders or files?
The developer documentation is really lacking making things difficult.

Any help and documentation for package maintainers would be really appreciated!
 

Cold-Egg

Administrator
#12
Hi,
Since you built your own OLS and PHP, it might due to the permission issue somewhere. If you have another VPS, please install OLS from LiteSpeed repo and compare the folder & file permissions.
 
#13
Thanks @Cold-Egg !
Unfortunately changing around permissions didn't help. So I thought it must be that the repo install uses HTTPS. Copied over the admin/conf folder and rerun admpass.sh. Still no luck, I get the following error:

Code:
Warning: fopen(/uny/pkg/openlitespeed/1.8.1/admin/conf/htpasswd): failed to open stream: Permission denied in /uny/pkg/openlitespeed/1.8.1/admin/html.1.8.1/lib/CAuthorizer.php on line 237
So I changed the mode and permission of the htpasswd file around a lot, to root, to lsadm, to unyweb (my webserver user). No luck.
Any ideas will be appreciated!
 
Top