Changeset 4973


Ignore:
Timestamp:
May 30, 2017, 2:04:22 PM (23 months ago)
Author:
jrpelegrina
Message:

WIP in fix bug in ldap connection and user load

Location:
lliurex-openmeetings/trunk/fuentes/install-files/usr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lliurex-openmeetings/trunk/fuentes/install-files/usr/sbin/lliurex-openmeetings

    r646 r4973  
    347347                client=xmlrpclib.ServerProxy("https://localhost:9779")
    348348                vars=client.get_variable_list("","VariablesManager",["CLIENT_LDAP_URI_NOSSL","LDAP_BASE_DN"])
    349                 vars["CLIENT_LDAP_URI"]=vars["CLIENT_LDAP_URI_NOSSL"].replace("=",":")
    350                 vars["LDAP_BASE_DN"]=vars["LDAP_BASE_DN"].replace("=",":")
     349                #vars["CLIENT_LDAP_URI"]=vars["CLIENT_LDAP_URI_NOSSL"].replace("=",":")
     350                vars["CLIENT_LDAP_URI"]=vars["CLIENT_LDAP_URI_NOSSL"]
     351                #vars["LDAP_BASE_DN"]=vars["LDAP_BASE_DN"].replace("=",":")
     352                vars["LDAP_BASE_DN"]=vars["LDAP_BASE_DN"]
    351353               
    352354                f=open("/etc/lliurex-secrets/passgen/ldap.secret")
  • lliurex-openmeetings/trunk/fuentes/install-files/usr/share/lliurex-openmeetings/lliurex-files/lliurex_ldap.cfg

    r635 r4973  
    2929#LDAP URL
    3030# This is the URL used to access your LDAP server.
    31 
    32 # can be a simple URL like:
    33 #   ldap_conn_url=ldap://myldap.myorg.com
    34 # or a list of simple URL separated by a space as in:
    35 #   ldap_conn_url=ldap://myldap.myorg.com ldap://myldap2.myorg.com
    3631# if you want to use "ldaps://" links, please be aware that you need to import your CA certificate
    3732#  to a java keystore and add the -Djavax.net.ssl.keyStore, -Djavax.net.ssl.keyStorePassword,
     
    4035ldap_conn_url={{ CLIENT_LDAP_URI_NOSSL }}
    4136
    42 #Login distinguished name (DN) for Authentification on LDAP Server - keep emtpy if not requiered
    43 # Use DN with with ":" instead of "=". The conversion will be done in OM
    44 ldap_admin_dn=cn:admin,{{ LDAP_BASE_DN }}
     37# Login distinguished name (DN) for Authentication on LDAP Server - keep empty if not required
     38# Use full qualified LDAP DN
     39ldap_admin_dn=cn=admin,{{ LDAP_BASE_DN }}
    4540
    4641#Loginpass for Authentification on LDAP Server - keep emtpy if not requiered
     
    4843
    4944#base to search for userdata(of user, that wants to login)
    50 # Use DN with with "/:" instead of "=". The conversion will be done in OM
    5145ldap_search_base={{ LDAP_BASE_DN }}
    5246
    5347# Fieldnames (can differ between Ldap servers)
    5448field_user_principal=uid
     49ldap_search_query=(uid=%s)
    5550
    56 # Ldap auth type(SIMPLE,NONE)
    57 #  When using SIMPLE a simple bind is performed on the LDAP server to check user authentication
     51# the scope of the search might be: OBJECT, ONELEVEL, SUBTREE
     52ldap_search_scope=SUBTREE
     53
     54# Ldap auth type(NONE, SEARCHANDBIND, SIMPLEBIND)
     55#  When using SIMPLEBIND a simple bind is performed on the LDAP server to check user authentication
    5856#  When using NONE, the Ldap server is not used for authentication
    59 ldap_auth_type=SIMPLE
     57ldap_auth_type=SEARCHANDBIND
     58
    6059
    6160# Ldap-password synchronization to OM DB
  • lliurex-openmeetings/trunk/fuentes/install-files/usr/share/n4d/python-plugins/LliurexOpenmeetings.py

    r635 r4973  
    8383                                lastname=user["sn"]
    8484                                language_id="8"
    85                                 level_id=str(user_type)
     85                                #level_id=str(user_type)
    8686                                login=user["uid"]
    8787                                #password=mysql_password("lliurex")
     
    9999
    100100                                        print "* Adding %s to OpenMeetings ... "%login
    101                                         query="INSERT INTO `om_user` VALUES (NULL,NULL,NOW(),1,'\0',NULL,NULL,'%s','\0',%s,NOW(),'%s',0,%s,'%s',NULL,%s,NULL,NOW(),NULL,1,'\0','\0','\1',NOW(),1,'Europe/Madrid','user',NULL,'','',NULL,NULL)"
    102                                         def_query=query%(firstname,language_id,lastname,level_id,login,password)
     101                                        #query="INSERT INTO `om_user` VALUES (NULL,NULL,NOW(),1,'\0',NULL,NULL,'%s','\0',%s,NOW(),'%s',0,%s,'%s',NULL,%s,NULL,NOW(),NULL,1,'\0','\0','\1',NOW(),1,'Europe/Madrid','user',NULL,'','',NULL,NULL)"
     102                                        query="INSERT INTO `om_user` VALUES (NULL,NULL,NOW(),'\0',NULL,NULL,NULL,'%s','\0',%s,NOW(),'%s',0,'%s',NULL,%s,NULL,NOW(),NULL,1,'\0','\0',1,NOW(),'Europe/Madrid','user',NULL,'','',NULL,NULL)"
     103                                        #def_query=query%(firstname,language_id,lastname,level_id,login,password)
     104                                        def_query=query%(firstname,language_id,lastname,login,password)
     105
    103106                                        cur.execute(def_query) 
    104107                                        cur.execute("SELECT MAX(id) from om_user WHERE login='%s'"%login)
Note: See TracChangeset for help on using the changeset viewer.