Not really. As you noted, this is covered in the man
page:
-s |
--no-promiscuous
Use this parameter to prevent from setting the interface(s) into promiscuous mode.
Use this parameter to prevent from setting the interface(s) into promiscuous mode.
An interface in promiscuous
mode will accept ALL Ethernet frames, regardless of whether they directed
(addressed)
to the specific network interface (NIC) or not. This is an essential part of enabling ntop to monitor an entire
network. (Without promiscuous mode, ntop will only see traffic directed to the specific host it is running on,
plus broadcast traffic such as the arp and dhcp protocols.
to the specific network interface (NIC) or not. This is an essential part of enabling ntop to monitor an entire
network. (Without promiscuous mode, ntop will only see traffic directed to the specific host it is running on,
plus broadcast traffic such as the arp and dhcp protocols.
Even if you use this
parameter, the interface could well be in promiscuous mode if another
application enabled it.
ntop passes this setting on to
libpcap, the packet capture library. On many systems, a
non-promiscuous open
of
the network interface will fail, since the libpcap function on most systems require it to capture raw packets (
ntop captures raw packets so that we may view and analyze the layer 2 - MAC - information).
the network interface will fail, since the libpcap function on most systems require it to capture raw packets (
ntop captures raw packets so that we may view and analyze the layer 2 - MAC - information).
Thus on most systems, ntop
must probably still be started as root, and this option is largely
ornamental. If
it
fails, you will see a ***FATALERROR*** message referring to pcap_open_live() and then an information message,
"Sorry, but on this system, even with -s, it appears that ntop must be started as root".
fails, you will see a ***FATALERROR*** message referring to pcap_open_live() and then an information message,
"Sorry, but on this system, even with -s, it appears that ntop must be started as root".
File ownership really just represents where (on either side
of dropping privileges) ntop first opens the file. You can chown them all
to the ntop userid/group and things will work fine.
As the man page says, in most OSes the ability
to open an interface in promiscuous mode - so ntop sees packets - is what
requires root. Since the basic expectation is that ntop runs as a network
monitor on it's own box, this isn't a big deal.
Technically, there's no requirement in libpcap to run as root - it would
be correct function to honor the promisc flag as a non-root user if the OS
allowed it. None that I'm aware of do.
In
fact, within ntop there is code to attempt to open promiscuous as other than
root, but since the OS doesn't allow it, it fails. It might work if
you were to install libpcap with the suid bit? But, (1) I don't think
this would help and (2) That potentially raises it's own set of
issues.
Lastly, if you set the sticky bit on the ntop executable, ntop will try
and BECOME root. Whether the OS allows this and under what conditions is
up to the OS. In fact, ntop goes beyond the usual sticky bit executable,
as it prompts for as tests the root password, so IMHO there's little
benefit vs. starting as root.
Personally, I use sudo on the /etc/init.d/ntop file (which is owned by
and restricted to root).
ntop ALL = NOPASSWD:
/etc/init.d/ntop restart
ntop ALL = NOPASSWD: /etc/init.d/ntopdevel *
ntop ALL = NOPASSWD: /etc/init.d/ntopdevel *
That allows the ntop userid to restart the production
instance, but to provide any options to the development
instance.
-----Burton
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Riccardo Rosso
Sent: Thursday, April 14, 2005 5:02 AM
To: [email protected]
Subject: [Ntop] running ntop as an unprivileged user
I would like not to
run ntop as root but (let's imagine) as a ntop user.
I read the man
saying that reduced privileges can lead in non promiscuous working of ntop (so
useless).
Moreover the
installation dir and the rrd files are owned by root and nobody is let to write
them.
Have you some
suggestions to give ?
Thanks,
best
regards,
Riccardo
###########################################This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
_______________________________________________ Ntop mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop
