Reset passwordretrycount for all users
From Brandonhutchinson.com
(Difference between revisions)
m |
|||
| Line 1: | Line 1: | ||
| - | Quick steps to reset '' | + | Quick steps to reset ''passwordRetryCount'' to 0 for all users in the LDAP ''passwd'' database: |
$ '''[ -f /tmp/reset_passwordretrycount.ldif ] && rm /tmp/reset_passwordretrycount.ldif''' | $ '''[ -f /tmp/reset_passwordretrycount.ldif ] && rm /tmp/reset_passwordretrycount.ldif''' | ||
$ '''ldaplist passwd | grep -v '^$' | while read LINE ; do /bin/echo "$LINE\nchangetype: modify\nreplace: passwordretrycount\npasswordretrycount: 0\n" >> /tmp/reset_passwordretrycount.ldif ; done''' | $ '''ldaplist passwd | grep -v '^$' | while read LINE ; do /bin/echo "$LINE\nchangetype: modify\nreplace: passwordretrycount\npasswordretrycount: 0\n" >> /tmp/reset_passwordretrycount.ldif ; done''' | ||
$ '''ldapmodify -h ''LDAP_server'' -D "cn=Directory Manager" -w ''BIND_password'' -f /tmp/reset_passwordretrycount.ldif''' | $ '''ldapmodify -h ''LDAP_server'' -D "cn=Directory Manager" -w ''BIND_password'' -f /tmp/reset_passwordretrycount.ldif''' | ||
Revision as of 21:14, 13 December 2007
Quick steps to reset passwordRetryCount to 0 for all users in the LDAP passwd database:
$ [ -f /tmp/reset_passwordretrycount.ldif ] && rm /tmp/reset_passwordretrycount.ldif $ ldaplist passwd | grep -v '^$' | while read LINE ; do /bin/echo "$LINE\nchangetype: modify\nreplace: passwordretrycount\npasswordretrycount: 0\n" >> /tmp/reset_passwordretrycount.ldif ; done $ ldapmodify -h LDAP_server -D "cn=Directory Manager" -w BIND_password -f /tmp/reset_passwordretrycount.ldif
