Re: Machine vérolée
BERTRAND Joël a écrit :
> #!/bin/bash
>
> if [ $1 == "/usr/bin/rlog" ]; then exit 0; fi
> if [ $1 == "/usr/bin/rcsdiff" ]; then exit 0; fi
> logger -i "shell $*"
> for i in $(pstree -p); do logger -i $i; done
>
> exec $*
Ce script ne fonctionne pas correctement. J'ai essayé ceci, mais le
résultat est identique.
#!/bin/bash
logger -i "shell $@"
exec "$@"
Par mail, je reçois par exemple
/bin/sh: ligne 8: /var/lib/munin/if [ -x /usr/bin/munin-cron ]; then
/usr/bin/munin-cron; fi > /dev/null 2>&1: Aucun fichier ou dossier de ce
type
Je suppose qu'il y un truc à faire avec les redirections, mais je sèche.
Bien cordialement,
JB
Reply to: