Home | Community | Message Board

Magic-Mushrooms-Shop.com
This site includes paid links. Please support our sponsors.


Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Shop: PhytoExtractum Maeng Da Thai Kratom Leaf Powder   Kraken Kratom Red Vein Kratom

Jump to first unread post Pages: 1
InvisibleautomanM
blasted chipmunk
 User Gallery

Registered: 09/18/03
Posts: 8,272
mysql help
    #7621523 - 11/11/07 10:30 AM (16 years, 2 months ago)

ok, i have installed a cms and tried to log in, but it says login fails. so i start to poke around mysql and here is what i find out:

Code:

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| avps |
| bans |
| blocks |
| categories |
| comments |
| config |
| countries |
| files |
| forums |
| friends |
| messages |
| news |
| peers |
| pollanswers |
| polls |
| posts |
| readposts |
| sitelog |
| stylesheets |
| topics |
| torrents |
| users |
+----------------+
22 rows in set (0.00 sec)



so i take a peak in users:
Code:

mysql> describe users;
+-----------------+-------------------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+-------------------------------+------+-----+---------------------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| username | varchar(40) | NO | UNI | | |
| old_password | varchar(40) | NO | | | |
| passhash | varchar(32) | NO | | | |
| secret | varchar(20) | NO | | | |
| email | varchar(80) | NO | | | |
| status | enum('pending','confirmed') | NO | MUL | pending | |
| added | datetime | NO | | 0000-00-00 00:00:00 | |
| last_login | datetime | NO | | 0000-00-00 00:00:00 | |
| last_access | datetime | NO | MUL | 0000-00-00 00:00:00 | |
| editsecret | varchar(20) | NO | | | |
| privacy | enum('strong','normal','low') | NO | | normal | |
| stylesheet | int(10) | YES | | 1 | |
| info | text | YES | | NULL | |
| acceptpms | enum('yes','friends','no') | NO | | yes | |
| ip | varchar(15) | NO | MUL | | |
| class | tinyint(3) unsigned | NO | | 0 | |
| avatar | varchar(100) | NO | | | |
| uploaded | bigint(20) unsigned | NO | MUL | 0 | |
| downloaded | bigint(20) unsigned | NO | MUL | 0 | |
| title | varchar(30) | NO | | | |
| country | int(10) unsigned | NO | MUL | 0 | |
| notifs | varchar(100) | NO | | | |
| modcomment | text | NO | | | |
| enabled | enum('yes','no') | NO | MUL | yes | |
| avatars | enum('yes','no') | NO | | yes | |
| donor | enum('yes','no') | NO | | no | |
| warned | enum('yes','no') | NO | MUL | no | |
| warneduntil | datetime | NO | | 0000-00-00 00:00:00 | |
| torrentsperpage | int(3) unsigned | NO | | 0 | |
| topicsperpage | int(3) unsigned | NO | | 0 | |
| postsperpage | int(3) unsigned | NO | | 0 | |
| deletepms | enum('yes','no') | NO | | yes | |
| savepms | enum('yes','no') | NO | | no | |
| passkey | varchar(32) | NO | | | |
| tzoffset | tinyint(2) | NO | | 0 | |
+-----------------+-------------------------------+------+-----+---------------------+----------------+
36 rows in set (0.01 sec)



ok, so i see 2 things, one is old_password, but the others is passhash. so i take a look at the old_password:
Code:
mysql> SELECT username, old_password, passhash FROM users;
+----------+--------------+----------------------------------+
| username | old_password | passhash |
+----------+--------------+----------------------------------+
| automan | passwd | 329996eae77078f9f5962188103629ca |
+----------+--------------+----------------------------------+
1 row in set (0.00 sec)



ok, old_passwd is passwd, so i will change it to 123abcd:
Code:
mysql> UPDATE users SET old_password = '123abcd' WHERE username = 'automan';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0



