Bypass Authentication

Information and discussions relating to the Nagios Mobile addon.

Bypass Authentication

Postby PhearCVBz » Thu Sep 24, 2015 2:44 pm

Hello....just looking to bypass the sign on screen. Seems like it should be simple but I'm having issues. Can anybody let me know what I need to do for this? Thanks.
PhearCVBz
 
Posts: 5
Joined: Thu Sep 24, 2015 2:41 pm

Re: Bypass Authentication

Postby tmcdonald » Thu Sep 24, 2015 2:54 pm

Are you trying to just disable authentication? I am pretty sure we use sessions so disabling login altogether would be no small change, but we could maybe auto-fill some credentials so you just have to click Login.
Former Nagios employee
tmcdonald
 
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Bypass Authentication

Postby PhearCVBz » Thu Sep 24, 2015 3:02 pm

Basically I just want to be able to go to http://server/nagiosmobile and have it shoot me right in without having to log in. I've tried modifying the nagiosmobile.conf file and commenting out the auth and require valid-user lines, but then I get a 403 error when trying to access the page. I have a similar set up on my regular nagios install, and it bypasses the authentication fine. I've looked at the include.inc.php file under the user line where it says "you can hard-code the nagiosadmin if you dont want any authentication". I'm not really exactly sure what that means, or how to format it in there properly. Thanks very much.
PhearCVBz
 
Posts: 5
Joined: Thu Sep 24, 2015 2:41 pm

Re: Bypass Authentication

Postby jdalrymple » Thu Sep 24, 2015 4:45 pm

Do you not have this line in your config?

Code: Select all
$USER = ''; //you can hard-code the 'nagiosadmin' if you don't want any authentication: NOT RECOMMENDED!!


It's self explanatory.
jdalrymple
Skynet Drone
 
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Bypass Authentication

Postby PhearCVBz » Thu Sep 24, 2015 4:48 pm

Yes I have that but I can't get it to work. I'm apparently doing something wrong.
PhearCVBz
 
Posts: 5
Joined: Thu Sep 24, 2015 2:41 pm

Re: Bypass Authentication

Postby PhearCVBz » Fri Sep 25, 2015 6:35 am

jdalrymple wrote:Do you not have this line in your config?

Code: Select all
$USER = ''; //you can hard-code the 'nagiosadmin' if you don't want any authentication: NOT RECOMMENDED!!


It's self explanatory.


Was wondering exactly what I should put in there....Obviously I have the username and password, but I'm not sure what kind of formatting it's looking for. Sorry if this is a dumb question. Thanks.
PhearCVBz
 
Posts: 5
Joined: Thu Sep 24, 2015 2:41 pm

Re: Bypass Authentication

Postby hsmith » Fri Sep 25, 2015 12:26 pm

Hi PhearCVBz,

Is this an installation you did yourself, or the one that comes with Nagios XI?
Former Nagios Employee.
me.
User avatar
hsmith
Agent Smith
 
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1

Re: Bypass Authentication

Postby PhearCVBz » Fri Sep 25, 2015 12:34 pm

hsmith wrote:Hi PhearCVBz,

Is this an installation you did yourself, or the one that comes with Nagios XI?


Hi, I did this myself on Nagios Core. Everything else seems to be working fine, I just can't get this part to work :-(.
PhearCVBz
 
Posts: 5
Joined: Thu Sep 24, 2015 2:41 pm

Re: Bypass Authentication

Postby hsmith » Fri Sep 25, 2015 1:14 pm

Disclaimer: I can't imagine these are the best security practices. :geek:

I got this working on my machine by changing

Code: Select all
$USER = '';


to

Code: Select all
$USER = 'nagiosadmin';


and editing /etc/httpd/conf.d/nagiosmobile.conf

Code: Select all
######Use the below lines for a SOURCE install of Nagios Core
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users


  Require valid-user


to

Code: Select all
######Use the below lines for a SOURCE install of Nagios Core
#   AuthName "Nagios Access"
#   AuthType Basic
#   AuthUserFile /usr/local/nagios/etc/htpasswd.users

#   Require valid-user
Former Nagios Employee.
me.
User avatar
hsmith
Agent Smith
 
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1


Return to Nagios Mobile

Who is online

Users browsing this forum: Google [Bot] and 1 guest