modify value in ldap

Anonymous
2016-05-02
2016-05-09
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2016-05-02

    Hi,

    i would like to write a template to modify 2 specific attributes in one ldap-entry. The template should do this:
    - template start and a dialog open -> user write search criteria and hit button start
    - template shows values of entry
    - user can change 2 values of specific attributes and click button save
    - template saves new values in ldap

    My problem is to fetch existing value of an attribute and give the user the possibility to change it. All attributes and their values should be displayed, but only 2 should be changeable through the template

    How can i do this ?

    Cheers,
    Chris

     
  • Tihomir Karlovic

    Hi Chris,

    the only way to do such a complex operation is by using a java or vb script. Create a set of input controls to allow useres to setup a search criteria with a button and two more edit boxes (or even grids if attributes are multivalue) for editing. Add an OnClick event to a button. Something like this:

    button.OnClick = btnClick;

    function btnClick(Sender) {
    var filter = ... do whaterever you need to do to assemble the ldap query from a user search criteria here

    sr = session.search('objectclass=posixAccount', filter, 2, 'uid', false);
    outBox1.Text = sr.attributesbyname['attr1'].value;
    outBox2.Text = sr.attributesbyname['attr2'].value;
    }
    

    Have a look at basics here: http://ldapadmin.org/docs/scripts.html.

    If you need more help with this, let me know.

    Cheers,
    Tihomir

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2016-05-09

    Cheers,
    Chris

     


Anonymous

Cancel  Add attachments





Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks