Reset passwordretrycount for all users

From Brandonhutchinson.com

(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
$ '''ldaplist passwd | grep -v '^$' | \
$ '''ldaplist passwd | grep -v '^$' | \
-
> while read LINE ; do \
+
> '''while read LINE ; do \'''
-
> /bin/echo "$LINE\nchangetype: modify\nreplace: passwordretrycount\npasswordretrycount: 0\n" \
+
> '''/bin/echo "$LINE\nchangetype: modify\nreplace: passwordretrycount\npasswordretrycount: 0\n" \'''
-
> ; done | ldapmodify -h ''LDAP_server'' -D "cn=Directory Manager" -w ''BIND_password''
+
> '''; done | ldapmodify -h ''LDAP_server'' -D "cn=Directory Manager" -w ''BIND_password'''''

Revision as of 21:19, 13 December 2007

Quick steps to reset passwordRetryCount to 0 for all users in the LDAP passwd database:

$ ldaplist passwd | grep -v '^$' | \
> while read LINE ; do \
> /bin/echo "$LINE\nchangetype: modify\nreplace: passwordretrycount\npasswordretrycount: 0\n" \
> ; done | ldapmodify -h LDAP_server -D "cn=Directory Manager" -w BIND_password
Personal tools