LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (http://www.linuxquestions.org/questions/%2Absd-17/)
-   -   uptime command only works for root user (http://www.linuxquestions.org/questions/%2Absd-17/uptime-command-only-works-for-root-user-583221/)

thoron! 09-08-2007 04:39 PM

uptime command only works for root user
 
on my freebsd box the uptime command only works for the root user how can i make it so all users can execute the uptime command

frob23 09-08-2007 04:42 PM

What does the following command produce?

Code:

ls -l /usr/bin/uptime
I've never seen this before... but it's probably a permission thing.

thoron! 09-08-2007 04:46 PM

$ ls -l /usr/bin/uptime
---xr--r-- 2 root wheel 11416 Jan 11 2007 /usr/bin/uptime
$

phil.d.g 09-08-2007 05:11 PM

I would be a bit suspicious there. Might be a sign of a compromised box, they are not particularly sane permissions. They should be
Code:

-r-xr-xr-x  2 root  wheel  11416 Oct  5  2006 /usr/bin/uptime
A hardened setup might be
Code:

-r-xr-x---  2 root  wheel  11416 Oct  5  2006 /usr/bin/uptime

thoron! 09-08-2007 05:11 PM

so how do i make that so everyone can run uptime

phil.d.g 09-08-2007 05:13 PM

Code:

# chmod 755 /usr/bin/uptime
Will restore the default permissions

thoron! 09-08-2007 05:23 PM

ahh kewl thnx for the help that fixed it


All times are GMT -5. The time now is 04:38 PM.