Web login fails, ssh login (with admin user) still works

Mindspeed Comcerto 2000 based
Post Reply
User avatar
RokerHRO
Posts: 6
Joined: Fri Sep 29, 2017 10:38 am
Location: Hamburg, Germany
Contact:

Web login fails, ssh login (with admin user) still works

Post by RokerHRO » Fri Dec 29, 2017 10:46 am

I cannot login via webbrowser to my NAS542 anymore: "Der Benutzername oder das Passwort ist falsch".

The same password still works for admin's ssh connection (and "su -" to get root also works with the same password).

Does anyone of you have an idea what went wrong, or better: how to fix that? :-)

Lars R.

Mijzelf
Posts: 6206
Joined: Mon Jun 16, 2008 10:45 am

Re: Web login fails, ssh login (with admin user) still works

Post by Mijzelf » Fri Dec 29, 2017 11:32 am

Somehow your password hash got corrupted. The firmware only stores the hashes, not the passwords itself. (Which is good). Problem is, that the shell login hash is incompatible with the samba hash. (The webinterface uses the samba hash, through a PAM plugin.)
So for root and admin (the only users with shell access) two hashes are stored. And apparently one is corrupted.

On boot the hash is copied from some internal database in flash to /etc/shadow and /etc/samba/smbpasswd, which files are actually used.

So to get access to the webinterface, you'll have to change the hash in /etc/samba/smbpasswd, which is easy, just execute

Code: Select all

smbpasswd admin
Now you can login in the webinterface. Change the password in the webinterface to push the new hash to the internal database.

User avatar
RokerHRO
Posts: 6
Joined: Fri Sep 29, 2017 10:38 am
Location: Hamburg, Germany
Contact:

Re: Web login fails, ssh login (with admin user) still works

Post by RokerHRO » Tue Jan 02, 2018 4:53 pm

Mijzelf wrote: So to get access to the webinterface, you'll have to change the hash in /etc/samba/smbpasswd, which is easy, just execute

Code: Select all

smbpasswd admin
Now you can login in the webinterface. Change the password in the webinterface to push the new hash to the internal database.
I found that already via Google search. It did not help. But my NAS reboots from time to time anyway (I don't know why but it is annoying), and after the reboot the web login works again with the old password that was still stored in my web browser (and not the one I set via smbpasswd in the shell).

Bizarre. :-/

I'd really like to change that crappy firmware on the NAS by a plain Debian Linux or the like. Okay, than I have no longer that shiny (but awkwardly slow) web GUI, but I can configure users, services and access rights much faster and more flexible.

Another example: At the moment I have NFS enabled, but via NFS I got different directories than via SMB/CIFS. Completely stupid and unusable. Backups via rsync does not work, webdav is painfully slow and buggy (the connection resets at random) and so on...

*sigh*

Mijzelf
Posts: 6206
Joined: Mon Jun 16, 2008 10:45 am

Re: Web login fails, ssh login (with admin user) still works

Post by Mijzelf » Tue Jan 02, 2018 6:05 pm

Here you can find a long thread about installing Debian on a NAS5xx. Unfortunately using the same kernel, as there is no support for this SoC in the vanilla.

User avatar
RokerHRO
Posts: 6
Joined: Fri Sep 29, 2017 10:38 am
Location: Hamburg, Germany
Contact:

Re: Web login fails, ssh login (with admin user) still works

Post by RokerHRO » Wed Jan 03, 2018 8:29 am

Mijzelf wrote:Here you can find a long thread about installing Debian on a NAS5xx. Unfortunately using the same kernel, as there is no support for this SoC in the vanilla.
Oh, that looks nice! :-)

Thank you!

Next weekend I'll try it out. \o/

L.

Post Reply