Dahua Enable Telnet

nayr

IPCT Contributor
Jul 16, 2014
9,229
5,328
Denver, CO
Far too easy:
  • Enable Telnet w/API Call (login with your admin account when prompted):
    Code:
    http://<ip-address>/cgi-bin/configManager.cgi?action=setConfig&Telnet.Enable=true
  • Login: telnet <ip-address>
    • Username: admin
    • Password: 7ujMko0<YOURADMINPASSWORD>
      • example: admin password ipcamtalk then use the password: 7ujMko0ipcamtalk


source: http://www.bahamassecurity.com/cctvforum/forum_posts.asp?TID=313

** NOTE ** This has to be performed at each boot; its not permanent.
 
Last edited:
Tried to do so and get an error:
"Error
ErrorID=0, Detail=Invalid Authority!"
 
what device? it's worked on mine
 
what device? it's worked on mine
I tried to do so directly to my 4208-4K NVR ... But I'm maybe wrong ... Work only for cams?

PS/ Nayr I see that you own both HFW4421D-AS 4MP and HFW4431M-AS-I2 4MP. I just created a thread to help me choosing between the two, if you have time to help...
 
works on my 4216-4k nvr
Code:
$# telnet 192.168.42.19
Trying 192.168.42.19...
Connected to 192.168.42.19.
Escape character is '^]'.


(none) login: admin
Password: 

~ # cat /proc/cpuinfo 
processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2996.63
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0


processor       : 1
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2989.26
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0


Hardware        : STi SoC with Flattened Device Tree
Revision        : 0000
Serial          : 0000000000000000
 
Ok found my error.
Thr first time you enable Telnet through web browser, a pop up window requests login and password. This first login is admin and the normal admin password.
Then when using telnet, have to use 7ujMko0<Password>.
Works great now! Thank you Nayr.
 
IIRC bahamassecurity.com is Rory's site. There's a guy with a lot of CCTV experience. Longtime analog fan.
 
  • Like
Reactions: RyanODan
Thank you for this info.
Just out of curiosity,...what would the advantages of telnet access be?
I can think of:
- more advanced upgrade functionality
- more advanced recovery (eg in case of bad flashes)
- easier scripting (eg bash scripts)

That's all i can think of. Am i missing something?
 
Last edited by a moderator:
you can extract the firmware currently running, change/modify translation files, custom brand the UI, and run 3rd party binaries..

If you bought an English camera that reverted to Chinese, this could be used to fix it back to English
 
  • Like
Reactions: spoonek
Does i need to enable the telnet every reboot or does this be stored on the cam? I ask, because i need to firmware recover one HDW-4431 which stucks in reboot look after few seconds. Unfortunately does the reboot so fast happens, that i am not really able to connect to telnet. i can enter the username, then directly the connection is lost. But i thought telnet access is every time open.
I tried it with a working one here, where i can only connect to telnet after your cgi login.
 
if you have one trouble booting your likely going to need to hook into the console port on the main circuit board and watch it boot.
 
you mean tftp recovery over serial connection? I hoped to be able to stop the upgrade over telnet like explained here:

http://www.cctvforum.com/viewtopic.php?f=19&t=44928

To stop the reboots you can update the flash. There is a parameter called appauto that tells the camera to auto start /us/bin/sonia. If you want the camera to start and not invoke the shell script that launches sonia, you need to set appauto to 0. This will stop the camera from rebooting when sonia is not running. This cam be accomplished by running '/sbin/appauto 0'. To turn it back on, just run /sbin/appauto 1. This writes the boot parameter in flash that the kernel reads before starting the process. You can check the current status of the appauto bootparameter with 'cat /proc/dahua/bootpara' It will only show what the parameter was when you booted up, so if you changes it you need to reboot to see the change in /proc/dahua/bootpara.
 
just console access over serial, you get the same thing as telnet provides.. but you can connect before the camera is fully booted and see what its failing on.

if its stuck in a reboot loop and you want to use telnet might have to write a script to login and execute the commands you want in the short window before it reboots again.
 
Hi All,

I used newest firmware of IPC, and this command don't open the telnet port.
Code:
http://<ip-address>/cgi-bin/configManager.cgi?action=setConfig&Telnet.Enable=true
The result is OK, but I can not connect to Telnet.
The information is completely removed from the telnet port of Dahua.
You know something about this? Can you solve this problem?

Firmware:
Code:
Software Version2.460.0000.1.R, Build Date: 2016-10-25
WEB Version3.2.1.388722
ONVIF Version2.42
 
works perfectly on my HDW5231R-Z with the same version
Code:
2.460.0000.1.R, Build Date: 2016-10-25

Code:
$ telnet 192.168.42.28
Trying 192.168.42.28...
Connected to 192.168.42.28.
Escape character is '^]'.
none login: admin
Password: 


BusyBox v1.18.4 (2016-08-29 14:49:41 CST) built-in shell (ash)
Revision: 18787
Enter 'help' for a list of built-in commands.

~ #
 
  • Like
Reactions: Russell Shoemaker
Hi guys,
I recently purchased Dahua DVR.
I want to do telnet on DVR
using this link i am able to enable telnet {http://10.10.1.xx/cgi-bin/configManager.cgi?action=setConfig&Telnet.Enable=true}
i tried all combinations of passwords like admin/7ujMko0admin {my username password is lets say admin/admin}
Can any one help to do telnet.
Device Info:
Device Model: DH-HCVR4104C-S2
Record Channel: 4
Alarm In: 0
Alarm Out: 0
SN: 2F03C69PAGZ24P2
System Version: 3.200.0024.0, Build Date: 2016-05-06
 
try username: root
 
Hi All,

I used newest firmware of IPC, and this command don't open the telnet port.
Code:
http://<ip-address>/cgi-bin/configManager.cgi?action=setConfig&Telnet.Enable=true
The result is OK, but I can not connect to Telnet.
The information is completely removed from the telnet port of Dahua.
You know something about this? Can you solve this problem?

Firmware:
Code:
Software Version2.460.0000.1.R, Build Date: 2016-10-25
WEB Version3.2.1.388722
ONVIF Version2.42

I get the same result. load it into the web browser, get OK, try to connect with putty and I get "connection refused"

Device Type IPC-HDBW4431R-ZS
Software Version 2.420.0000.21.R, Build Date: 2016-07-24
WEB Version 3.2.1.364036
ONVIF Version 2.42

Issue affecting Chinese camera's?
 
telnet is being removed across the board after the botnets