Table of Contents
None
Customise system logging system
Configure cron and at
Understand backup tools and strategies
Finding documentation
We will concentrate on the main tasks of system administration such as monitoring log files, scheduling jobs using at and cron. This also includes an overview of the documentation available (manpages and online resources) as well as some backup concepts.
This is the directory where most logfiles are kept. Some applications generate their own log files (such as squid or samba). Most of the system logs are managed by the syslogd daemon. Common system files are:
cronkeeps track of messages generated when cron executes
mailmessages relating to mail
messageslogs all messages except private authentication authpriv, cron, mail and news
securelogs all failed authentications, users added/deleted etc
The most important log file is messages where most
activities are logged.
When syslogd is started it reads the
/etc/syslog.conf configuration file by default.
One can also start syslogd with -f and
the path to an alternative config file.
This file must contain a list of items followed by a priority, followed
by the path to the log-file:
item1.priority1 ; item2.priority2 /path-to-log-file
Valid items are:
auth/authprivuser general and private authentication
croncron daemon messages
kernkernel messages
mailmail system messages
newsUsenet news messages
useruser processes
uucpmessages regarding UUCP
Valid priorities are (from highest to lowest):
emerg
alert
crit
err
warning
notice
info
debug
* (ie all)
none
Priorities are minimal. All higher priorities will be logged too.
To force a priority to be (for example) info only you
need to use an "=" sign as in:
user.=info /var/log/user_activity
Example 9.1. Listing of /etc/syslog.conf
# Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.* /dev/console # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;news.none;authpriv.none /var/log/messages # The authpriv file has restricted access. authpriv.* /var/log/secure # Log all the mail messages in one place. mail.* /var/log/maillog # Log cron stuff cron.* /var/log/cron # Everybody gets emergency messages, plus log them on # another machine. *.emerg * *.emerg @10.1.1.254 # Save boot messages also to boot.log local7.* /var/log/boot.log news.=crit /var/log/news/news.crit news.=err /var/log/news/news.err news.notice /var/log/news/news.notice