Eliminate sudo and pam_unix(sudo:session) log spam
MAAS rack and region controllers poll the status of services every minute, cluttering the logs with messages like the ones below. This change turns disables sudo logging for the maas user. sudo[10061]: maas : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl status ntp sudo[10061]: pam_unix(sudo:session): session opened for user root by (uid=0) sudo[10061]: pam_unix(sudo:session): session closed for user root Change-Id: I18547c5248cf73743cd8c0f26c471854540936eb
This commit is contained in:
parent
8f35260091
commit
25a71bc565
@ -70,5 +70,8 @@ COPY scripts/journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.ser
|
||||
RUN mkdir -p /etc/systemd/system/basic.target.wants ;\
|
||||
ln -s /etc/systemd/system/journalctl-to-tty.service /etc/systemd/system/basic.target.wants/journalctl-to-tty.service
|
||||
|
||||
# quiet sudo for the maas user
|
||||
RUN umask 0337; echo 'Defaults:maas !pam_session, !syslog' > /etc/sudoers.d/99-maas-no-log
|
||||
|
||||
# initalize systemd
|
||||
CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=console 3>&1"]
|
||||
|
@ -98,5 +98,8 @@ COPY journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service
|
||||
RUN mkdir -p /etc/systemd/system/basic.target.wants ;\
|
||||
ln -s /etc/systemd/system/journalctl-to-tty.service /etc/systemd/system/basic.target.wants/journalctl-to-tty.service
|
||||
|
||||
# quiet sudo for the maas user
|
||||
RUN umask 0337; echo 'Defaults:maas !pam_session, !syslog' > /etc/sudoers.d/99-maas-no-log
|
||||
|
||||
# initalize systemd
|
||||
CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=console 3>&1"]
|
||||
|
Loading…
Reference in New Issue
Block a user