fword.de Forum Index fword.de
Schubi's Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Forgetting passwords can have a learning effect.

 
Post new topic   Reply to topic    fword.de Forum Index -> Blog
View previous topic :: View next topic  
Author Message
blog
Blogger


Joined: 10 Jun 2006
Posts: 26

PostPosted: 15.01.2011, 02:17    Post subject: Forgetting passwords can have a learning effect. Reply with quote

... or so it seems.

I have this little "CMS" Wink on my router which uses sqlite as database-backend and I had forgotten the password of the admin user.

So I found the .db file that housed the "database" and renamed it into a backup file. Then I used the .sql file that came with the CMS to create a new Database from scratch.

I used this vanilla installation to create a new admin user and then sought to migrate just this user into the old database so that I'll keep all my other tables and the data therein.

Easy I thought, copy the file over to your desktop machine and just install one of the many sqlite browsers out there.

Problem was, that the CMS used sqlite2, while all GUI tools out there use sqlite3+ ...

So ... back to reading man pages, dumping the vanilla db's user table into a text (sql) file, doing the same with the old backup DB and then moving the INSERT line for the new admin user from the new DB into the old DB replacing the old admin user's entry.

Now I just added a DROP TABLE at the top of the backup db's sql file and executed it against the backup DB, renamed it into the production DB and restarted the CMS - voila - full access again.

Needless to say that this wasn't a hack as such, as I always had (and needed) superuser access to the sqlite files...
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    fword.de Forum Index -> Blog All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group