Issue #783 has been updated by Christian Iuga.

File checkLdapPwdExpiration.sh added

#Version 0.5 (09/2015):
# - if pwdMaxAge == 0 the password will never expire fix the script to don't 
say user expired
# - Report how many user will never expire
# - fix issue when dn is on multiple line (if not use ldapsearch >= 2.4.24 with 
arg -o ldif-wrap=no)
# - Automatically search for ldapsearch, otherwise quit
# - Display Account missing information 
# - Disabling mail output if mail binary is not found
# - Add argument [--mail|--nomail] to send or not mail to user to notice 
expiration account
# - Add argument [--report|--noreport] to create a csv file about expired 
account 
----------------------------------------
Bug #783: ldap-scripts/trunk/checkLdapPwdExpiration.sh
http://tools.lsc-project.org/issues/783

Author: Christian Iuga
Status: Assigned
Priority: Normal
Assigned to: Clément OUDOT
Category: LDAP Scripts
Target version: ldap-scripts-0.4


I have rewrite this script, major change on it : 

- Use bash instead of sh
- Remove function getTimeInSeconds, use date --date instead
- use bashish instead of expr
- remove deprecated ` ` use instaed $( ) 
- use ldapsearch with -o ldif-wrap=no if version >= 2.4.24
- otherwise get pwdPolicySubentry even it's on 2 lines
- don't use anymore temporay file, use in-memory variable
- add argument of the script : --detail_body|-d to show when the password will 
expire
- simplify the code
- show since when a account is expired (help cleaning unused entry)
- avoid making useless ldapsearch :
  - now : Ldap request = 1 + Nb user + Nb different ppolicy
  - old : Ldap request = 1 + Nb user *3
  - so for 1000k User, it's creating only 1002 ldapsearch before, it's was 3001 
! 
- Performance improvement : Running more than twice quicker



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://tools.lsc-project.org/my/account
_______________________________________________
ltb-dev mailing list
[email protected]
http://lists.ltb-project.org/listinfo/ltb-dev

Reply via email to