Posted: Sat Sep 12, 2020 8:19 Post subject: I can’t login via FTP app to my router
Hello, since some months I have a trouble to login in to my R7800 via every FTP App, because I get this error:
“Subsystem request failed on channel 0”
I’m trying to fix it, I regenerated a new ssh key on my Mac, saved to the ssh keys under “services” in DD-WRT UI and now I can login without password from my Mac but I’m still unable to use any ftp app!
Hmmm but there isn’t a field where write the user/pswd in the page. I tried to edit the password file with VI by writing the password and saved but it doesn’t work too. Damn, with Kong’s build were a lot easier: it just connel wet cts
Maybe it’s more simple install SFTP with Optware, but if I install it once on the current build, I have to reinstall it every update?!
Under file sharing, there is an add user button. You click that and save, then enter user informatino save and apply.
The passwd file contains hashed passwords, so you would need to populate the correct hash, but be sure to populate the correct one (on my deployment the one that proftpd used is in a different location than the one regular one used).
Oh, what a stupid, I tried to add only the "share" and not the user (infact I was asking myself "where i have to put a username and password here?!" ) , now it works, thank you!
Joined: 05 Oct 2008 Posts: 666 Location: Helsinki, Finland / nr. Alkmaar, Netherlands
Posted: Mon Sep 14, 2020 8:33 Post subject:
Wildlion wrote:
Under file sharing, there is an add user button. You click that and save, then enter user informatino save and apply.
The passwd file contains hashed passwords, so you would need to populate the correct hash, but be sure to populate the correct one (on my deployment the one that proftpd used is in a different location than the one regular one used).
Do you suggest to swap the hashed password for the initially entered plain text password for the user added under in File Sharing?
I found a passwd file here:
root@WZR-HP-G300NH:/# cat /tmp/etc/passwd
It contains a line for the added user (NAS_user in my case, with only Samba ticked), but nothing that looks like a password, hashed or not:
NAS_user:*:1000:1000:NAS_user:/var:/bin/false
The first two lines of this file concern root and reboot. They do contain what might be a hashed password; the same for both.
BTW:
the last line in this file concerns crontabs, but it contains what looks like a typo:
crontabs:*:0:0:Contab User,,,:/var:/bin/false
Do you have more explicit information on this password issue?
a * or an x means that the password is being stored in a different file (the shadow file), I *think* if the shadow file is not present in this case then there is no password required.
Joined: 05 Oct 2008 Posts: 666 Location: Helsinki, Finland / nr. Alkmaar, Netherlands
Posted: Tue Sep 15, 2020 7:37 Post subject:
Wildlion wrote:
a * or an x means that the password is being stored in a different file (the shadow file), I *think* if the shadow file is not present in this case then there is no password required.
File tmp/etc/passwd doesn't contain the password for NAS_user, just an asterisk in its place. As I have set a password for this user and ticked samba access, the password must be stored elsewhere.
However, there is no /tmp/etc/shadow file.
Moreover, the smbpasswd file which I found is empty:
root@WZR-HP-G300NH:/# ls -la /tmp/var/samba
drwx------ 2 root root 0 Jan 1 1970 .
drwxr-xr-x 12 root root 0 Jan 1 1970 ..
-rw-r--r-- 1 root root 0 Jan 1 1970 smbpasswd
So it proved a bit elusive for the moment, which may be by design as we're talking about passwords.
Actually, I was only interested in the hashed password, because I was under the impression that you suggested one could enter the hashed password in the GUI instesd of the clear text password. I took this as a way of making it unreadable in any nvram backup files that one may have on disk. Now, I am probably being elusive ...
Actually, I was only interested in the hashed password, because I was under the impression that you suggested one could enter the hashed password in the GUI instesd of the clear text password. I took this as a way of making it unreadable in any nvram backup files that one may have on disk. Now, I am probably being elusive ...
Ooops my fault. I misunderstood. Via the GUI, no you have to enter the "clear text password". If DD-WRT is doing everything correctly it should hash the password before it ever saves it (and even should salt it so rainbow tables do not work). The only way not to would be to modify the file and provide your own hashed password.