Advertisement
sergio_educacionit

firmado.sh

Feb 25th, 2025
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3.  
  4. ficheros=( /etc/sudoers /etc/pam.d/sshd )
  5.  
  6.  
  7.  
  8. for i in ${ficheros[@]}; do
  9.  
  10. lsattr $i > ${i}.txt
  11. stat $i >> ${i}.txt
  12. cat $i >> ${i}.txt
  13.  
  14. gpg --detach-sign -o ${i}.sig ${i}.txt
  15.  
  16.  
  17. mv ${i}.sig ${i}.txt /root
  18.  
  19. done
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement