Welcome, Guest. Please login or register.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - janet

Pages: [1]
1
Installation / Re: Can't get LDAP to work
« on: October 16, 2020, 10:20:11 am »
I did this to html/inc/libldap.php, and then used "anonymous" as my username and password.  I also fixed the email and phone ldapmap variables, as they were mapping incorrectly.   I now have a working LDAP system.

--- html/inc/libldap.php   2020-04-29 04:51:45.000000000 -0700
+++ /var/nedi/html/inc/libldap.php   2020-10-16 01:12:44.033321496 -0700
@@ -81,10 +81,10 @@

    if( $ldap_connection ){
       $fields=array('ldap_login'=>$ldapsrv[5],
-         'ldap_field_email'=>$ldapmap[6],
+         'ldap_field_email'=>$ldapmap[7],
          'ldap_field_realname'=>'sn',
          'ldap_field_firstname'=>'givenname',
-         'ldap_field_phone'=>$ldapmap[7],
+         'ldap_field_phone'=>$ldapmap[8],
          'ldap_field_title'=>'title'
       );
       $fields   = array_filter($fields);
@@ -187,7 +187,7 @@
          }
       }
       // Auth bind
-      if( $login != '' ){
+      if( $login != 'anonymous' ){
          $b = ldap_bind($ds, $login, $password);
       }else{ // Anonymous bind
          $b = ldap_bind($ds);

2
Installation / Re: Can't get LDAP to work
« on: October 15, 2020, 04:39:21 pm »
My problem seems to be that I need to use an anonymous bind.  How do I tell nedi to use nothing for a username and password? I tried '', "", and leaving it blank, but none work.

3
Installation / Can't get LDAP to work
« on: October 15, 2020, 03:54:09 pm »
Here is an example of what I use for Apache:

  AuthType Basic
  AuthBasicProvider ldap
  AuthName "LDAP Password"
  AuthLDAPUrl "ldaps://ldap/ou=people,dc=company-name,dc=com?uid"
  Require ldap-group cn=networkrw,ou=groups,dc=company-name,dc=com
  AuthLDAPGroupAttributeIsDN off
  AuthLDAPGroupAttribute memberUid

Can anyone help translate that into NeDi speak?

4
Database / NeDI 1.9 - Custom Port?
« on: October 11, 2020, 09:22:47 am »
Well, I was trying to work around a problem I had with NeDi and my mariadb.  Our security folk won't let us run databases on default ports or sockets.  While I can define dbhost like this:

dbhost      127.0.0.1:3402

Only nedi.pl works.  The web GUI doesn't.  Really, all I want is the ability to do this in the config:

dbhost      127.0.0.1
dbport      3402
cactihost  127.0.0.1
cactiport   3402

Right now I use 127.0.0.1:3402 for dbhost and cactihost, and hacked /html/inc/libdb-mysql.php.  That said, my solution is ugly - I don't know php, so I just did this:

function DbConnect($host,$user,$pass,$db){
        $host = '127.0.0.1';
        $port = 3402;
        $l = mysqli_connect($host,$user,$pass,$db,$port) or die("Could not connect to $db@$host $port with $user");
        mysqli_set_charset($l, "utf8");                                                                 # Some stubborn servers need this, tx Nils
        return $l;
}

It works, but its an ugly hard coded hack. 

5
Database / NeDI 1.9 - is there a way to point to a custom MySQL socket file?
« on: September 25, 2020, 11:44:03 am »
I tried setting dbhost to the path to my socket, but it didn't work.  Is there a way to use a socket?

Pages: [1]