Results 1 to 3 of 3

Thread: Save, modify and restore User Password

  1. #1
    blaise.vogel is offline Starter Member
    Join Date
    Sep 2013
    Rep Power

    Default Save, modify and restore User Password

    I import a lot of .pst files and I don't want to change the user password.

    What I have tried:
    1. save the password (encrypted)
    /opt/zimbra/openldap/bin/ldapsearch -LLL -x -D"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_userdn| awk '{print $3}'`" -w"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password|awk '{print $3}'`" -H `/opt/zimbra/bin/zmlocalconfig ldap_url|awk '{print $3}'` "(uid=test)"
    userPassword:: e1NTSEF9bjkxTFhsbGczUjc2MDJHYTQ5cVVOYUo1WU4xMEtSNj E=

    2. Change the password

    zmprov ma userPassword '123456'

    3. Import the .pst files

    4. Restore the base password

    zmprov ma userPassword '{crypt}e1NTSEF9bjkxTFhsbGczUjc2MDJHYTQ5cVVOYUo1WU 4xMEtSNjE='

    And only this last command doesn't work, the password is changed.
    Is this possible to restore the base password for this user ?

    Any help would be appreciated ;-)


  2. #2
    ppearl's Avatar
    ppearl is offline Zimbra Employee
    Join Date
    Jul 2007
    Rep Power


    Hi Blaise,

    The password you pulled via LDAP is Base64 encoded. Here's one way you can decode it:
    $ perl -MMIME::Base64 -le 'print decode_base64(shift)' e1NTSEF9bjkxTFhsbGczUjc2MDJHYTQ5cVVOYUo1WU4xMEtSNjE=
    If you restore the value to userPassword with that value things should work as expected.

  3. #3
    blaise.vogel is offline Starter Member
    Join Date
    Sep 2013
    Rep Power


    Great ;-)
    That's working fine. Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Password save problem
    By GlooM in forum Administrators
    Replies: 12
    Last Post: 09-01-2013, 02:38 AM
  2. Replies: 1
    Last Post: 07-08-2011, 06:40 AM
  3. modify existing user to have Samba attributes
    By ebourkland in forum Administrators
    Replies: 5
    Last Post: 02-23-2010, 11:20 AM
  4. Password Save
    By MyLive in forum General Questions
    Replies: 0
    Last Post: 08-07-2009, 09:00 AM
  5. Can't modify user accounts
    By jandrews in forum Administrators
    Replies: 6
    Last Post: 05-16-2008, 08:17 AM

Posting Permissions

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