GL_inet1800 SSH access denied after wrong chsh command

When I changed the default ssh shell of the GL-INETAX1800 to bash I could not login anymore.
I did this:

root@glinetax1800:~# chsh
Changing the login shell for root
Enter the new value, or press ENTER for the default
	Login Shell [/bin/ash]: bash
chsh: Warning: bash does not exist
root@glinetax1800:~# 
Connection to glinetax1800.local closed.

Then I logged on again and suddenly it asks for a password and it refused my password. Probably due that it did accept the wrong shell bash without a prepending path.

armemac:~/scratch % ssh root@glinetax1800.local /bin/bash
root@glinetax1800.local's password: 
Permission denied, please try again.

So, despite the message chsh: Warning: bash does not exist I suppose that it did change the default shell and it cannot find bash without a prepending path. But I cannot access the root folder anymore. What can I do to repair this ?

If you can still login using luci, you can try to fix it there.

If even this won't work, resetting the router might be the fastest way to get it back to life.

That is what I already did.
I saw in Luci a page https://glinetax1800.local/cgi-bin/luci/admin/system/flash where I can make a backup. I did that and unpacked the .tar.gz which contains all files in /etc.
Then I checked /etc/passwd which indeed showed the screwed up line for root:

root:x:0:0:root:/root:bash

So restore this line to the original root:x:0:0:root:/root:/bin/ash, then repack the .tar.gz and restore the config ?
Or even keeping only the file /etc/passwd in the backup file ?
Did anyone this before ?

Anyway, my router works normally, but I just locked out ssh access due to my stupid mistake.

Yeah, would be the way I would try.

I tried this and it worked !
I made a backupo, modified /etc/passwd with the correct line, packed the entire folder and restored and SSH access worked again.

Great to hear! :slight_smile: