Merhaba;
Amaçladığınız şeyin çok daha geniş kapsamlısı hazır olarak mevcut :)
İsterseniz bir inceleyin; LogWatch.
Sistem loglarını inceleyip bir özeti size mail ile gönderiyor. Aşağıya
bir örnek ekledim:
################### LogWatch 7.1 (11/12/05) ####################
Processing Initiated: Wed Oct 25 07:35:02 2006
Date Range Processed: yesterday
( 2006-Eki-24 )
Period is day.
Detail Level of Output: 5
Type of Output: unformatted
Logfiles for Host: makine
##################################################################
--------------------- Cron Begin ------------------------
Commands Run:
User root:
run-parts --report /etc/cron.hourly: 24 Time(s)
test -x /etc/init.d/anacron && /usr/sbin/invoke-rc.d anacron
start >/dev/null: 1 Time(s)
test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily:
1 Time(s)
---------------------- Cron End -------------------------
--------------------- EXIM Begin ------------------------
--- Queue Runners ---
Start queue run: 48 Time(s)
End queue run: 48 Time(s)
---------------------- EXIM End -------------------------
--------------------- pam_unix Begin ------------------------
cron:
Sessions Opened:
root: 26 Time(s)
sshd:
Sessions Opened:
user: 3 Time(s)
---------------------- pam_unix End -------------------------
--------------------- SSHD Begin ------------------------
Users logging in through sshd:
user:
160.X.X.X (XXXXX.edu.tr): 3 times
Refused incoming connections:
::ffff:218.19.140.173 (::ffff:218.19.140.173): 2 Time(s)
::ffff:62.153.96.74 (::ffff:62.153.96.74): 2 Time(s)
---------------------- SSHD End -------------------------
--------------------- Disk Space Begin ------------------------
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 7.3G 6.5G 381M 95% /ikinci
/dev/sda4 7.4G 5.8G 1.3G 82% /ucuncu
/dev/sda1 56G 40G 13G 77% /
---------------------- Disk Space End -------------------------
--------------------- Fortune Begin ------------------------
Its name is Public Opinion. It is held in reverence. It settles
everything.
Some think it is the voice of God.
-- Mark Twain
---------------------- Fortune End -------------------------
###################### LogWatch End #########################
Saygılarımla, İyi Günler...
Cem Ahmet MERCAN
Emre Sevinç yazmış:
Ercumend Oyuktas wrote:
Selam Emre,
Aşağıda ssh manual ından aldığım bir kısmı yolluyorum. 8. adımda
istediğini gerçekleştirebilirsin.
Ercümend Oyuktaş
LOGIN PROCESS
When a user successfully logs in, sshd does the following:
1. If the login is on a tty, and no command has been
specified,
prints last login time and /etc/motd (unless prevented
in the configuration file or by $HOME/.hushlogin; see the FILES section).
2. If the login is on a tty, records login time.
3. Checks /etc/nologin; if it exists, prints contents and
quits (unless root).
4. Changes to run with normal user privileges.
5. Sets up basic environment.
6. Reads the file $HOME/.ssh/environment, if it exists,
and users
are allowed to change their environment. See the
PermitUserEnvironment option in sshd_config(5).
7. Changes to user's home directory.
8. If $HOME/.ssh/rc exists, runs it; else if /etc/ssh/sshrc
exists, runs it; otherwise runs xauth. The ``rc''
files are
given the X11 authentication protocol and cookie in
standard
input.
9. Runs user's shell or command.
Sagol bilgi icin (diger Debian'cilara da tesekkürler!).
Benzer bilgiyi kullanarak burada tarif ettigim sekilde cok bir düzenek
kurdum ve test ettim,
düzgün calisti simdiye kadar:
http://ileriseviye.org/blog/?p=591
Bi nevi bubi tuzagi :)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]