User Import , Standard Password

All about webserver configurations, PHP and databases.

Moderator: Thorsten

Post Reply
xeli
Posts: 1
Joined: Mon Jul 14, 2014 1:42 pm

User Import , Standard Password

Post by xeli » Mon Jul 14, 2014 1:44 pm

Hi,
I Importet a list of User in directly in the DB.
How can i set a Standard Password for any User?
Regrads,
ELi

Thorsten
Posts: 14480
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: User Import , Standard Password

Post by Thorsten » Mon Jul 14, 2014 6:52 pm

Hi,

you can use this little PHP script:

Code: Select all

<?php
$user = "admin";
$password= "test";
$salt = "43e35fc8593ea7313d934d4f839c63de";
$pass = hash('sha256', $password . $salt . $user);
echo $pass;
The salt can be found in the faqconfig table, entry "security.salt"

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

skione
Posts: 8
Joined: Mon Mar 09, 2015 3:18 pm

Re: User Import , Standard Password

Post by skione » Thu Jul 30, 2015 4:53 am

Is this still the right way because it is not working for me.

Thorsten
Posts: 14480
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: User Import , Standard Password

Post by Thorsten » Thu Jul 30, 2015 7:06 pm

Hi,

yes, do you use "your" salt?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests