This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Lost password
#1
Hello,

I've lost the password file for several LM-s that I installed last summer. 
Is there any way to recover the password? Maybe login over serial console?

I have the backup files (*.tar.gz) for them intact.
Reply
#2
Hi
Sorry only HW factory reset. If you have backup you can restore project.
BR
Reply
#3
(10.08.2018, 15:32)Daniel. Wrote: Hi
Sorry only HW factory reset. If you have backup you can restore project.
BR

Backup is with forgotten password in it. Or the password doesn't goes into backup?
Reply
#4
No admin pass in backup. Old fw did contain user passwords as plain text but in latest even this is encrypted.
Reply
#5
(10.08.2018, 15:48)Daniel. Wrote: No admin pass in backup. Old fw did contain user passwords as plain text but in latest even this is encrypted.

Ah, thanks!

Any way to login via serial console?
Reply
#6
If you can connect SD card to Linux then it's possible to set password via config file edit.
Reply
#7
(10.08.2018, 16:34)admin Wrote: If you can connect SD card to Linux then it's possible to set password via config file edit.

That was my next question.

So I've mounted the SD-card (I don't have the actual card with me, this is one that went read only), and...

Code:
/etc/httpd.conf
/cgi-bin/flashsys/:admin:$1$$Sde5XDOHY.2lYrKCR7Gbr.
/cgi-bin/scada/:admin:$1$$Sde5XDOHY.2lYrKCR7Gbr.
/cgi-bin/scada-remote/:admin:$1$$Sde5XDOHY.2lYrKCR7Gbr.
/cgi-bin/scada-remote/:remote:$1$$Bj7xk3bdiIWoVguAr/ugf.

looks like the winner.

Is this MD5 or SHA-1? Can I just copy the above pasted hash?

/etc/shadow doesn't contain the hash for admin
Reply
#8
You have to edit /etc/config/httpd
Set password in plain text, it will get hashed during next boot
Reply
#9
(10.08.2018, 17:43)admin Wrote: You have to edit /etc/config/httpd
Set password in plain text, it will get hashed during next boot

Thanks! I'll try that tomorrow.
Reply
#10
For future reference:

If you lost your password do the following:

- Take out the SD-card
- Mount it on any linux system (parttition 2)
- Edit /etc/config/httpd:
Code:
config user 'admin'
       option password 'ThisIsYourNewPassword'
- Unmount, put back the SD--card
- Login as admin with password ThisIsYourNewPassword
- Done!

On older versions the file is located in /etc/httpd.conf and looks a bit differently
Reply


Forum Jump: