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 »

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: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: User Import , Standard Password

Post by Thorsten »

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 »

Is this still the right way because it is not working for me.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: User Import , Standard Password

Post by Thorsten »

Hi,

yes, do you use "your" salt?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
lombx2
Posts: 3
Joined: Mon Jul 29, 2019 8:43 am

Re: User Import , Standard Password

Post by lombx2 »

deleted german question
sorry, did not recognized, that it is all in english.
Last edited by lombx2 on Tue Jul 30, 2019 5:29 am, edited 1 time in total.
Post Reply