Jump to content

Generate a password with a bash script


Sébastien

Recommended Posts

Hi,

 

I use a bash script to install Prestashop 1.7.2.4 on the domains of my clients.

For added security, I would like to generate a unique administrator password for each client.

So I would like to know how is generated the password in Prestashop 1.7.2.4 to generate it in my script.

Link to comment
Share on other sites

Typically a user installs Prestashop from the browser, and they supply a value for their admin password, and then Prestashop uses the following code to hash it

md5(_COOKIE_KEY_.$passwd);

However if you are using a bash script, then I assume you are using /install/index_cli.php to install Prestashop via a console?

If that is the case, then you should be passing the admin password as an argument to index_cli.php

Can't you just use a random password generator in unix to create a random password and then pass that value to the index_cli.php ?

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...