No more admin login and passwd in data base

Author Message

Pascal France

Thursday 12 October 2006 6:12:02 am

Hi,

I don't know why, but the line:

 14 | pascal@linuxorable.fr | admin | c78e3b0f3d9244ed8c6d1c29464bdff9 | 2 |

doesn't exist anymore in the ezuser table. Only this one:

10 | nospam@ez.no | anonymous | 4e6f6184135228ccd45f8233d72a0363 | 2 |

is present.

I just would like to know the commande line to add the line with the hash passwd of the admin which is in the db_data.dba file (c78e3b0f3d9244ed8c6d1c29464bdff9).

I know how to update fields but not how to create them.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Claudia Kosny

Thursday 12 October 2006 6:39:16 am

Hi Pascal

Do you still have the user object?
If yes:

This for the hash type md5_user which you can find in your site.ini. If you use another hash type you need to change the password_hash and the hash_type number
$hash_type_nr = 2;
$password_hash = md5('YOUR LOGIN' . "\n" . 'YOUR PASSWORD');
$query = "INSERT INTO ezuser VALUES(USER_OBJECT_ID, 14, 'YOUR EMAIL', 'YOUR LOGIN', $password_hash, $hash_type_nr)";

(Replace all words in capitals with your settings)

If you do not have the user content object anymore I don't know what to do.

Remember to make a backup of your database before doing this.

Greetings from Luxembourg

Claudia

Pascal France

Thursday 12 October 2006 9:34:15 am

Hi Claudia,

In fact, I wanted the mysql command to add the admin line.

Now, the ezuser table contents only:

10 | nospam@ez.no | anonymous | 4e6f6184135228ccd45f8233d72a0363 | 2 |

and no other line.

If I want to modify one value of this line I can use:

UPDATE ezuser SET password_hash="fdgss1254456sds456s1ssssssds" WHERE contentobject_id="14";

or

UPDATE ezuser SET email="pascal@anywhere.com" WHERE contentobject_id="14";

but how to create a new line in this ezuser table ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Thursday 12 October 2006 10:01:38 am

Hi,

Well, the mysql command is:

INSERT INTO `ezuser` (`contentobject_id`, `email`, `login`, `password_hash`, `password_hash_type`) VALUES ('14', 'france@gmail.com', 'admin', 'c78e3b0f3d9244ed8c6d1c29464bdff9', '2');

but I can't login.

I cleared the caches, restarted Mysql but I can't login

I don't find anything in var/log/ or var/my_siteaccess/log/

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Claudia Kosny

Thursday 12 October 2006 10:36:27 am

Hi Pascal

Yes, you are right - the user_object_id was to much... I really shouldn't post something when I am busy with other stuff. Ok, hopefully I will be a bit more careful now.

I do not know where all the user relevant data is stored and how you lost your admin user, so I am not sure how to solve your problem. Check whether the user is enabled (table ezuser_setting). Enable full debug output and check whether you can see anything in there. Make sure that the object with the id 14 still exists (just fetch it in a template).
Make sure the user is a child of the admin user group.

What happens when you try to login? Do you get a message about the password being wrong, does it tell you about wrong permissions or what?

Also have a look at this post - this might help you to create a new admin user if nothing else works.
http://ez.no/community/forum/developer/loosing_administrator_user/re_loosing_administrator_user__7

Good luck

Claudia

Pascal France

Thursday 12 October 2006 11:22:43 am

Hi Claudia,

fortunately I do 3 backup per day ;-)

So a diff between two backup files tells me the admin user has been removed just like some user roles.

Regards

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:38:11
Script start
Timing: Jan 18 2025 19:38:11
Module start 'layout'
Timing: Jan 18 2025 19:38:11
Module start 'content'
Timing: Jan 18 2025 19:38:12
Module end 'content'
Timing: Jan 18 2025 19:38:12
Script end

Main resources:

Total runtime0.7160 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1641152.6406
Module start 'layout' 0.00570.0032 741.804739.4766
Module start 'content' 0.00890.7056 781.2813539.2031
Module end 'content' 0.71450.0014 1,320.484416.1250
Script end 0.7159  1,336.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4766160.0002
Check MTime0.00140.1890160.0001
Mysql Total
Database connection0.00080.109810.0008
Mysqli_queries0.644490.0057660.0098
Looping result0.00100.1450640.0000
Template Total0.686895.920.3434
Template load0.00230.327020.0012
Template processing0.684595.601620.3422
Template load and register function0.00020.025410.0002
states
state_id_array0.00080.111910.0008
state_identifier_array0.00080.117420.0004
Override
Cache load0.00240.3299620.0000
Sytem overhead
Fetch class attribute can translate value0.00090.132320.0005
Fetch class attribute name0.00120.165260.0002
XML
Image XML parsing0.00030.036320.0001
class_abstraction
Instantiating content class attribute0.00000.001860.0000
General
dbfile0.00070.1020100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs