LDAP authentication

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

LDAP authentication

Post by StarLog »

We are running CactiEZ v 0.3 - loaded the php-ldap.

We get authenticated as the log shows, but then I do not know where to go to give the user access.

Code: Select all

 02/13/2008 09:57:12 AM - AUTH LOGIN: User 'admin' Authenticated
02/13/2008 09:56:45 AM - AUTH LOGIN: Access Denied, No guest enabled or template user to copy
02/13/2008 09:56:45 AM - AUTH LOGIN: LDAP User 'tfrench' Authenticated
02/13/2008 09:56:45 AM - AUTH LDAP: Setting protocol version to 3
I have set the guest account to the following:

View graphs
console access
view monitoring
plugin- weathermap.

But I do not see the users name in the user management area.
Cacti v0.8.8a
Weathermap 9.7a
--------------------
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Settings->Authentication, then select a template user.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

Witness,

I thought of that too.

When we go to that section, and look in
User Template:
There is only : "no user" and "admin"

none of the users that we have tried to log in with.

After looking at the "guest account"

I see ENABLED checked
Allow this user to keep custom settings checked
user has rights to tree view checked
user has rights to list view checked
user has rights to preview view checked
authentication LDAP
Realm:
view graphs
console access
view monitoring
pluging weathermap

does this help.?
Cacti v0.8.8a
Weathermap 9.7a
--------------------
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Template users can only be "Authentication Realm" local.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

rony,

mot sure what your telling me, can you explain a bit easier for me.
Thanks
Cacti v0.8.8a
Weathermap 9.7a
--------------------
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

To use a user for a template, it must have "Authentication Realm" set to "Local".

Your "Guest" user is set for "Authentication Realm" of "LDAP".
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

I changed the "guest" account to local as you mentioned, and then tried to log in again. using LDAP.

Below shows that I was authenticated. But still did not show up as a user in the management console. I got the RED text saying contact the Cacti administrator.

Is there something else I can look at.?

Code: Select all

login as: root
root@192.168.111.41's password:
Last login: Thu Feb 14 17:46:36 2008 from 192.168.111.160
[root@m-cornelius ~]# cat /var/www/html/log/cacti.log | grep LDAP
02/14/2008 08:57:51 PM - AUTH LDAP: Setting protocol version to 3
02/14/2008 08:57:51 PM - AUTH LOGIN: LDAP User 'tfrench' Authenticated
[root@m-cornelius ~]#

UPDATE TO ABOVE..

Got it to work, did not realize i had to build out the user, and then enable it and give it LDAP as the authentication realm. All is good in the hood.
Cacti v0.8.8a
Weathermap 9.7a
--------------------
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

If you select a "Template User" that will be used to create a new user with the correct username when a person logs in using LDAP. Otherwise, it will use the "Guest" account.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
pyth
Cacti User
Posts: 94
Joined: Thu Jan 31, 2008 8:45 am
Location: France, Grenoble
Contact:

Post by pyth »

hi all,
I have setup a LDAP authentification, just one problem :

-When it comes to an account with a simple password (ex : lola) its march

-But when it comes to an account with a password with special character (ex: lola$*µ etc...) it does not work.

Can you help me?
Cacti : 0.8.7b
Architecture : 2.0
Settings : 0.3
Thold : 0.3.9
Monitor : 0.8.2
Update : 0.4
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yep, that is a problem to which I currently do not have a solution to.. :(
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
StarLog
Cacti User
Posts: 150
Joined: Sat Jun 02, 2007 3:57 pm

Post by StarLog »

We got it working like this:

LDAP Authentication
no user
no user
our-server-name
389
636
Version 3
none
disabled
no searching
<username>@ourdomain.com
dc=internal,dc=ourdomain,dc=net,dc=local

all other boxes are empty
Cacti v0.8.8a
Weathermap 9.7a
--------------------
lnxflocki
Posts: 5
Joined: Mon Mar 13, 2006 9:32 am

Post by lnxflocki »

pyth wrote:hi all,
I have setup a LDAP authentification, just one problem :

-When it comes to an account with a simple password (ex : lola) its march

-But when it comes to an account with a password with special character (ex: lola$*µ etc...) it does not work.

Can you help me?
rony wrote:Yep, that is a problem to which I currently do not have a solution to.. :(
In auth_login.php on line 102 simply add stripslashes around the get_request_var_post("login_password"). So line 102 should look like this:

Code: Select all

$ldap_auth_response = cacti_ldap_auth($username,stripslashes(get_request_var_post("login_password")),$ldap_dn);
Fixed it for me
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests