Active Topics

 


Reply
Thread Tools
Posts: 155 | Thanked: 92 times | Joined on Jul 2010 @ Jordan
#1
I had forgotten my ssh client/server password for winscp, so i un-installed ssh and installed it and re-installed it, but still didn't work so instead of changing it in the terminal..i was in filebox so i deleted my password file figuring I'd just install ssh with a new password and be done,well i re-booted my phone and it's now stuck on the blue nokia screen.. do i need to re-flash the whole thing.. help...
 
jd4200's Avatar
Posts: 451 | Thanked: 424 times | Joined on Apr 2010 @ England
#2
Which password file did you delete? Hopefully it wasn't /etc/passwd.

I think you will need to reflash (not the emmc though).
In future you can change the password by typing:
passwd user
 

The Following User Says Thank You to jd4200 For This Useful Post:
Posts: 155 | Thanked: 92 times | Joined on Jul 2010 @ Jordan
#3
yep thats the one...
 
jd4200's Avatar
Posts: 451 | Thanked: 424 times | Joined on Apr 2010 @ England
#4
Originally Posted by SavageBrat View Post
yep thats the one...
Oh, bugger.
That's an important system file that stores information on all the accounts on the system, so no services or no person will be able to start or login.

You're going to have no choice but to re-flash unfortunately.

As a rule of thumb in future, don't delete anything out of the /etc/ directory, or even better anything that is 'root' owned.
 

The Following 2 Users Say Thank You to jd4200 For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#5
Keep in mind that "passwd [username]" only works on the "root" username so long as you're root yourself, as far as I know.

And I am pretty sure the SSH password is a separate file, so I don't think it would've solved his problem, either... *Shrug*

Edit: But yeah, that basically covers what the /etc/passwd file does. No disagreements there.

Last edited by Mentalist Traceur; 2011-01-07 at 01:02.
 
jd4200's Avatar
Posts: 451 | Thanked: 424 times | Joined on Apr 2010 @ England
#6
Originally Posted by Mentalist Traceur View Post
Keep in mind that "passwd [username]" only works on the "root" username so long as you're root yourself, as far as I know.

And I am pretty sure the SSH password is a separate file, so I don't think it would've solved his problem, either... *Shrug*
Executing 'passwd user' (or just passwd) would prompt you for a new password for the account specified (or if none given, the current logged in user), and the account password is the password you use to login via SSH. Well as far as I'm aware

[Edit]:
Is there any way to mount the root filesystem via USB?
I suppose that way a new passwd file may be copied over.
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#7
I just tested (Because I have no idea what my user password was on the N900... *Shrug*). sudo gainroot, then passwd user. And yes, you're right, it IS the same password you use to log in through SSH. Made me rather happy to find that out.

However, I also noticed it wasn't letting me run "passwd user" as user. It basically told me I wasn't allowed to change that password. (Worked fine as root though.)

As for mounting from USB... Not sure. I do know that you can use the flasher to merely load a kernel into memory instead of reflashing. And you can use the rescue kernel on the MeeGo project site (don't ask me how, I don't know, I never had to), to boot into some form of shell from which to recover the device...

Multiboot and BackupMenu both have the ability to drop you into a shell early in the load process. BackupMenu is pretty versatile/powerful, as far as that goes. You can definitely mount rootfs from within it, get SSH access from the 'outside', and scp your requisite files, or unpack a backup'd one. Problem is, if you don't have them installed before you bootloop/bootstuck, you can't really get it back on the device without some extra hacking. I suppose if Flasher was open source, or something similar existed, one could create a kernel image that drops you into the backupmenu shell. Then just either flash, or do the non-flashing load-into-RAM-and-boot-with-it method... But I don't know of any such images.

The user friendly best bet is just reflash and be done with it, I'd say. The harder method is find that rescue kernel I mentioned, and boot into that using Flasher, and hope you can get enough filesystem access and a passwd file that's close enough to what you had to fix your system. The only thing is, I don't think /etc/passwd counts as part of the kernel, so a flashed/loaded kernel will still presumably try to read that passwd file - unless, again, the drop-into-shell comes first.

...I suppose if uboot got more popular, a BackupMenu port, or a similar script, could be ran from within uboot, which CAN be flashed/loaded in as part of a kernel image, and will load/run before the actual kernel stuff and beyond happens.
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:17.