-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Predeployment setup password (salt+hash) #263
Comments
You should be able to pregenerate a setup_password, and put it in your config.local.php. The setup_password is a sha1, generated like this https://github.com/postfixadmin/postfixadmin/blob/master/public/setup.php#L443 So, you could create one on the command line if you wish like : php -r 'echo "somesalt:" . sha1("somesalt:" . "password");' |
(You can type any old password into the first page of setup.php and submit the form - then it will prompt you to type in the setup password, and create a user account .... the wording on the form probably needs improving to make this more obvious). |
Hmmm... thats exactly what I did. Anyway: in the form, I typed in the generated password -- and tried to create the user account ... but pfa says something like "If you want to use the password you entered as setup password, edit config.inc.php or config.local.php and set". So ist sounds to me, that the pregenerated hash isnt accepted. All stuff happens here, right? --->
And this is what my Puppemodule generates (config.local.php) :
If I call setup.php once and put the generated hashes into config.local.php (via Puppet, of course) it works. Not with the initially generated ... Spooky... Something with the salt? The salt is generated on another machine. Because the targetsystem doesnt exist at this point..... |
That looks fine to me.... I'll see if i can replicate/test it (but it's likely to be a week before i can do anything). |
Okay, I tried it again. I think, its a problem with the worklflow. If I type in my predefinded password and the adminuser+password, it works BUT I get an error message about the setup password. If I refresh the site, everthing ist fine and I can login with the given adminuser+password. So: you've to ignore the errormessage. But it woud be better, if there is'nt one. Would be less confusing. |
…assword is configured; change verbs depending on context etc; see #263
Hi folks,
I have to automate postfixadmin rollout together with other stuff (postfix, dovecot etc), so teh result is a full featured, standalone mailserver with tools -- like postfixadmin.
I do this with puppet and it would be really nice, if I could manage the Setuppassword with Puppet too. But if I generate a config.local.php with an pregenerated Item (salt+hash), setup.php ignores this and force me to generate a new salt+hash Item. This I have to manually insert into config.local.php -- and this is the opposite of automation ;-)
I'm not that fit with PHP, so maybe someone can help me?
Thanks,
Martin
The text was updated successfully, but these errors were encountered: