sudo ile detayli komut loglama

Kullanilan UNIX/Linux sistemde kullanicilarin girdigi komutlari zahmetsiz loglamak icin onlari sudo kullanmaya zorlayabilirsiniz. Sudo ile kullanicinin girdigi tum komutlar bizim belirledigimiz bir dosyaya loglanacaktir, bu dosyadan istenilen kullaniciya ait loglar ayiklanabilir.

Komutlarin loglanacagi dosyayi olusturalim,

#touch /var/log/sudo
sonrasinda visudo komutu ile bu dosyayi sudo'ya gosterelim.

#visudo
acilan editorde en alt satira gidip

Defaults logfile=/var/log/sudo

satirini ekle.

Sonuc:

girilen komut

# sudo user add -g wheel -s /bin/sh -d /home/huzeyfe huzeyfe

sudo tarafindan sisteme girilen kayit,

May 14 11:47:29 : root : TTY=ttyp0 ; PWD=/root ; USER=root ;
COMMAND=/usr/sbin/user add -g wheel -s /bin/sh -d /home/huzeyfe huzeyfe

detay bilgi icin her zamanki gibi "man 8 sudo"

This entry was posted in Linux Security. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

4 × 4 =