Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. bundle agent password_security {
  2.  
  3. files:
  4.  
  5. centos.redhat::
  6.  
  7. "/etc/pam.d/system-auth"
  8.  
  9. edit_line => harden_cracklib;
  10.  
  11. }
  12.  
  13.  
  14.  
  15. bundle edit_line harden_cracklib {
  16.  
  17. vars:
  18.  
  19. "cracklib_options" string => "retry=3";
  20.  
  21. "account_tally_options" string => "per_user deny=6 no_magic_root reset";
  22.  
  23. "auth_tally_options" string => "onerr=fail no_magic_root";
  24.  
  25.  
  26.  
  27. delete_lines:
  28.  
  29. "password";
  30.  
  31. "auth";
  32.  
  33. "account";
  34.  
  35.  
  36.  
  37. insert_lines:
  38.  
  39. "auth required pam_tally.so $(auth_tally_options)" location => pamsysauth("auth");
  40.  
  41. "account required pam_tally.so $(account_tally_options)" location => pamsysauth("account");
  42.  
  43. "password required pam_cracklib.so $(cracklib_options)" location => pamsysauth("password");
  44.  
  45.  
  46.  
  47. }
  48.  
  49.  
  50.  
  51. body location pamsysauth(block) {
  52.  
  53. select_line_matching => "^$(block)";
  54.  
  55. before_after => "after";
  56.  
  57. first_last => "last";
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement