linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Logging root activity with syslog-ng
@ 2006-01-02 12:36 Casper Helenius
  2006-01-02 17:04 ` Glynn Clements
  0 siblings, 1 reply; 3+ messages in thread
From: Casper Helenius @ 2006-01-02 12:36 UTC (permalink / raw)
  To: linux-admin

Hi group,

I need to log every root activity on my Gentoo server, running syslog-ng.

I need to log logins (and, if possible, logouts) both by root or by 
users SUDO'ing. I need to log which commands are executed as well as 
their parameters.

Is this at all possible with syslog-ng? And if so, what exactly do I 
need to setup in syslog-ng.conf?

Best regards,

Casper Helenius,
Denmark


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Logging root activity with syslog-ng
  2006-01-02 12:36 Logging root activity with syslog-ng Casper Helenius
@ 2006-01-02 17:04 ` Glynn Clements
  2006-01-02 19:53   ` Stephen Samuel
  0 siblings, 1 reply; 3+ messages in thread
From: Glynn Clements @ 2006-01-02 17:04 UTC (permalink / raw)
  To: Casper Helenius; +Cc: linux-admin


Casper Helenius wrote:

> I need to log every root activity on my Gentoo server, running syslog-ng.
> 
> I need to log logins (and, if possible, logouts) both by root or by 
> users SUDO'ing. I need to log which commands are executed as well as 
> their parameters.

The only way to achieve the last part is to log the raw connection
with e.g. ttysnoop. Even then, there are way to get around it (e.g. 
upload a program and run that; unless you log all of the ways a
program can be uploaded, you won't know what they're actually
running).

Process accounting (CONFIG_BSD_PROCESS_ACCT) will log which programs
are run, but not their arguments or inputs.

Finally, anyone with unrestricted root privilege can disable or
otherwise interfere with logging. And if you're keeping the log files
locally (rather than using a separate logging server or a printer),
they can edit them.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Logging root activity with syslog-ng
  2006-01-02 17:04 ` Glynn Clements
@ 2006-01-02 19:53   ` Stephen Samuel
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Samuel @ 2006-01-02 19:53 UTC (permalink / raw)
  To: Glynn Clements; +Cc: Casper Helenius, linux-admin

you might have some luck using the bsd accounting system
(man acct for a start on the process). this logs each command
run along with the CPU time used.

Although it doesn't log command paramaters,  you might be able to
hack it to do so. -- if so, then please pass on the patches (probably
to the linux-kernel group).

You might also be able to use the selinux logging capabilities to
achieve what you want.  Once Selinux is enabled, you should be
able to use it to prevent disabling of logging.

Glynn Clements wrote:

>Casper Helenius wrote:
>
>  
>
>>I need to log every root activity on my Gentoo server, running syslog-ng.
>>
>>I need to log logins (and, if possible, logouts) both by root or by 
>>users SUDO'ing. I need to log which commands are executed as well as 
>>their parameters.
>>    
>>
>
>The only way to achieve the last part is to log the raw connection
>with e.g. ttysnoop. Even then, there are way to get around it (e.g. 
>upload a program and run that; unless you log all of the ways a
>program can be uploaded, you won't know what they're actually
>running).
>
>Process accounting (CONFIG_BSD_PROCESS_ACCT) will log which programs
>are run, but not their arguments or inputs.
>
>Finally, anyone with unrestricted root privilege can disable or
>otherwise interfere with logging. And if you're keeping the log files
>locally (rather than using a separate logging server or a printer),
>they can edit them.
>
>  
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-02 19:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-02 12:36 Logging root activity with syslog-ng Casper Helenius
2006-01-02 17:04 ` Glynn Clements
2006-01-02 19:53   ` Stephen Samuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).