0

In Linux, before a window manager is running, if I hit the Windows key from a console (or alt+F12), I can see kernel messages. I would like to disable the kernel messages from displaying at all since sensitive information could be displayed even before a user is authenticated on the system.

Where do I make this change, /etc/inittab, or some other file?

I did a grep for 12 in /etc and see /etc/rc.conf (I'm on gentoo) and the number of ttys allocated is 12. I am changing this to the number I actually have assigned gettys which is 6, hoping that will disable the kernel output since there should not be anything on that tty. It is interesting though why the kernel output is just on tty12 and not 7 - 12.

  • Rename the title to a round sentence. Since you have more than 300 rep, also you have a reopen vote about your own questions. – peterh Oct 14 '17 at 12:09
0

That is a kernel command line option, set at boot. It's usually part of grub's configuration (in /etc/default/grub). Look for this line:

GRUB_CMDLINE_LINUX="console=tty12"

After editing, you'll need to run update-grub with root privileges. Make sure your /boot partition is mounted before the update, if it's a separate partition.

  • Ah, so, since it's part of the kernel, then if I build my own kernel, I can simply disable it there too, right? – Walter Oct 15 '17 at 10:43
  • Actually, not sure how I missed this earlier when grepping, but /etc/syslog-ng/syslog-ng.conf has the configuration to log to tty12 by default. I will update that, but in addition, I should ensure that tty12 isn't configured to display anything. – Walter Oct 15 '17 at 11:06
0

Actually, the problem was syslog, I merely commented / removed these lines:

sed -i "s/^log { source(src); destination(console_all); };/#log { source(src); destination(console_all); };/" /etc/syslog-ng/syslog-ng.conf

sed -i "s/^destination console_all/#destination console_all/" /etc/syslog-ng/syslog-ng.conf

The first one is required, the second one was just to cleanup and ensure I'm not using it anywhere else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.