LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 09-08-2007, 03:39 PM   #1
thoron!
LQ Newbie
 
Registered: Jul 2007
Location: ohio
Distribution: Slackware, FreeBSD
Posts: 26

Rep: Reputation: 15
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
 
Old 09-08-2007, 03:42 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
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.
 
Old 09-08-2007, 03:46 PM   #3
thoron!
LQ Newbie
 
Registered: Jul 2007
Location: ohio
Distribution: Slackware, FreeBSD
Posts: 26

Original Poster
Rep: Reputation: 15
$ ls -l /usr/bin/uptime
---xr--r-- 2 root wheel 11416 Jan 11 2007 /usr/bin/uptime
$
 
Old 09-08-2007, 04:11 PM   #4
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
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
 
Old 09-08-2007, 04:11 PM   #5
thoron!
LQ Newbie
 
Registered: Jul 2007
Location: ohio
Distribution: Slackware, FreeBSD
Posts: 26

Original Poster
Rep: Reputation: 15
so how do i make that so everyone can run uptime
 
Old 09-08-2007, 04:13 PM   #6
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
Code:
# chmod 755 /usr/bin/uptime
Will restore the default permissions
 
Old 09-08-2007, 04:23 PM   #7
thoron!
LQ Newbie
 
Registered: Jul 2007
Location: ohio
Distribution: Slackware, FreeBSD
Posts: 26

Original Poster
Rep: Reputation: 15
ahh kewl thnx for the help that fixed it

Last edited by thoron!; 09-08-2007 at 04:31 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why lftp command run failed when user isn't root, but ok when logining as root steven_yu Linux - Software 0 06-06-2007 08:36 PM
cdparanoia works as root but not as user arubin Linux - Software 8 11-21-2004 02:37 PM
X only works with root user joe83 Slackware 14 09-06-2004 08:17 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 04:14 PM
sound works with root not user shanenin Linux - Software 3 10-29-2003 06:05 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration