LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-04-2015, 03:43 AM   #1
senderj
LQ Newbie
 
Registered: May 2015
Posts: 5

Rep: Reputation: Disabled
Linux STB root passwd


I have be using a linux set-top-box for a few years. It has a HDD bay, usb port and TV tuner for recording HDTV programmes and playing media files. It runs a kind of linux that has only very limited os features. Commands are mostly from busybox. It also has LAN port to connect to internet but I didn't use it until recently. The problem is that its root does not have password set. I am trying to set up a password for root but encountered the follow problems:

1. I am able to telnet to it and use "passwd" command trying to set password for root. After input new password twice, it failed with "segmentation fault". I then retry after "mount -o remount,rw /" but same result. What's wrong?
2. Failed to use command, I turned to "vi passwd". Its first list is "root::0:0:....". So I insert a password between the first "::" and save. After that, I am not able to logon again. Have to flash the firmware again. I understand this is a proper way to add password for users. But why it didn't work for root?
3. Its firmware is flashed by using usb with a install.img file. I use 7zip to open it and managed to locate the "passwd" file. I can change it to add password for root. But I don't know if I can use 7zip to re-pack it and rename it to .img. Will it works if I do it in Windows? Or must I do it in linux? What is the proper way to modify the img?
4. Is there any other way to add password for root?
5. Where should I look for if I want to add/install software to img? or to HDD?

Please help.
 
Old 11-04-2015, 08:05 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Without knowing the kernel version etc I would assume the actual password is stored in the /etc/shadow file. With a /etc/shadow file an x indicates a password in that spot i.e. root:x:0... Even if the box did not use a shadow file the password is encrypted and would need to know the type to actually create something usable.

Not enough information to say but it could be a problem with the busybox passwd command. It might be possible to add a password using the chpasswd command which I think is included in busybox.

Again not enough information about the embedded system in the box but you would need to setup a cross compiler for the processor type and be able to add the binary code to the image. I assume that the hard drive is just for recordings and possibly some configuration data. The operating system resides in flash memory on the board.
 
Old 11-12-2015, 03:44 AM   #3
senderj
LQ Newbie
 
Registered: May 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
I tried to gather some hardware related commands and produced a list on the h/w info of the STB. I also did a "ls -ilR" at the root folder. With these info I hope somebody can teach me how to set the password of root. Without password protection, it is too risky to connect it to internet. please help.
Attached Files
File Type: txt hwinfo_result.txt (10.6 KB, 58 views)
File Type: txt ls-ilR_dos_01.txt (250.4 KB, 21 views)
File Type: txt ls-ilR_dos_02.txt (253.7 KB, 10 views)
File Type: txt ls-ilR_dos_03.txt (254.8 KB, 14 views)
 
  


Reply

Tags
passwd, root



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] forgot root passwd, kernel boot in single mode still asks for root passwd nass Slackware 11 05-08-2012 12:37 PM
How to Break Suse Linux Root passwd abrar_pu Linux - Security 4 03-19-2008 08:12 AM
I have forgot my linux root passwd shankha Linux - Security 2 09-13-2003 06:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration