Homepage | Products | OX Knowledge Base | Support | Try Now | Contact | Company
OX Logo
Results 1 to 8 of 8
  1. #1

    Default Change LDAP password

    Hi forum!

    I use oxldapsync with open-xchange.

    The LDAP server in on a separate host.

    When I change the password in my OX the password is not changed in my ldap. It is possible when I change the password in the OX automatically is changed in the ldap.

    Best regards!

    Joan

  2. #2
    Carsten Hoeger is offline Open-Xchange Professional Services
    Join Date
    Mar 2007
    Posts
    703

    Default

    You could try to use the package open-xchange-passwordchange-script. That allows to run a script to do such stuff.
    OXpedia.org - the answer to almost all questions.

  3. #3

    Default

    Hi,

    I install this package, but I don't find any information to buid this script.

    Have you a example script?....

    Thanks!

    Joan

  4. #4
    Carsten Hoeger is offline Open-Xchange Professional Services
    Join Date
    Mar 2007
    Posts
    703

    Default

    I just created an article in the Wiki containing an example:

    http://www.open-xchange.com/wiki/ind...sswordExternal
    OXpedia.org - the answer to almost all questions.

  5. #5

    Default

    Sorry my ineptitude, but I can't put my command to change the LDAP user password is your script.

    The command that I use to change the password in the LDAP is:

    ldappasswd -h my_ldap_server -D "uid=my_user,ou=people,dc=example,dc=com" -w old_password -s new_password "uid=my_user,ou=people,dc=example,dc=com"

    or if you want prompt passwords:

    ldappasswd -h my_ldap_server -D "uid=my_user,ou=people,dc=example,dc=com" -W -S "uid=my_user,ou=people,dc=example,dc=com"

    Thanks for your attention,

    Joan

  6. #6
    Join Date
    Mar 2007
    Posts
    23

    Default

    Hi Joan,

    the open-xchange-passwordchange-script returns some values:

    # 1. --cid - Context ID
    # 2. --username - Username of the logged in user
    # 3. --userid - User ID of the logged in user
    # 4. --oldpassword - Old user password
    # 5. --newpassword - New user password

    if you are using ldappasswd, maybe do you need use /bin/bash scripts with tipical $1,$2,$3 args.

    Please, test it using this example:

    vim /bin/changepw.sh
    #!/bin/bash
    echo ox-return $1 $2 > /tmp/returns.sh

    Regards
    Last edited by dioni; 01-23-2010 at 11:30 PM.

  7. #7

    Default

    Hi Dioni,

    It works!, this is my "simple" changepwd.sh to change the ldap password in a openldap server:

    #!/bin/bash
    ldappasswd -h my_ldap_server -D "uid=$4,ou=people,dc=example,dc=com" -w $8 -s ${10} "uid=$4,ou=people,dc=example,dc=com"

    Thanks for yours very usefull instructions!

    Best regards,

    Joan

  8. #8
    Carsten Hoeger is offline Open-Xchange Professional Services
    Join Date
    Mar 2007
    Posts
    703

    Default

    Great!

    I added this as example to

    http://www.open-xchange.com/wiki/ind...ample_Script_2
    OXpedia.org - the answer to almost all questions.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •