Restore passwd for root on a server

Posted by s.mihai on Server Fault See other posts from Server Fault or by s.mihai
Published on 2010-06-10T14:25:54Z Indexed on 2010/06/10 14:33 UTC
Read the original article Hit count: 375

Filed under:
|
|
|

Hello,
      I have a DVR server with linux embeded. It has some telnet functions but i don't have the password for it (the chinese manufacturer refuses to give me the password). I did get a upgrade folder from them and found a passwd file inside.
      So i assume that when i upgrade the firmware the password in that file will be used.
      Now i am trying to modify the file so taht i can insert a password i already know.
      The problem is that i don't know how to create the password hash from what i figured the password hash is $1$1/lfbDKX$Hmd.FqzB8IZEohPesYi961
      The file is named rom.ko and i found a command

telnetd
/mnt/yaffs/web/boa -c /mnt/yaffs/web &
/bin/cp -f /mnt/yaffs/rom.ko /etc/shadow 

in a script file so i assume this is the right way.
      Can you help me reconstruct a password that i know already? Tell me how or make one for me :) ?...


passwd file:
root:$1$1/lfbDKX$Hmd.FqzB8IZEohPesYi961:0:0:99999:7:-1:-1:33637592
bin::10897:0:99999:7:::
daemon:
:10897:0:99999:7:::
adm::10897:0:99999:7:::
lp:
:10897:0:99999:7:::
sync::10897:0:99999:7:::
shutdown:
:10897:0:99999:7:::
halt::10897:0:99999:7:::
mail:
:10897:0:99999:7:::
news::10897:0:99999:7:::
uucp:
:10897:0:99999:7:::
operator::10897:0:99999:7:::
games:
:10897:0:99999:7:::
gopher::10897:0:99999:7:::
ftp:
:10897:0:99999:7:::
nobody::10897:0:99999:7:::
next:
:11702:0:99999:7:::

© Server Fault or respective owner

Related posts about password

Related posts about telnet

  • Telnet does not give a response

    as seen on Server Fault - Search for 'Server Fault'
    Some wireless access points are acting a little weird, so I want to reboot them every couple of hours. Luckily there exists a security flaw which lets me login as root through telnet when using port 1111 (without username and password). Now I want to use that to let my QNAP NAS execute the reboot… >>> More

  • Ougoing telnet: Unable to connect to remote host: Connection refused

    as seen on Ask Ubuntu - Search for 'Ask Ubuntu'
    I am trying to telnet from Ubuntu server (running Maverick) on ec2 to another machine I have set up not on ec2 - we'll call it "server-x". The two machines are connected via vpn. I can ping from the ec2 machine to server-x no problem. On another machine also on the vpn but also not on ec2 I can… >>> More

  • Why do I get 'use: command not found' when I run my Perl script?

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I'm new to Perl. And I have used following code from one forum to connect to one of the server. but throwing error messages [root@Cus]# cat tt.pl #!/usr/bin/perl use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>2, Errmode=>'die'); $telnet->open('10.0.0.28'); $telnet->waitfor('/login:/'); $telnet->print('administrator'); $telnet->waitfor('/Password:/'); $telnet->print('test'); $telnet->waitfor('/switch8-12>/'); $telnet->print('whoamI'); $output=$telnet->waitfor('/switch8-12>/'); print… >>> More

  • Connect to remote server

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Hi All, I'm new to perl. And I have used following code from one forum to connect to one of the server. but throwing error messages [root@Cus]# cat tt.pl #!/usr/bin/perl use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>2, Errmode=>'die'); $telnet->open('10.0.0.28'); $telnet->waitfor('/login:/'); $telnet->print('administrator'); $telnet->waitfor('/Password:/'); $telnet->print('test'); $telnet->waitfor('/switch8-12>/'); $telnet->print('whoamI'); $output=$telnet->waitfor('/switch8-12>/'); print… >>> More

  • Code to connect to remote server using perl

    as seen on Stack Overflow - Search for 'Stack Overflow'
    I'm written small code to connect to remote server using perl but observing error messages #!/usr/bin/perl -w use Net::Telnet; $telnet = new Net::Telnet ( Timeout=>60, Errmode=>'die'); $telnet->open('192.168.50.40'); $telnet->waitfor('/login:/'); $telnet->print('queen'); $telnet->waitfor('/password:/'); $telnet->print('kinG… >>> More