Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-15-2006, 03:36 PM   #1
Registered: Dec 2005
Location: St Petersburg, FL, USA
Posts: 219

Rep: Reputation: 30
possible to run iftop as non-root?

I'd like to run iftop without su. Is it possible?

If not, can I create a non-root login that only displays iftop, and logs out when exiting?

I need to give our general manager access to iftop (or equivalent if theres something better), so he can see who's killing the network bandwidth without bugging me.
Old 11-15-2006, 08:33 PM   #2
Registered: May 2001
Posts: 29,359
Blog Entries: 55

Rep: Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546Reputation: 3546
If it's a no login thing then maybe you could make it output to another tty say 11 or 12. Else if it's a local no-password login then you could run a wrapper shell that runs iftop and exits if iftop stops. If it's a remote login then you should set the authorized_key entry to only run a sudo command and set a NOPASSWD sudo entry. If iftop can run a subshell (can vaguely remember trying it ages ago so I can't remember) run it through "noexec" or equivalent. If just a single shot picture is needed you could skip the login present output in a CGI webpage? Under no circumstances should you chmod the binary setuid if it's not meant to run that way (and even if).
Just some thoughts.
Old 11-16-2006, 09:38 AM   #3
Registered: Dec 2005
Location: St Petersburg, FL, USA
Posts: 219

Original Poster
Rep: Reputation: 30

I decided to give him a shell account, and went with the sudo option. Works great!

Old 01-18-2010, 10:25 AM   #4
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 670
Blog Entries: 7

Rep: Reputation: 31
This is an old thread. However when you give sudo on iftop, the user can execute ! in iftop and this allows him to execute root commands from whitin iftop.


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
Can't run X as root! t-smurf Linux - Software 2 10-04-2005 01:49 PM
Run First As Root? Terje Linux - Software 1 01-10-2005 08:13 AM
I have to ssh -l root to run root processes!? paul.nel Red Hat 3 11-15-2004 11:55 AM
iftop will not load mahjong Linux - Software 0 10-16-2003 09:27 AM
LimeWire installed as root, can't run if not root sulzla Linux - Newbie 1 07-01-2003 07:48 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:28 PM.

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