Skip to content

Instantly share code, notes, and snippets.

@danielquisbert
Last active February 9, 2017 14:08
Show Gist options
  • Save danielquisbert/08cd20d7009525c98e096d67ab4e4c00 to your computer and use it in GitHub Desktop.
Save danielquisbert/08cd20d7009525c98e096d67ab4e4c00 to your computer and use it in GitHub Desktop.
Comandos para CentOS

Activar autocompletado en shell

yum --enablerepo=epel-testing install bash-completion-extras

Enviar alertas de loggeo de root por correo:

**Primero instalar mailx

**editar elarchivo /root/.bashrc y colocar al final del archivo, las siguientes líneas:

sudo yum install mailx

echo 'ALERT - Root Shell Access (ServerName) on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d'(' -f2 | cut -d')' -f1`" your@yourdomain.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment