Tried accessing kernel logs after 5.10.5-zen update with dmesg and got this.
dmesg: read kernel buffer failed: Operation not permitted
New default for kernel.dmesg_restrict
is the reason, for both linux
and linux-zen
.
committed 01:12AM - 31 Dec 20 UTC
Default on Debian, and seems to be reasonable for us since we also don't
allow access to the system journal by default.
git-svn-id:...
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_SECURITY_DMESG_RESTRICT=y
Annoying have to type in long root password for each dmesg use, seeing the potential security threat for this is so low for a home user.
Easy to reset though, if you feel the same way.
sudo sysctl kernel.dmesg_restrict=0
And persist this setting across boots.
echo 'kernel.dmesg_restrict=0' | sudo tee -a /etc/sysctl.d/99-sysctl.conf
5 Likes
that been more than 2 years that dmesg need sudo …
6 Likes
BS86
January 12, 2021, 3:03pm
3
2 Likes
You can try journalctl -k
if your user is a member of a privileged group. To quote man journalctl
:
Members of the groups “systemd-journal”, “adm”, and “wheel” can read all journal files. Note that the two latter groups traditionally have additional privileges specified by the distribution. Members of the “wheel” group can often perform administrative tasks.
2 Likes
What are you talking about?
I even included the github commit changing the default from not set to restricted, @BS86 included a forum thread.
The setting may have been available for years, but it was not enabled in Arch by default.
IMHO this is overkill for a home users, and particularly annoying with a lengthy root password, others opinions may differ