Re: [sabayon] user profile LDAP



On 5/10/2010 3:55 PM, irfan irfan wrote:
Any one can help me, how to use sabayon user profile via LDAP this in my configuration
sabayon-apply-2.29.92-1.fc12.i686

cat /etc/sabayon/users.xml
<profiles>
 <ldap server="ldap.example.com">
  <profilemap search_base="dc=example,dc=com"
           scope="one"
           query_filter="(uid=%u)"
           result_attribute="sabayonProfileURL"/>
  </ldap>
  <default profile=""/>
</profiles>



This is similar to the config I used to get my profiles working.  Only the server name and search base is different.

After doing this, make sure you load the sabayon.schema file in your LDAP server.  If you're using OpenLDAP with the slapd.conf file, do this by adding the following line at the bottom of your included files in slapd.conf:

include /etc/openldap/schema/sabayon.schema

Then restart your LDAP server.

Next, add the sabayonProfileURLObject objectclass to the LDAP user or users which need to have the profile applied.

Next, add the sabayonProfileURL attribute to the same user or users.  In the attribute enter the URL to your profile zip file.  For example:

http://webserver.example.com/TestProfile.zip.  The path for the sabayonProfileURL is case sensitive but the path for the sabayonProfileName is not, according to the descriptions of those attributes in the sabayon.schema.

Now, you should be able to login and have the profile applied.


I got error, ldap still contact to localhost, if i edit /usr/lib/python2.6/site-packages/sabayon/systemdb.py
...
uris = get_setting (ldap_node, "uri", "ldap://ldap.example.com")
...
it`s works. How to configuration ldap server on xml file without editing systemdb.py

I didn't have to edit any files at all.  I'm using Sabayon 2.22.1.

I hope this information helps.

Alex



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]