Subject: logging problem

From: Giovanni Armanino <[email-masked]>
Date: Tue, 6 Jul 1999 20:57:57 +0200 (MET DST)

Hi all,

reading my archive of this list I found the following
about logging with 2.5.0:

Quoting from 'Gregory A Lundberg' message:
> Date: Wed, 26 May 1999 12:03:15 -0400 (EDT)
> From: Gregory A Lundberg <[email-masked]>
> Subject: Re: Logging
> 
> On Wed, 26 May 1999, ryanm wrote:
> 
> > Does anyone here know how I can define wu_ftpd to log everything to
> > /var/adm/xferlog?? Presently I have this in my /etc/ftpaccess
> > 
> > log commands real
> > log transfers anonymous,real inbound,outbound
> > 
> > But I want logins and other info logged also. I would like everything
> > logged to /var/adm/xferlog. Also sometimes I get delete requests sent
> > to /var/adm/messages and I cannot figure out why.
> 
> you can't get there from here.  but you can go another way.
> 
> the daemon does not have any feature to record anything in the xferlog
> except actual file transfers.
> 
> but what you can do is tell the daemon (version 2.5.0) to log the
> transfers to the system log.
> 
>   log syslog
> 
> or to both the syslog and xferlog
> 
>   log syslog+xferlog
> 

mmm ok, it works as expected, I mean everythings in syslog defined file
and transfers in xferlog ...
but connection to the ftpd daemon are not logged anywhere ...
I mean something similar to the hp-ux (oh yes, this is the platform
where I'm trying to run the 2.5.0 daemon) bundled daemon who logs
as following ...

Jul  6 19:29:04 server ftpd[13285]: FTP LOGIN FROM PC-xxxx.my-domain.it, armanino

On my system wu-ftpd is logging without remote site info in syslog
Jul  6 19:35:51 server ftpd[14434]: USER armanino

my ftpaccess logging part looks like

log syslog+xferlog
log security anonymous,guest,real
log commands anonymous,guest,real
log transfers anonymous,guest,real inbound,outbound

is this a misconfiguration of my daemon, an hp-ux porting problem, a bug or
what?

Moreover, on another of my box with linux everything looks ok ...
Jul  6 19:23:20 linux-box ftpd[490]: ANONYMOUS FTP LOGIN FROM PC-xxxx.my-domain.it [xxx.xxx.xxx.xxx], giovanni@

Any help will be very appreciated.

regards,
	Giovanni

-- 
  ----------                                                    --------------
   Giovanni Armanino			E-mail: [email-masked]
   C.N.R.				Phone:  +39 50 593 299
   Istituto Applicazioni Telematiche	Fax:    +39 50 904052
   via S. Maria, 36			Telex:  500371 I CNUCE
   56126 PISA  Italy
  ----------                                                    --------------

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 7 Jul 1999 09:20:04 -0400

On Tue, Jul 06, 1999 at 08:57:57PM +0200, Giovanni Armanino wrote:

> and transfers in xferlog ...  but connection to the ftpd daemon are not
> logged anywhere ...  I mean something similar to the hp-ux (oh yes, this
> is the platform where I'm trying to run the 2.5.0 daemon) bundled daemon
> who logs as following ...
> 

First guess: it's a misconfigured syslog daemon, or the daemon is sending
the log messages somewhere you're not expecting it to.

-- 

Gregory A Lundberg              WU-FTPD Development Group
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Giovanni Armanino <[email-masked]>
Date: Fri, 9 Jul 1999 13:01:00 +0200 (MET DST)

Quoting from 'Gregory A Lundberg' message:
> > is this a misconfiguration of my daemon, an hp-ux porting problem, a bug =
> or
> > what?
> 

OPS, It was a stupid problem :( ... and now it has been solved
I just forgot the "-l" option in startup parameters :( ....

Ok, but now I have another problem, still tied with logging or similar.

As I told before, I'm running 2.5.0 daemon on hpux10.20.
I compiled with all defaults using the hp ansi c compiler.
the problem now is that the ftpd, even writing in the wtmp,
doesn't write all used info:

sample of 'last -R' output

....
armanino ftp                           Thu Jul  8 16:02 - 16:03  (00:00)
guest    ftp                           Thu Jul  8 15:58 - 16:02  (00:03)
ftp      ftp                           Thu Jul  8 15:57 - 15:58  (00:00)
armanino ttyp3        PC-xxxxxx.xxxxxx Thu Jul  8 15:28 - 15:38  (00:10)
....

as you can see the remote host name is missed.

Note that the ftpd bundled with hpux10.20 reports correctly the user's
host name for each ftp session recorded in the wtmp. So, I think
it should not just be a 'last command' problem as for old Solaris ...

I tried also to add '-w', even if it's the default, to startup parameters,
but nothing changes.

Has anyone any suggestion to solve the wtmp problem?

thanks in advance and regards,

	giovanni

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 9 Jul 1999 08:17:46 -0400

On Fri, Jul 09, 1999 at 01:01:00PM +0200, Giovanni Armanino wrote:

> As I told before, I'm running 2.5.0 daemon on hpux10.20.  I compiled with
> all defaults using the hp ansi c compiler.  the problem now is that the
> ftpd, even writing in the wtmp, doesn't write all used info:
> 
> host name for each ftp session recorded in the wtmp. So, I think it
> should not just be a 'last command' problem as for old Solaris ...
> 
> I tried also to add '-w', even if it's the default, to startup
> parameters, but nothing changes.
> 

src/logwtmp.c is where you need to look.

Most likely (after a quick read-through) you need HAVE_UT_UT_HOST defined.
That would be in src/config/config.hpx

Caveats:

 - I got bored with seeing all that junk in my wtmp so I don't bother to
   log it any more.  So I don't recall if the hostname was logged on my
   system.  I s'pose I could turn it on to check if it's a real problem.

 - I run Linux, not HP/UX.

--