L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h




Download 7,3 Mb.
Pdf ko'rish
bet109/115
Sana27.11.2023
Hajmi7,3 Mb.
#106243
1   ...   105   106   107   108   109   110   111   112   ...   115
Bog'liq
linuxbasicsforhackers

auth

authpriv
Security/authorization messages
cron
Clock daemons
daemon
Other daemons
kern
Kernel messages
lpr
Printing system
mail
Mail system
user
Generic user­level messages
An asterisk wildcard (
*
) in place of a word refers to all facilities. You 
can select more than one facility by listing them separated by a comma.
The 
priority
tells the system what kinds of messages to log. Codes are 
listed from lowest priority, starting at 
debug
, to highest priority, ending at 
panic
. If the priority is 
*
, messages of all priorities are logged. When you spec­
ify a priority, messages of that priority and higher are logged. For instance, if 
you specify a priority code of 
alert
, the system will log messages classified 
as 
alert
and higher priority, but it won’t log messages marked as 
crit
or any 
priority lower than 
alert
.
Here’s the full list of valid codes for 
priority
:

debug

info

notice

warning

warn

error

err


The Logging System
115

crit

alert

emerg

panic
The codes 
warn

error
, and 
panic
have all been deprecated and should 
not be used.
The 
action
is usually a filename and location where the logs should be 
sent. Note that generally, log files are sent to the /var/log directory with a 
filename that describes the facility that generated them, such as 
auth
. This 
means, for example, that logs generated by the 
auth
facility would be sent to 
/var/log.auth.log.
Let’s look at some examples of log rules:
mail.* /var/log/mail
This example will log 
mail
events of all (
*
) priorities to /var/log/mail.
kern.crit /var/log/kernel
This example will log kernel events of critical (
crit
) priority or higher 
to /var/log/kernel.
*.emerg :omusmsg:*
This last example will log all events of the emergency (
emerg
) priority to 
all logged­on users. With these rules, the hacker can determine where the 
log files are located, change the priorities, or even disable specific logging 
rules.

Download 7,3 Mb.
1   ...   105   106   107   108   109   110   111   112   ...   115




Download 7,3 Mb.
Pdf ko'rish

Bosh sahifa
Aloqalar

    Bosh sahifa



L in u X ba sics for h acke rs g e t t I n g s t a r t e d w I t h

Download 7,3 Mb.
Pdf ko'rish