LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-01-2011, 03:15 AM   #1
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Rep: Reputation: 0
Modify Linux based Network Audio System


Hi,

what is the best way to get add a root account to a linux box, if I don't have the root password? I have a small Linux based Audio Player NAS-SC55PKE, where I need access. I want to check if I can add some functionalty to this box (mainly WPA2 support for wireless).
This is installed:
http://www.sony.net/Products/Linux/A...AS-S55HDE.html

I could connect the drive to my computer if needed. Maybe it's possbile to add an 'account' offline?

thx in advance
Walzing
 
Old 08-01-2011, 06:57 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Anything is possible, if you can attach the drive to your pc you can do pretty much whatever you like with it. The simplest way would probably be to bind mount /proc and /dev then chroot into the drive and simply run useradd, edit /etc/sudoers and whatever else you need to do
 
1 members found this post helpful.
Old 08-01-2011, 07:49 AM   #3
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Great - I thought so, that chroot would be the trick. Thx... Will test it on weekend.

cu
Walzing
 
Old 08-07-2011, 05:32 AM   #4
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Ok,

I tried the chroot - but as it's not the same architecture, I get an error.
Is there another way to add a root user? I tried to modify passwd entry on another system with a known password hash. But it doesn't seem to work.
I managed to get the firewall disabled and to get sshd running. But as soon as I try to login, connection will be closed.

cu
Walzing
 
Old 08-07-2011, 06:37 AM   #5
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Just edit the files manually - /etc/passwd, /etc/group and the shadow files. It won't matter if the password is empty, you can change it once you login.
 
Old 08-07-2011, 06:49 AM   #6
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Hi,

what I did is this:
1.) Backup passwd file
2.) Open passwd with vi
3.) Modify root user in passwd - ony the password field (with a password hash from another passwd file)

The only chance I have to verify, is to boot the audio system and try to login with root. But the connection is closed right after I enter password.

I added another user to passwdd - same behavior. Putty will close connection right after I enter a password.

cu
Walzing

Last edited by Walzing; 08-07-2011 at 07:02 AM.
 
Old 08-07-2011, 08:40 AM   #7
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Original Poster
Rep: Reputation: 0
Ok,

empty password was accepted. But now I get 'Server refused to allocate pty'.
I am googling now - but any ideas are welcome ;-)

cu
Walzing
 
Old 08-07-2011, 09:17 AM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Might require PermitEmptyPasswords enabled in /etc/ssh/sshd_config...
 
Old 08-07-2011, 09:20 AM   #9
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Original Poster
Rep: Reputation: 0
It is enabled - I can login. But I don't get a shell. I only get 'Server refused to allocate pty'.
I added this entry to fstab:
devpts /dev/pts devpts gid=5,mode=620 0 0

But I still get the above error.

cu
Walzing
 
Old 08-07-2011, 12:41 PM   #10
Walzing
LQ Newbie
 
Registered: Jan 2007
Posts: 18

Original Poster
Rep: Reputation: 0
I now have access.

From a remote linux client I did:
ssh root@sony.box "/bin/sh -i"

Now I have to find out, howto configure the wlan.

cu
Walzing
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transition from Windows-based network to Linux-based larynx1982 Linux - Software 8 02-19-2011 07:10 AM
Prefab - a pixel based methodology to modify virtually any interface! mjolnir General 1 06-16-2010 04:30 AM
Network based file system? yah0m Linux - General 1 03-06-2010 12:56 PM
Linux based distributed audio system ciphyre Linux - General 3 02-05-2009 07:26 AM
RAM based system instead of disk based system ? wini_g Linux - Hardware 7 04-05-2004 06:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:09 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