Bad user... ONE PROBLEM PER MESSAGE with a MEANINGFUL subject...

First off, try using --set-admin-password without the value and let ntop
prompt you - since it asks for confirmation, that's a better choice, plus
you'll get a message that it's set.

Sounds like Debian changed the permissions on the directory tree where
ntop's files are stored.  Where that is depends on how you configured ntop,
but is typically /usr/share/ntop or /usr/local/share/ntop or some such. The
password database is read/write by root, most of the other files are created
and read/write after ntop changes to the -u userid.

There was a discussion in the back traffic - search @ gmane - about this,
where I posted some recommendations - or look in the packages/RedHat
ntop.init script.  FWIW, here's the permissions I'm running with...

$ ls -l /usr/share | grep ntop
drwxr-xr-x    4 ntop     users        4096 Jan 26 21:45 ntop

$ ls -l /usr/share/ntop
total 1936
-rw-r--r--    1 ntop     users       12288 Jan 26 21:45 addressQueue.db
-rw-r--r--    1 ntop     users      340608 Jan 26 17:59 dnsCache.db
-rwxr-xr-x    1 ntop     users       14310 Aug 11 13:33
etter.passive.os.fp.gz
drwxr-xr-x    3 root     root         4096 Jan 26 15:10 html
-rw-rw-r--    1 ntop     users       12396 Jan 24 10:11 LsWatch.db
-rw-r--r--    1 ntop     users     1077322 Jan 26 20:54 macPrefix.db
-rwxr-xr-x    1 ntop     users        1977 Jan  2  2002 ntop-cert.pem
-rw-r--r--    1 ntop     users       12485 Jan  7 20:10 ntop_pw.db
-rwxr-xr-x    1 ntop     users      314798 Aug 11 13:33 oui.txt.gz
-rwxr-xr-x    1 ntop     users      188262 Sep  6 22:52 p2c.opt.table.gz
-rw-r--r--    1 ntop     users       13399 Jan 26 17:56 prefsCache.db
drwx------    6 ntop     users        4096 Dec 13 11:43 rrd
-rwxr-xr-x    1 ntop     users         749 Apr 24  2003 specialMAC.txt.gz
-rw-r--r--    1 ntop     users         546 Jan 19 17:43 valgrind.supp

All these have going for them is that ntop runs.  The 644 on ntop_pw.db is
not optimal - either chown to root or chmod to 600 would be better.

If you want to look inside the .db files, I posted a simple gdbm dump
program  - http://article.gmane.org/gmane.linux.ntop.general/3557

The one you're interested in is 1admin in ntop_pw.db... set here in admin.c

void setAdminPassword(char* pass) {
  if (pass == NULL)
    addKeyIfMissing("1admin", NULL, 1, 1, "\nPlease enter the password for
the admin user: ");
  else
    addKeyIfMissing("1admin", pass, 1, 1, NULL);
}

$ dumpgdbm /usr/share/ntop/ntop_pw.db
'2resetStats': 'users=1admin'
'    1admin': 'xxxxxxxxxxxxxxxx'
'    2showU': 'users=1admin'
'     2shut': 'users=1admin'
'    2chang': 'users=1admin'
'  2deleteU': 'users=1admin'
'2privacyFlag': 'users=1admin'
'  2modifyU': 'users=1admin'
Records read: 8

-----Burton

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> Thorsten Volkmer-Wolf
> Sent: Tuesday, January 27, 2004 6:55 AM
> To: [EMAIL PROTECTED]
> Subject: [Ntop] Sudden problem with ntop, and a second question...
>
>
> Hi,
>
> at first let me introduce myself, as i'm new to this list.
> Originally finishing my studies as a mechanical engineer, i
> 'jumped onto the IT train' which was running fast when i left
> university. I have made my experiences with SUN SOLARIS, Windows
> and Linux, and i'm working as network administrator in my firm.
> We've set up VPN tunnels between two of our sites, and one of our
> interrests is to see protocol and ports distribution through this
> tunnel. That's when we came to ntop.
>
> Now my question:
>
> After rebooting my Debian Linux (ntop v2.2c) i'm encountering a
> problem i didn't have so far (ntop was running fine for weeks):
> everytime i start ntop using a start script a syslog message is
> left saying
>
>
> Jan 27 11:09:09 hostname ntop[325]: **FATAL_ERROR** No password
> for admin user - please re-run ntop...
>
>
> I started ntop with the option --set-admin-password=onepw, and
> after that i tried again to start ntop via the script (and run it
> as deamon). But still this message appears in syslog and ntop exits.
>
> What's the thing i'm missing? I know, there's something i must
> have changed.....but nothing i'm aware of.
>
>
> The other thing: i know i'll have to provide ntop with a list of
> protocols i want to gather informations of (command line switch
> -p). All of the protocols not mentioned in e.g. a file are beeing
> listed as 'other protocols'. Regarding our tunnels those not
> mentioned protos seem to produce quiet an amount of traffic
> (about 30%). Is there by any chance an easy way to determine
> which protocols this could bee (i don't want to provide a
> protocol list containing each possible proto, and i don't have a
> clue where to start)?
>
>
> Thanks to those who contribute for ntop. Thanks to those who
> developed it and of course thanks to Tobi for rrdTool.
>
> Best regards,
>
>       Thorsten
>
>
>
> ++
> Dipl.-Ing.
> Thorsten Volkmer-Wolf
> IT-Support & Services
>
> AEROTEC Engineering GmbH
> Hein-Sa�-Weg 38
> 21129 Hamburg / Germany
>
> fon +49 (0)40/742 198-241
> fax +49 (0)40/742 198-111
> _______________________________________________
> Ntop mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop
>

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to