You are not logged in.
Hi All,
How does one stop systemd-journald logging to console?
I don't like the way that systemd-journald broadcasts messages to all consoles
In /etc/systemd/journald.conf I have set ForwardToConsole=no
Done the "systemctl restart systemd-journald"
It will still broadcast
Just login at a any user run the command
logger -p local3.emerg test
that would broadcast Broadcast message from systemd-journald@whatever ( that date )
It goes to all consoles, have I missed something here -- can't even stop the messages via doing
systemctl stop systemd-journald
How does one control logging to console?
Offline
This is not the default behaviour, so presumably it is enabled somewhere (in your kernel line)?
Not a Sysadmin issue, moving to NC...
Offline
This is not the default behaviour
Not sure what you mean, I get the same behavior as OP with
$ cat /proc/cmdline
BOOT_IMAGE=../vmlinuz-linux root=/dev/sda1 rw quiet systemd.show_status=0 modprobe.blacklist=pcspkr initrd=../intel-ucode.img,../initramfs-linux.img
Did you test it yourself?
Offline
Test what? The journal doesn't log to consoles by default.
Offline
Have you tried the command 'logger -p local3.emerg test'?
Where did it log to on your system?
Offline
It logged to the journal:
Feb 19 22:05:49 Shiv login[11747]: LOGIN ON tty4 BY jason
Feb 19 22:05:52 Shiv jason[11962]: test
Offline
O.K. yes good -- does the same for me,
Now it's more of what else it does, and anyone can test this -- for me that message ends up on every opened gnome-terminal and xterm that I have opened -- even console screens
Even if other users are on the same system, that message would have broadcast on their terminals as well -- That should never happen.. it's starting to look like a security issue as well.
Now another test using a what is meant to be a unprivileged user
useradd -c "Silly User" -m sillyuser
give that user a password and login on another terminal or even ssh into that server/workstation from another workstation.
and that user do 'logger -p local3.emerg "Ha Ha I'm writing to your screen"'
Better still have that unprivileged user put that in a while loop
while true; do 'logger -p local3.emerg "Ha Ha I'm writing to your screen"'; done
That message in the default setup of Arch Linux would have broadcast to every open terminal on that workstation -- that is seriously not good.
I discovered this is what I call a fault while evaluating Apache and php code and via remotely accessing the app website.
I have tried without success to switch off this broadcast messing from emerg level logging.. via setting in /etc/systemd/journald.conf and via "systemctl restart systemd-journald"
This simple question here, is how does one switch off that silly broadcast logging to terminals?
Offline
In /etc/systemd/journald.conf I have set ForwardToConsole=no
That is the default. You want to disable ForwardToWall (only one that's enabled by default and it only forwards emerg level messages unless you change MaxLevelWall.)
Offline
Thanks heaps your got it.. that works
edit /etc/systemd/journald.conf
ForwardToWall=no
systemctl restart systemd-journald
problem gone -- that will be the default for all of my Arch Linux machines from now on or any Linux systems using systemd journal system
Now can anyone tell me why would ForwardToWall be enabled by default? what use is it, as it could cause loss of use of the terminals.
Cheers
Offline
Offline