I tried several times to edit this file but after several items it always show up the old default files script. I need to replace lines or edit this file for making a User management Policy.
Commands I used in my script:
# sed '14 i \password requisite pam_cracklib.so try_first_pass retry=3 minlen=8 lcredit=-1 dcredit=1 difok=4 maxrepeat=2 ocredit=1 ucredit=1 /etc/pam.d/system-auth-ac
#sed '15 i \password sufficient pam_unix.so shadow try_first_pass use_authtok remember=6 /etc/pam.d/system-auth-ac
#sed '4 i \auth required pam_tally2.so onerr=fail file=/var/log/faillog deny=6 unlock_time=3600' /etc/pam.d/system-auth-ac
#sed '10 i \account required pam_tally2.so file=/var/log/faillog' /etc/pam.d/system-auth-ac
#sed '13 i \account sufficient pam_localuser.so' /etc/pam.d/system-auth-ac
Above are the commands which i write to add this in my script if anyone has some good suggestion plz put in comments. Help will really be appreciated.