cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
369
Views
0
Helpful
0
Replies

Duo skips /etc/profile.d/ and /etc/bash.bashrc

kevinlincdf
Level 1
Level 1

OS: Ubuntu 20 or Ubuntu 22

There is a /etc/profile.d/cmdlog.sh with the following contents:
function log2syslog {
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local2.notice -t cmdlog -- "${USER} ${PWD} [${COMMAND}]"
}
trap log2syslog DEBUG

There is a /etc/rsyslog.d/66-cmdaudit.conf with the following contents:
local2.notice -/var/log/cmdlog

Before DUO, user commands will be logged in /var/log/cmdlog
But after DUO installed, user commands will not be log in /var/log/cmdlog, even if I append the following content to /etc/bash.bashrc
function log2syslog {
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local2.notice -t cmdlog -- "${USER} ${PWD} [${COMMAND}]"
}
trap log2syslog DEBUG

How can I restore the log function to normal?

0 Replies 0
Quick Links