Page 1 of 1

Is it possible to edit the new user email?

Posted: Thu Aug 21, 2014 3:49 pm
by snapon_admin
When you create a new user there's a checkbox to "Email User Account Information", but if you use active directory I'm not sure that works. When creating a new user using the AD component I've always just copied the users AD user ID and then left the password fields the way they are. There are *** in the field, but I'm not sure if there's actually anything there. Anyway, I've always avoided checking the Email User Account Information box because, if I recall correctly, the first time I tried that it sent the user the correct User ID, but a password with just random junk there. Is there a way to modify the email that is sent to look something like the below example for the username and password part?
User ID: pr6449
Password: Your domain password

Re: Is it possible to edit the new user email?

Posted: Thu Aug 21, 2014 4:09 pm
by abrist
No. The reason is Nagios does not have access to the password (nor the hash even). It authenticates the user/password against the AD server. This would have to be an email sent from your AD box, not the Nagios server. Does that make sense?

Re: Is it possible to edit the new user email?

Posted: Thu Aug 21, 2014 4:23 pm
by snapon_admin
Sort of...though I don't want it to send the user the password. I just want it to send the user the text "Your domain password". Are you saying the email is sent from the AD server though? I just assumed it was sent by the Nagios server, but if I'm mistaken on that then that makes sense.

Re: Is it possible to edit the new user email?

Posted: Thu Aug 21, 2014 5:08 pm
by abrist
Ah, the email is sent from the Nagios XI box. I just misunderstood you. This is possible. You would have to change the php source, hardcoding that message to the password string:
In the file:

Code: Select all

/usr/local/nagiosxi/html/admin/users.php
Change line # 1088 from:

Code: Select all

$message = sprintf($lstr['AccountCreatedEmailMessage'], $username, $password, $url);
To:

Code: Select all

$message = sprintf($lstr['AccountCreatedEmailMessage'], $username, "Your Domain Password", $url);
This change will most likely be overwritten with updates, so back up the change, or at least document it for future upgardes.

Re: Is it possible to edit the new user email?

Posted: Thu Aug 21, 2014 10:15 pm
by Box293
That would be a good feature to have in a drop down list.

If the "add user code" detected that the AD Component was installed and configured then it presents you with a drop down allowing you to select something like:
  • Use the password typed above
    Your Domain Password
Something like that perhaps.