Linux install sudo

sudo visudo
# add: Defaults log_output
sudo sudoreplay -l # list sessions
sudo sudoreplay <TSID>
sudo sudoreplay -l | tail
sudo du -h --max-depth=2 /var/log/sudo-io | sort -h | tail
  • mirar antigüedad y peso:
    sudo find /var/log/sudo-io -type f -printf '%TY-%Tm-%Td\n' | sort | uniq -c | head -n 40
    sudo find /var/log/sudo-io -type f -size +100M -exec ls -lh {} \; | head
  • eliminar grabaciones anteriores a 30 días o vacías (menos seq):
    sudo find /var/log/sudo-io -mindepth 2 -type f -mtime +30 -delete
    sudo find /var/log/sudo-io -mindepth 1 -type d -empty -delete
  • eliminar todo (menos seq):
    sudo find /var/log/sudo-io -mindepth 1 -not -name seq -delete
  • rebajar contenido grabado:
    Defaults!/usr/bin/tar !log_output
sudo groupadd su
sudo usermod -a -G su fidmag
sudo dpkg-statoverride --update --add root su 4750 /bin/su

/via: https://www.techrepublic.com/article/how-to-limit-access-to-the-su-command-in-linux/

  • install/security/sudo.txt
  • Darrera modificació: 01/12/2026 10:04
  • per mate