which yields:
Code:
mysql> SELECT username, old_password, passhash FROM users;
+----------+--------------+----------------------------------+
| username | old_password | passhash |
+----------+--------------+----------------------------------+
| automan | 123abcd | 329996eae77078f9f5962188103629ca |
+----------+--------------+----------------------------------+
1 row in set (0.00 sec)



but when i try to sign into the site, i get:
Username or password incorrect

i am assuming this has something to do with the passwd not mathcing the hash now. could someone please enlighten me on how to work around this so i dont have to reinstall the cms only to meet the same issue again.


--------------------
No, no, you're not thinking, you're just being logical. ~ Niels Bohr


Extras: Filter Print Post Top
OfflineYthanA
ᕕ( ᐛ )ᕗ
Male User Gallery


Registered: 08/08/97
Posts: 18,774
Loc: NY/MA/VT Borderlands Flag
Last seen: 2 hours, 3 minutes
Re: mysql help [Re: automan]
    #7621612 - 11/11/07 10:58 AM (16 years, 2 months ago)

Try:

UPDATE users SET passhash = md5('123abcd') WHERE username = 'automan';

assuming it uses MD5 hashes (looks like it) which are unsalted.


Extras: Filter Print Post Top
InvisibleautomanM
blasted chipmunk
 User Gallery

Registered: 09/18/03
Posts: 8,272
Re: mysql help [Re: Ythan]
    #7622000 - 11/11/07 01:27 PM (16 years, 2 months ago)

nope, but i will remember that for future use :smile:

apparently the code i got was majorly flawed and abandonded some time ago, heh. they moved to a different name and just left the last site abandoned, but functioning.

i am trying out the newer version now.


--------------------
No, no, you're not thinking, you're just being logical. ~ Niels Bohr


Extras: Filter Print Post Top
InvisibleBUDDHA_702
Master Mycologist In Training
Male


Registered: 02/17/07
Posts: 1,296
Loc: Some Country
Re: mysql help [Re: automan]
    #7659831 - 11/20/07 05:08 PM (16 years, 2 months ago)

What kind of CMS is it?


Extras: Filter Print Post Top
InvisibleautomanM
blasted chipmunk
 User Gallery

Registered: 09/18/03
Posts: 8,272
Re: mysql help [Re: BUDDHA_702]
    #7660062 - 11/20/07 05:56 PM (16 years, 2 months ago)

tbdev


--------------------
No, no, you're not thinking, you're just being logical. ~ Niels Bohr


Extras: Filter Print Post Top
Jump to top Pages: 1

Shop: PhytoExtractum Maeng Da Thai Kratom Leaf Powder   Kraken Kratom Red Vein Kratom


Similar ThreadsPosterViewsRepliesLast post
* ATTN: PHP/MySQL Gurus
( 1 2 all )
elbisivni 2,075 20 09/04/07 06:04 PM
by elbisivni
* PHP/MySQL question elbisivni 763 4 05/15/08 01:25 PM
by elbisivni
* hooking openoffice to mysql automanM 781 2 07/22/05 02:54 PM
by automan
* PHP/MySQL help daytripper05 1,182 7 04/20/08 10:48 PM
by ectolysergic
* PHP/MySQL question daytripper05 983 7 04/28/08 04:43 PM
by daytripper05
* Please help me get my PHP and MySQL project going Gypsy Boy 600 9 02/19/18 01:29 AM
by DualWieldRake
* MySQL Q elbisivni 527 4 12/24/07 12:05 PM
by Sillicybin
* NodeJS vs php / MySQL Senor_Doobie 259 4 12/23/16 05:09 AM
by Senor_Doobie

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: trendal, automan, Northerner
596 topic views. 0 members, 0 guests and 0 web crawlers are browsing this forum.
[ Show Images Only | Sort by Score | Print Topic ]
Search this thread:

Copyright 1997-2024 Mind Media. Some rights reserved.

Generated in 0.027 seconds spending 0.007 seconds on 14 queries.