TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ntop/chroot questions



	I just started using ntop (network top) today, and it seems
like a cool and useful tool. has anyone else used it/had any
experience with it?
	I might like to leave it running for some time; but I see that
it runs as root (it's installed SUID by default). I decided to try
chrooting it (partly as a learning exercise with chroot); but I can't
seem to make chroot work. :(
	here's how I have things set up so far:

[root@loop /home/ntop]# ls -alF
total 7
drwx------   6 root     root         1024 Jun 23 13:37 ./
drwxr-xr-x  15 root     root         1024 Jun 23 11:26 ../
-rw-------   1 root     root          123 Jun 23 12:01 .bash_history
drwx------   2 root     root         1024 Jun 23 13:30 bin/
drwx------   3 root     root         1024 Jun 23 12:51 etc/
drwx------   2 root     root         1024 Jun 23 13:37 root/
drwx------   2 root     root         1024 Jun 23 12:49 sbin/
[root@loop /home/ntop]# ls -alF *
bin:
total 370
drwx------   2 root     root         1024 Jun 23 13:30 ./
drwx------   6 root     root         1024 Jun 23 13:37 ../
-rwx------   1 root     root       373176 Jun 23 13:30 bash*

etc:
total 3
drwx------   3 root     root         1024 Jun 23 12:51 ./
drwx------   6 root     root         1024 Jun 23 13:37 ../
drwx------   3 root     root         1024 Jun 23 12:51 ntop/

root:
total 3
drwx------   2 root     root         1024 Jun 23 13:37 ./
drwx------   6 root     root         1024 Jun 23 13:37 ../
-rw-------   1 root     root           41 Jun 23 11:30 .ntop

sbin:
total 253
drwx------   2 root     root         1024 Jun 23 12:49 ./
drwx------   6 root     root         1024 Jun 23 13:37 ../
-rwx------   1 root     root       255928 Jun 23 12:42 ntop*



here's what happens when I try chroot'ing, tho:

[root@loop /home/ntop]# chroot /home/ntop/ sbin/ntop
chroot: cannot execute sbin/ntop: No such file or directory

[root@loop /home/ntop]# chroot /home/ntop/
chroot: cannot execute /bin/bash: No such file or directory

as one can see from the above listing, those files very well *are*
present; and AFAIK, have the right permissions. I can launch those
particular files just fine (bin/bash, sbin/ntop), when I don't chroot.

what am I missing here? I'm sure it's something obvious...

Carl Soderstrom
_________________________________________
Systems Administrator    307 Brighton Ave. 
Minnesota DHIA	         Buffalo, MN	
carls@agritech.com       (763) 682-1091