Is it possible to edit the new user email?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

Is it possible to edit the new user email?

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
snapon_admin
Posts: 952
Joined: Mon Jun 10, 2013 10:39 am
Location: Kenosha, WI
Contact:

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

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked