samtap / fang-hacks

Collection of modifications for the XiaoFang WiFi Camera
1.67k stars 340 forks source link

Telnet/SSH password not working #273

Open tcmoreno opened 6 years ago

tcmoreno commented 6 years ago

Hi, I have been able to install without issues the fang hacks and using my camera with RTSP. Version is 3.0.3.56

However I cannot access the camera via SSH/Telnet. I get password error (root/ismart12). On the other side FTP works perfectly. Any idea of what can be happening?

samtap commented 6 years ago

If you updated to latest version possibly the root password is changed. Happened to one of my cams (but not on others, no idea why). Can you run commands using the snx_autorun.sh script? You could put a passwd command in there to change it.

tcmoreno commented 6 years ago

I will try that way, should look like this? echo "password" | passwd --stdin root

samtap commented 6 years ago

Use this: echo -e "password\npassword" | passwd I'm curious what the changed passwd is, so could you add something like cp /etc/shadow /media/mmcblk0p1 before that, to copy the passwd hash file to sdcard?

ril3y commented 6 years ago

Can you get the new iSCS binary file too once on?

On Wed, Dec 6, 2017 at 9:28 AM, PatrickM notifications@github.com wrote:

Use this: echo -e "password\npassword" | passwd I'm curious what the changed passwd is, so could you add something like cp /etc/shadow /media/mmcblk0p1 before that, to copy the passwd hash file to sdcard?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/273#issuecomment-349655230, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOJMyV0QTY8bAiJDbg80t__BDOqxCO0ks5s9qR-gaJpZM4Qzot7 .

tcmoreno commented 6 years ago

Not working yet, my snx_autorun.sh file looks like this

screen shot 2017-12-06 at 15 48 00
samtap commented 6 years ago

"Not working" doesn't tell me anything. Does it not run the script? Is the shadow file copied? Does it output any errors? Append >> /tmp/hacks.log 2>&1 to redirect output to log and cp /tmp/hacks.log /media/$MDEV to copy log to sdcard. Remove other stuff not needed. You need to be on older fw as the new fw versions don't run snx_autorun.sh

lanhed commented 6 years ago

Any luck extracting that password yet? I have the same setup and can't use ssh.

tcmoreno commented 6 years ago

Nope, I gave it up :-( Good luck with it...

On Wed, Jan 10, 2018 at 11:33 PM, Patric Lanhed notifications@github.com wrote:

Any luck extracting that password yet? I have the same setup and can't use ssh.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samtap/fang-hacks/issues/273#issuecomment-356759951, or mute the thread https://github.com/notifications/unsubscribe-auth/ABHocbJUM6jzix0HBnRSj6F3mkkZn12xks5tJTqwgaJpZM4Qzot7 .

scotttherobot commented 6 years ago

I had this problem with one of my four cameras. It came out of the box with an unknown version of the firmware which refused to run the snx_autorun.sh, so I ended up downgrading it to an earlier firmware. In the spirit of contributing, I added the following to snx_autorun.sh:

cp /etc/shadow /media/mmcblk0p1/. >> /tmp/hacks.log 2>&1
cp /tmp/hacks.log /media/mmcblk0p1/.

In the resulting log file, I saw

cp: can't stat '/etc/shadow': No such file or directory

Huh. My camera didn't have a shadow file? Weird. But since I have three other working cameras, I was able to recover. I moved the SD card from the fickle camera to my computer and I used SCP to copy the shadow file from one of my working cameras to the sd card:

scp root@<IP-Address>:/etc/shadow shadow

Then, I edited snx_autorun.sh once again:

cp /media/mmcblk0p1/shadow /etc/shadow >> /tmp/hacks.log 2>&1

I put the SD card back into the camera, rebooted the camera a couple of times, et voilà! I can now SSH in using the root/ismart12 username/password combo.

icuye12 commented 5 years ago

Hi ,I have the same problem. But I deleted the file in /etc/init.d/videomdprob.sh. so who can get me the videomdprob.sh file. I can not to login the system.by (root/ismart12).