Deleted 'dmesg' by mistake....
Hi all, I had upgraded from slackware 13 to 13.1 and finally 13.37.
After this I noticed that 'dmesg' could only be executed as root. So inorder for a user to execute 'dmesg' I executed 'ln -s /bin/dmesg /usr/bin/dmesg'. What happened next is the symlink was created but the dmesg executable was deleted. I do not want to reinstall the OS (very time consuming on a P3 with 512MB RAM) so I want to know which package provides dmesg so that I can reinstall it. The dmesg man page indicated that klogd will provide the package but then when I reinstalled it it was a no go. Can someone tell me how to get the dmesg back? Thanks for your help. |
Hi, dmesg is provided by util-linux-ng (in the /a series).
TIP: 'grep <filename> /var/log/packages/*' will tell you which package(s) provide <filename>, if installed. |
Not being able to run dmesg as an ordinary user is a security feature added to more recent kernels. You can enable it for users by running
Code:
sysctl -w kernel.dmesg_restrict=0 |
You can also get the information which package contains with slackpkg, like
Code:
slackpkg file-search dmesg |
Quote:
Code:
/sbin/sysctl -e -p /etc/sysctl.conf |
Quote:
Code:
grep somefilename /var/log/packages/* |
Quote:
At any rate Files in /bin are executable by users. Code:
-rwxr-xr-x 1 root root 9432 Feb 16 14:34 /bin/dmesg* The solutions have already been posted, with T3slider's post here being the preferred method. |
Thanks for all your answers guys - I also learnt some tricks here which would undoubtedly help me in the future.
|
All times are GMT -5. The time now is 04:24 PM. |