fang-hacks icon indicating copy to clipboard operation
fang-hacks copied to clipboard

Telnet/SSH password not working

Open tcmoreno opened this issue 8 years ago • 10 comments

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?

tcmoreno avatar Dec 03 '17 08:12 tcmoreno

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.

samtap avatar Dec 03 '17 14:12 samtap

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

tcmoreno avatar Dec 06 '17 14:12 tcmoreno

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?

samtap avatar Dec 06 '17 14:12 samtap

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

On Wed, Dec 6, 2017 at 9:28 AM, PatrickM [email protected] 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 .

ril3y avatar Dec 06 '17 14:12 ril3y

Not working yet, my snx_autorun.sh file looks like this screen shot 2017-12-06 at 15 48 00

tcmoreno avatar Dec 06 '17 14:12 tcmoreno

"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

samtap avatar Dec 06 '17 15:12 samtap

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

lanhed avatar Jan 10 '18 22:01 lanhed

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

On Wed, Jan 10, 2018 at 11:33 PM, Patric Lanhed [email protected] 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 .

tcmoreno avatar Jan 12 '18 14:01 tcmoreno

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.

scotttherobot avatar Jan 26 '18 05:01 scotttherobot

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).

icuye12 avatar Dec 16 '18 10:12 icuye12