[RESOLVED] Reset root password

Old topics are moved here for reference.

[RESOLVED] Reset root password

Postby mlong » Thu Jan 20, 2011 12:10 am

Is there a way to reset the root password? It seems that I changed the password and don't know what it is.
mlong
 
Posts: 5
Joined: Fri Nov 12, 2010 4:08 pm

Re: Reset root password

Postby WarheadsSE » Thu Jan 20, 2011 1:49 pm

On which device, and is the OS on the NAND or a drive?
OXNAS pwner

Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 3484
Joined: Mon Oct 18, 2010 2:12 pm

Re: Reset root password

Postby pepedog » Thu Jan 20, 2011 4:01 pm

mlong wrote:Is there a way to reset the root password? It seems that I changed the password and don't know what it is.

Can you edit the /etc/shadow file somehow?
pepedog
Developer
 
Posts: 1672
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Reset root password

Postby eblack » Fri Jan 21, 2011 2:27 am

mlong wrote:Is there a way to reset the root password? It seems that I changed the password and don't know what it is.

I got an idea from the ArchWiki article on Password Recovery (https://wiki.archlinux.org/index.php/Password_Recovery).

While in U-Boot, try appending this line to the end of the bootargs variable:
Code: Select all
init=/bin/bash

Then boot your plug without saving the U-Boot environment variables. Ideally this would give you a command prompt as root on your plug, then you can change or delete the root password as described in the ArchWiki article linked above.

I have not tried this on my plug, but I do not believe that it can make your situation any worse.
eblack
 
Posts: 7
Joined: Sun Nov 28, 2010 8:48 am

Re: Reset root password

Postby mlong » Thu Jan 27, 2011 9:11 pm

WarheadsSE - SheevaPlug, on a card.

pepedog - don't know how do get to there without logging in

eblack - which bootargs? there are three or four but i tried all of them and nothing.
mlong
 
Posts: 5
Joined: Fri Nov 12, 2010 4:08 pm

Re: Reset root password

Postby eblack » Mon Jan 31, 2011 1:26 am

Since you say that you are running from a card, you could try to mount the card in a card reader on a computer running Linux, then edit the /etc/shadow file on the card, as described in the ArchWiki page on Password Recovery.

If that does not work, I have no other ideas outside reinstalling Arch Linux ARM install Linux.
eblack
 
Posts: 7
Joined: Sun Nov 28, 2010 8:48 am

Re: Reset root password

Postby mlong » Thu Feb 03, 2011 9:40 pm

I was able to edit the file this way.

thanks
mlong
 
Posts: 5
Joined: Fri Nov 12, 2010 4:08 pm

Re: [RESOLVED] Reset root password

Postby dantheman120 » Sun Apr 22, 2012 10:50 pm

eblacks method works and is the easiest I think.

Uboot passes parmeters to the kernel as/before it boots it. In Uboot these are stored under the bootargs varible. You need to append the "init=/bin/sh" (depends upon the shell you are using) to this line and you will be booted straight into the shell. Where you can set password as normal.

Depends upon how Uboot is set up to. Some devices don't have the bootargs varible set up by default, this is set at boottime. This can make it a little more complex but still simple to sort out if you understand uboot commands.
dantheman120
 
Posts: 3
Joined: Thu Apr 19, 2012 8:43 pm


Return to Resolved

Who is online

Users browsing this forum: No registered users and 0 guests