Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Rsyslog records user operation records

Shulou Source: shulou.com Published: 2022-06-01 04:46:21 10月05日 Update

1. Environment:

1. System: Centos 6.4,

2. Role description

Server: 172.28.26.188

Client: 172.28.26.189

II. Deployment:

1. Server:

Yum-y install rsyslog

Vi / etc/sysconfig/rsyslog

SYSLOGD_OPTIONS= "- c 2-r 514-x-m 240" KLOGD_OPTIONS= "- x"

Restart the service

/ etc/init.d/rsyslog restart

2. Client:

Echo "*. * @ 172.28.26.188 514" > / etc/rsyslog.conf

Restart the service:

/ etc/init.d/rsyslog restartvi / etc/bashrc adds the following: export PROMPT_COMMAND=' {msg=$ (history 1 | {read x y; echo $y;}); logger "[euid=$ (whoami)]": $(whoami): [`pwd`] "$msg";} 'source / etc/bashrc

Tags: Services customers clients content environment systems roles users Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info Shulou Information Shulou Technology Docker