Nagios user in AD for NagiosXI, NCPA and NRPE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Nagios user in AD for NagiosXI, NCPA and NRPE

Post by hbouma »

I am being asked if the local user nagios used by Nagios XI, NCPA agents and NRPE agents could be an AD account instead of a local account on the servers, and what drawbacks using the AD account may introduce.

If the user does need to be a local account, what are the drawbacks of using /sbin/nologin for this user on the agent machines?
User avatar
rexconsulting
Posts: 60
Joined: Fri May 04, 2012 4:27 pm
Location: Oakland, CA
Contact:

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by rexconsulting »

Really good question.

If you used an AD account and AD was not available or a network prevented LDAP lookups for some reason, then Nagios XI/NCPA/NRPE may not work, so you'd have to have some kind of caching (nscd) working well.

As for "/sbin/nologin", that would not work, since Nagios XI/NRPE, and often NCPA are executing scripts in subshells.

Though with some thoughtful code enhancements (not sure how easily), these daemons could be updated to use privilege separation to do most of their work as one user, then execute scripts as another user.

There have been times I have wanted or had to run NRPE as some application user, in order to access data from the application I was checking, but I came up with a little better way and that is to write helper scripts that extract whatever I needed to from the application as the application user, then write files in a shared directory for the NRPE plugin to pick up.
CP
--
Chris Paul
Rex Consulting, Inc
5652 Florence Terrace, Oakland, CA 94611
email: [email protected]
web: http://www.rexconsulting.net
phone, toll-free: +1 (888) 403-8996 ext 1
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by scottwilkerson »

Thanks @rexconsulting, that explains it nicely.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by hbouma »

Hello Scott,

Just to confirm, what rexconsulting is the correct answer? I only ask you to confirm because I am being asked for the official recommendation from Nagios.

Also, what is the recommendation, sticking with a local account or using an AD account?

If we did use a local account, what would be the impact of adding a password to the account?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by scottwilkerson »

hbouma wrote:Also, what is the recommendation, sticking with a local account or using an AD account?
You can use either, the only disadvantage to using an AD account is the setup and the possibility of the AD server being down.
hbouma wrote:If we did use a local account, what would be the impact of adding a password to the account?
There is no impact, this is perfectly acceptable.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
rexconsulting
Posts: 60
Joined: Fri May 04, 2012 4:27 pm
Location: Oakland, CA
Contact:

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by rexconsulting »

I have to ask tho: Why would you want to set a password for the nagios account? Passwords make little sense. Basically having a password says, "anyone can anonymously access this account if they know the password". It's a much better strategy to use sudo, which logs who does what when.
CP
--
Chris Paul
Rex Consulting, Inc
5652 Florence Terrace, Oakland, CA 94611
email: [email protected]
web: http://www.rexconsulting.net
phone, toll-free: +1 (888) 403-8996 ext 1
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by hbouma »

These questions are being asked from far above my head. I am making the same arguments, but still need to have the answers for those asking the questions.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios user in AD for NagiosXI, NCPA and NRPE

Post by scottwilkerson »

rexconsulting wrote:I have to ask tho: Why would you want to set a password for the nagios account? Passwords make little sense. Basically having a password says, "anyone can anonymously access this account if they know the password". It's a much better strategy to use sudo, which logs who does what when.
This is true.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked