[Pkg-nagios-devel] Bug#677844: Bug#677844: icinga-web: postinst fails to set root passwd - MYSQL_PWD env var not working

tomdeb t at tomdeb.org
Mon Jun 18 11:17:07 UTC 2012


Hello Markus,

Thanks for your quick reply.

Here is the output of the postinst script:
==============================================================================
Creating config file /etc/icinga-web/conf.d/database-ido.xml with new version
database config successful: /etc/icinga-web/conf.d/database-ido.xml
ERROR 1045 (28000): Access denied for user 'icinga_web'@'localhost'
(using password: YES)
dpkg: error processing icinga-web (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 icinga-web
E: Sub-process /usr/bin/dpkg returned an error code (1)
==============================================================================

Following your reply, I did some more testing and the cause is
definitely my .my.cnf.
I can reproduce the error when install as my user (who has a .my.cnf) with sudo.
The issue does not occur when .my.cnf is removed.

I had a look at
http://dev.mysql.com/doc/refman/5.5/en/password-security-user.html and
even though using the -p parameter is not advised, the use of
MYSQL_PWD is not recommended either.

Regards,

Thomas Debost

On 17 June 2012 13:09, Markus Frosch <markus at lazyfrosch.de> wrote:
> tags 677844 unreproducible moreinfo
> thanks
>
> Hello Tom,
> thanks for your report.
>
>> The password previously stored in $MYSQL_PWD is not working.
>
>
> I'm afraid I can't confirm the problem with my sid VM, MySQL is the same
> version as yours.
>
> Is it possible to share the output of the postinst script, what exactly is
> the error?
>
> Do you have any mysql connection info defined via .my.cnf or the global
> my.cnf?
>
> Are there any special chars in your password that might cause the problem?
>
>>        echo "UPDATE nsm_user SET user_password='""$pwhash_e""', user_salt
>> = '""$salt_e""' WHERE user_name = 'root';" \
>>                     | mysql -h "${dbc_dbhost:=localhost}" -u "$dbc_dbuser"
>> -p$dbc_dbpass "$dbc_dbname"
>
>
> I'd not like to use this due to the root password will be visible via ps or
> the /proc filesystem...
>
> Please
> see http://dev.mysql.com/doc/refman/5.5/en/password-security-user.html
>
> Best Regards
> Markus Frosch
>
> --
> Markus Frosch
> markus at lazyfrosch.de
> http://www.lazyfrosch.de





More information about the Pkg-nagios-devel mailing list