Author Topic: Recovering 'root' Pw...  (Read 2454 times)

mtnkill

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Recovering 'root' Pw...
« on: June 15, 2005, 12:51:32 pm »
I apparently have forgotten my root pw.  I can't 'su' as it doesn't accept any of the standard passwords I use, nor the one I'm pretty certain I set it to.  

I presume there isn't any backdoor method of recovering/resetting root (which of course would make it very useless from a security standpoint)...

shane
« Last Edit: June 15, 2005, 12:52:04 pm by mtnkill »

craigtyson

  • Sr. Member
  • ****
  • Posts: 462
    • View Profile
Recovering 'root' Pw...
« Reply #1 on: June 15, 2005, 02:48:32 pm »
have you tries using the security icon?  on some roms it also (re)sets the root hm could this be a security prob a large no of zauri will have a pure nemeric root pw......
Craig
SL-C1000, Angstrom GPE 2007.12r13
Ambicom WL1100C, SanDisk UltraII 1GB SD
 
Old Faithfull - SL-5500 battery out of the C750 (see below) TKC v1 (New) 1GB SD
Dead - SL-C750, Cacko 1.23 lite (Dropped, very messy!)
Ambicom WL1100C, SanDisk Dead - 1GB SD
Keep your Z on a bungee, you never know.....

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Recovering 'root' Pw...
« Reply #2 on: June 15, 2005, 06:06:21 pm »
Are you running a Sharp-based (or Opie or pdaXrom) flash image - i.e. do you run as root by default - if so it will most probably be easier than if you are a mere mortal user (which would be the case with GPE for example).


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Recovering 'root' Pw...
« Reply #3 on: June 15, 2005, 09:05:10 pm »
Does sudo work? If so then all you have to do is use sudo to edit /etc/shadow.
make sure that the root entry looks something like this
Code: [Select]
root::10933:0:99999:7:::
The really important part is the bit between the first and second :, if you see random letter etc then your Z has a password for root, if it is just :: then you have no passwd, remove anything between the first and second : and your password goes away.

If you don't have sudo or it isn't working then you can try booting into the maintanece mini-distro using D+B while booting (same as you would for D+M to get to maintenance menu but holding the D and B keys)

You will need to mount the home partition (/dev/mtdblock3 on the C760 and C1K) and edit the shadow file as above.

Hope this helps.

Stu.

P.S. if you have physical access to a device it is always possible to get root privleges on that device - at least I've never found a device where this wasn't true.
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

mtnkill

  • Newbie
  • *
  • Posts: 33
    • View Profile
    • http://
Recovering 'root' Pw...
« Reply #4 on: June 15, 2005, 11:37:39 pm »
Quote
have you tries using the security icon?  on some roms it also (re)sets the root hm could this be a security prob a large no of zauri will have a pure nemeric root pw......
[div align=\"right\"][a href=\"index.php?act=findpost&pid=84412\"][{POST_SNAPBACK}][/a][/div]

Holy crap!  This was it.  I cleared my security code and got root back with no pwd.  I set the security code again, and my root pw changed to the code I set.  That is not very intuitive at all.  I am running the stock Sharp ROM on my C1000, so I'm normally just the 'zaurus' user (ie. mortal).  

I then tested setting an alphanumeric root pw (using 'passwd' when su'd), then changed my passcode in the 'Security' settings, and my root pw stayed the alphanumeric one I had set.  So, apparently the Security passcode only gets applied to root in cases where the root pw is blank.  

Very, very odd.

Thanks!!

(stubear, thanks for your info. also...will have to test on my RHEL PC...)

shane

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Recovering 'root' Pw...
« Reply #5 on: June 16, 2005, 05:05:30 am »
Quote
Very, very odd.

lol, I remember similar complaints a long long time ago on the devnet - iirc this has always affected Sharp ROMs (in the old days you didn't even get a terminal by default so Sharp probably thought it wouldn't be a major issue - then again, how can I possibly pretend to understand what Sharp think?!  ).

Glad you got it fixed,


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva