Forums / Basic Configuration / admin password

admin password

Started by chattunnel on 19 Jun 2013, 6:30 AM · Views: 4,305

Results 1 to 20 of 24
19 Jun 2013, 6:30 AM
#1
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

admin password

I was making a new password as the old had expired and forgot to save my the new password and forgot it. I really went through everything to retrieve my password. I used the reset password in the form field, changed config files in includes and admin/included also the tables in the mysql database. I achieved changing the password in both config files and mysql database admin table but I'm still unable to login. Can I clear the cache somewhere I think maybe resetting the password may have caused this issue. Also I was in the mysql admin table changing things and may have caused a issue I deleted the previous password field can someone give me the proper settings for mysql admin table fields. What's the issue I really tried everything even several sql commands in phpmyadmin with no luck.

19 Jun 2013, 8:35 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: admin password

chattunnel:

What's the issue I really tried everything even several sql commands in phpmyadmin with no luck.

When you 'tried everything' did that include 'DROP DATABASE zencart ;' ?

I hope not, and please don't. This is an example as to how you delete your entire zencart database.
If you did this without a backup you're screwed.
If you didn't do this, then clearly you didn't 'try everything' (Nor should you. You only need to try/do things that would/could be relevant to the problem.

Whatever the original issue is/was, the odds are that you've probably introduced additional problems with the 'tried everything' and/or phpMyadmin SQL commands. Before doing anything else, I'd be trying doing a restore from your most recent backup, and then following the correct admin password recovery method as outlined in the FAQ files:

http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it%29

Cheers
Rod

PS. Depending on the age of your backup(s) you may need to use your original username/password (not the new one(s) to log into your admin.

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

19 Jun 2013, 6:05 PM
#3
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

I prefer not to revert to my backup due to the lost data that will occur. I only added a new table in the zencartmysqldatabase/admin I didn't touch any other tables in the zen cart database only the admin table. Are you saying the database is the problem here? I was also running sql commands into the database but the commands didn't work and I was getting errors well running them even if they went through it was only commanding username and password change for the admin account. Is there another option?

19 Jun 2013, 6:27 PM
#4
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

I'm receiving only text in my email reset messages. What Files do I need to fix in order to receive a link or password in my mail in terms of fixing the reset password option in the login form.

19 Jun 2013, 6:43 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: admin password

chattunnel:

I'm receiving only text in my email reset messages. What Files do I need to fix in order to receive a link or password in my mail in terms of fixing the reset password option in the login form.

The password-reset emails are in fact text-only messages. There's no need for pictures or color or fancy CSS in order to email a new password.
Perhaps you can post the contents of the email you received?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

19 Jun 2013, 6:46 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: admin password

chattunnel:

I used the reset password in the form fieldThat would send you an email, with a new password. No other changes needed.

chattunnel:

changed config files in includes and admin/included also the tables in the mysql database.Why?

chattunnel:

I achieved changing the password in both config files and mysql database admin tableWhy? Those passwords are COMPLETELY UNRELATED to your admin "login" password.

chattunnel:

but I'm still unable to login.Unsurprising. In fact, after all the other things you mentioned, it wouldn't surprise me that your entire store is offline.

chattunnel:

Can I clear the cache somewhere I think maybe resetting the password may have caused this issue.Passwords are not cached.

chattunnel:

Also I was in the mysql admin table changing thingsWhy would you do that?

chattunnel:

and may have caused a issueClearly.

chattunnel:

I deleted the previous password fieldHUH? Why are you deleting fields from the database?

chattunnel:

I prefer not to revert to my backup due to the lost data that will occur.Um ... well ... if I can be blunt, then you shouldn't have gone changing the database structure!

chattunnel:

I only added a new table in the zencartmysqldatabase/adminWhat? a "new table"?
This is getting more bizarre by the second.

chattunnel:

I was also running sql commands into the databaseUm, WHY?

chattunnel:

but the commands didn't work and I was getting errors well running them even if they went throughI don't see any other posts from you where you mention exactly what commands you ran and what errors you were getting.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

20 Jun 2013, 8:18 AM
#7
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

the login page says "LOGIN_EXPIRY_NOTICE" at the bottom and the reset email says "TEXT_EMAIL_MESSAGE_PWD_RESET"
and the login failures email "TEXT_EMAIL_MULTIPLE_LOGIN_FAILURES" I think there is some code here not right which files do I edit the code
The sql commands were a mix of the same thing " DELETE FROM admin WHERE admin_name = 'Admin'; INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('Admin', 'admin"

I was in the zen cart mysql database changing the admin table in hopes of changing the password.

These are the sections in the database:
Browse address_book
Browse address_format
Browse admin
Browse admin_activity_log
Browse admin_menus
Browse admin_pages
Browse admin_pages_to_profiles
Browse admin_profiles
Browse authorizenet
Browse banners
Browse banners_history
Browse categories
Browse categories_description
Browse configuration
Browse configuration_group
Browse counter
Browse counter_history
Browse countries
Browse coupons
Browse coupons_description
Browse coupon_email_track
Browse coupon_gv_customer
Browse coupon_gv_queue
Browse coupon_redeem_track
Browse coupon_restrict
Browse currencies
Browse customers
Browse customers_basket
Browse customers_basket_attributes
Browse customers_info
Browse db_cache
Browse email_archive
Browse ezpages
Browse featured
Browse files_uploaded
Browse geo_zones
Browse get_terms_to_filter
Browse group_pricing
Browse languages
Browse layout_boxes
Browse manufacturers
Browse manufacturers_info
Browse media_clips
Browse media_manager
Browse media_to_products
Browse media_types
Browse meta_tags_categories_description
Browse meta_tags_products_description
Browse music_genre
Browse newsletters
Browse orders
Browse orders_products
Browse orders_products_attributes
Browse orders_products_download
Browse orders_status
Browse orders_status_history
Browse orders_total
Browse paypal
Browse paypal_payment_status
Browse paypal_payment_status_history
Browse paypal_session
Browse paypal_testing
Browse products
Browse products_attributes
Browse products_attributes_download
Browse products_description
Browse products_discount_quantity
Browse products_notifications
Browse products_options
Browse products_options_types
Browse products_options_values
Browse products_options_values_to_products_options
Browse products_to_categories
Browse product_music_extra
Browse product_types
Browse product_types_to_category
Browse product_type_layout
Browse project_version
Browse project_version_history
Browse query_builder
Browse record_artists
Browse record_artists_info
Browse record_company
Browse record_company_info
Browse reviews
Browse reviews_description
Browse salemaker_sales
Browse sessions
Browse specials
Browse tax_class
Browse tax_rates
Browse template_select
Browse upgrade_exceptions
Browse whos_online
Browse zones
Browse zones_to_geo_zones
##################################################___
I was only in the admin section editing things and in there I used the insert option in hopes of creating a new admin account.

20 Jun 2013, 1:42 PM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: admin password

chattunnel:

the login page says "LOGIN_EXPIRY_NOTICE" at the bottom and the reset email says "TEXT_EMAIL_MESSAGE_PWD_RESET"

This suggests a faulty/bad installation. Generally missing files, occasionally the files have been uploaded to the wrong places, and in some occasions, the files simply aren't readable (permissions). The latter doesn't occur without manual intervention.

chattunnel:

I think there is some code here not right which files do I edit the code

IF it exists, it will/should be
../renamed_admin/includes/languages/english/login.php

Having told you that, BEFORE you go 'editing' this file you should check your error logs to see if it does actually have an error. With the info provided to us so far, my current thinking firstly, this folder/file doesn't exist, and secondly, if it does exist, it has an error that needs to be rectified. Yes, this will probably involve editing the file, but if you intention is to edit "LOGIN_EXPIRY_NOTICE" so it reads something like 'Please be aware that after 15 minutes of inactivity, you will be required to login again'. then you are barking in the wrong forrest. The UPPER_CASE_TEXT is telling us the relevant /language/* file(s) can't be read.
This may or may not be the result of a previous edit.

This will have nothing to do with the zencart database.

chattunnel:

The sql commands were a mix of the same thing " DELETE FROM admin WHERE admin_name = 'Admin'; INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level) VALUES ('Admin', 'admin"

If I assume that this is an actual example of one of the commands used, if entered exactly as given, it will produce an SQL syntax error. If this is a truncated example of one of the commands sent, then you've messed up with the 'admin_email' data entry. 'admin' is not a valid email address.

chattunnel:

I was in the zen cart mysql database changing the admin table in hopes of changing the password.

Question. Was you seeing the
"LOGIN_EXPIRY_NOTICE" at the bottom and the reset email says "TEXT_EMAIL_MESSAGE_PWD_RESET" before you started your 'editing' or did this start after you made some edits?

chattunnel:

I was only in the admin section editing things and in there I used the insert option in hopes of creating a new admin account.

You currently have more than one thing to fix. The UPPER_CASE_TEXT (which will have nothing to do with admin logins or the database), as well as the login problem, which may or may not have had its origins in whatever caused or is causing the UPPER_CASE problem. If that wasn't bad enough, if the login problem was caused by the UPPER_CASE problem, then fixing that 1st would have fixed the login problem (in all likelihood), but the situation now is that your mysql commands have almost certainly trashed the admin table, which is why instead of one problem to fix, you now have at least two.

Methinks the UPPER_CASE_TEXT issue should be the 1st thing to fix. If you still can't login I'd be inclined to restore just your admin table from a backup. This will ensure that the table structure is intact, and if you are lucky, your old password will now work.
If after you've restored this table from backup, and you still have no luck, then use the following link and enter the SQL comands relevant to your installation.

http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it%29

If you deviate from these steps (ie, if you skip the restore from backup) it may still get you going again, but if it doesn't, and you neglect to mention you've skipped this step we will/could start heading down a long murky road to nowhere.
Also, if you deviate from these steps it is easily possible for you to introduce yet another problem.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

20 Jun 2013, 5:57 PM
#9
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

IF it exists, it will/should be
../renamed_admin/includes/languages/english/login.php

Having told you that, BEFORE you go 'editing' this file you should check your error logs to see if it does actually have an error. With the info provided to us so far, my current thinking firstly, this folder/file doesn't exist, and secondly, if it does exist, it has an error that needs to be rectified. Yes, this will probably involve editing the file, but if you intention is to edit "LOGIN_EXPIRY_NOTICE" so it reads something like 'Please be aware that after 15 minutes of inactivity, you will be required to login again'. then you are barking in the wrong forrest. The UPPER_CASE_TEXT is telling us the relevant /language/* file(s) can't be read.
This may or may not be the result of a previous edit.

This will have nothing to do with the zencart database.

I will go through your trouble shooting list one by one starting from the top as not to get ahead of myself and head through merky water. I copied the login.php code directly from the zen cart download and pasted it onto the file on the server. Nothing changed I'm still getting the LOGIN_EXPIRY_NOTICE at the bottom of the page. I'm still waiting on the resend email message.

20 Jun 2013, 6:15 PM
#10
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

I was gonna ask if I can manually add a admin account and then change my password when I'm in the cpanel.

20 Jun 2013, 7:13 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: admin password

chattunnel:

I was gonna ask if I can manually add a admin account and then change my password when I'm in the cpanel.

Yes, but if you've damaged your admin table by deleting fields, as you said, then you really need to start by restoring that whole table's structure and data from backup.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Jun 2013, 12:09 AM
#12
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

what will be lost with the database admin backup restore and I possibly might have the backup.

21 Jun 2013, 12:42 AM
#13
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

this is what the database admin table reads in phpmyadmin:
Field 	Type 	Collation 	Attributes 	Null 	Default 	Extra 	Action
	admin_id 	int(11) 			No 		auto_increment 	
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	admin_name 	varchar(32) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	admin_email 	varchar(96) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	admin_profile 	int(11) 			No 	0 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	admin_pass 	varchar(40) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	prev_pass1 	varchar(40) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	prev_pass2 	varchar(40) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	prev_pass3 	varchar(40) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	pwd_last_change_date 	datetime 			No 	0000-00-00 00:00:00 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	reset_token 	varchar(60) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	last_modified 	datetime 			No 	0000-00-00 00:00:00 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	last_login_date 	datetime 			No 	0000-00-00 00:00:00 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	last_login_ip 	varchar(15) 	utf8_general_ci 		No 			
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	failed_logins 	smallint(4) 		UNSIGNED 	No 	0 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	lockout_expires 	int(11) 			No 	0 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	last_failed_attempt 	datetime 			No 	0000-00-00 00:00:00 		
Browse distinct valuesBrowse distinct values
	
ChangeChange
	
DropDrop
	
PrimaryPrimary
	
UniqueUnique
	
IndexIndex
	
FulltextFulltext
	last_failed_ip 	varchar(15) 	utf8_general_ci 		No
21 Jun 2013, 1:58 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: admin password

What error do you get when you follow the password-reset instructions? [http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password

](http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it%29)

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Jun 2013, 8:16 AM
#16
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: admin password

chattunnel:

here is the database admin table http://wucharity.com/table.html

That looks intact. That means you don't need to restore from a backup (at least not for this aspect of your problem(s).

You should be able to login again by following these instructions:
http://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-%28i-lost-it%29

If not, then I suggest you report the error message before doing anything else.

This won't take care of your UPPER_CASE_TEXT problem (which personally, is the 1st thing I would have tackled), so if/when you can login agian you'll still need to treat this as a separate issue.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

21 Jun 2013, 11:23 AM
#17
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

okay I ran this same command earlier " DELETE FROM admin WHERE admin_name = 'Admin';
INSERT INTO admin (admin_name, admin_email, admin_pass, admin_profile)
VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1); "

which prefixes do I edit for example if my admin directory and database name is dradmin

21 Jun 2013, 1:31 PM
#18
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: admin password

chattunnel:

okay I ran this same command earlier " DELETE FROM admin WHERE admin_name = 'Admin';
INSERT INTO admin (admin_name, admin_email, admin_pass, admin_profile)
VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1); "

which prefixes do I edit for example if my admin directory and database name is dradmin

You really must get out of the habit of thinking you need to edit anything and everything you come across.

To answer your question, you don't have any prefixes to edit. You should be able to login to your store now using Admin/admin.

Suggest you do this really quick, before someone beats you too it and changes it on you. (Not to mention giving them full access to the store)

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

21 Jun 2013, 11:59 PM
#19
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

NOTE: If you are using a prefix for your database tables, you'll naturally need to add that prefix to the table name above.
ie. "DELETE FROM prefix_admin ... " and "INSERT INTO prefix_admin ..." ... replacing "prefix_" with your actual tablename prefix.

22 Jun 2013, 12:15 AM
#20
chattunnel avatar

chattunnel

New Zenner

Join Date:
Aug 2012
Posts:
45
Plugin Contributions:
0

Re: admin password

great I got in without using prefixes. Funny thing is I used this command before but when logging in I forgot to use the uppercase in Admin for the username. Thanks for all your help guys.