nconf not generating encrypted passwords for nagios

Support requests, bug reports, questions etc.
Locked
rainer_d
beginner
beginner
Posts:5
Joined:Wed Jun 10, 2009 20:11
nconf not generating encrypted passwords for nagios

Post by rainer_d » Wed Jun 10, 2009 20:59

Hi,

somehow, nconf is not generating encrypted passwords (I changed nconf.php to crypt and a salt) in the nagios.htpasswd file.
nconf-1.2.4

Other than that, it seems to be working quite OK.


Looking forward to 1.2.5.

Any idea what the reason for this could be?
It's a bit annoying ;-)

User avatar
agargiulo
NConf developer
NConf developer
Posts:725
Joined:Fri Mar 06, 2009 17:50
Location:Zurich, Switzerland
Contact:

Re: nconf not generating encrypted passwords for nagios

Post by agargiulo » Thu Jun 11, 2009 09:48

Hi. We need a little more details. You have activated encryption and set it to "crypt" ? Have you enabled the "user_password" attribute for your contacts? Where do you see that it's unencrypted? In the database directly?

Please tell us your software versions: OS and PHP version

rainer_d
beginner
beginner
Posts:5
Joined:Wed Jun 10, 2009 20:11

Re: nconf not generating encrypted passwords for nagios

Post by rainer_d » Thu Jun 11, 2009 12:12

agargiulo wrote:Hi. We need a little more details. You have activated encryption and set it to "crypt" ?
In config/nconf.php, I set:

define('PASSWD_ENC', "crypt");
define('CRYPT_SALT', "xx");
Have you enabled the "user_password" attribute for your contacts?
Yes.
At least, I can enter a password for the user in the GUI.
Where do you see that it's unencrypted? In the database directly?
I didn't look there, admittedly. I only see it in the htpasswd file that is generated by the export of the configuration.

Please tell us your software versions: OS and PHP version
[/quote]

It's FreeBSD7 and PHP 5.2.6
I've had no time to update it to the latest versions.
When does the next version of nconf get released?
;-)

User avatar
agargiulo
NConf developer
NConf developer
Posts:725
Joined:Fri Mar 06, 2009 17:50
Location:Zurich, Switzerland
Contact:

Re: nconf not generating encrypted passwords for nagios

Post by agargiulo » Thu Jun 11, 2009 12:39

There might be a problem with the PHP function "crypt()" on your system. PHP relies on libcrypt, which is part of glibc. So it might be possible that crypt() is not fully supported by your C libraries.

Solution:
Try updating to PHP 5.3. The PHP documentation sais:
Note: As of PHP 5.3.0, PHP contains its own implementation and will use that if the system lacks of support for one or more of the algorithms.
Hope this helps...

Locked