/l3/users/clint/nt-lnet-2006-06-26/linux2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 |
|
#tail /var/log/daemon.log
Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... Jun 29 10:40:35 linux2 named[7781]: master zone "0.in-addr.arpa" (IN) loaded (serial 1) Jun 29 10:40:35 linux2 named[7781]: master zone "255.in-addr.arpa" (IN) loaded (serial 1) Jun 29 10:40:35 linux2 named[7781]: master zone "linux2.unix.nt" (IN) loaded (serial 2006062701) Jun 29 10:40:35 linux2 named[7781]: slave zone "linux1.unix.nt" (IN) loaded (serial 200651103) Jun 29 10:40:35 linux2 named[7781]: master zone "fifa2006.unix.nt" (IN) loaded (serial 2006062701) Jun 29 10:40:35 linux2 named[7781]: listening on [127.0.0.1].53 (lo) Jun 29 10:40:35 linux2 named[7781]: listening on [192.168.15.2].53 (eth0) Jun 29 10:40:35 linux2 named[7781]: Forwarding source address is [::].32788 Jun 29 10:40:35 linux2 named[7781]: Forwarding source address is [0.0.0.0].32789 Jun 29 10:40:35 linux2 named[7782]: Ready to answer queries. |
#tail /var/log/mail.log
Jun 29 11:20:26 linux2 sendmail[8392]: k5T8KQBa008392: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30026, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:21:08 linux2 sendmail[8526]: k5T8L8Y8008526: from=root, size=458, class=0, nrcpts=1, msgid=<200606290821.k5T8L8Y8008526@linux2.unix.nt.unix.nt>, relay=root@localhost Jun 29 11:21:08 linux2 sendmail[8526]: k5T8L8Y8008526: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:22:07 linux2 sendmail[8589]: k5T8M7Y9008589: from=root, size=475, class=0, nrcpts=1, msgid=<200606290822.k5T8M7Y9008589@linux2.unix.nt.unix.nt>, relay=root@localhost Jun 29 11:22:07 linux2 sendmail[8589]: k5T8M7Y9008589: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30475, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:23:07 linux2 sm-mta[8673]: k5T8N0gT008673: localhost.localdomain [127.0.0.1] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA-v4 Jun 29 11:23:07 linux2 sendmail[8681]: k5T8N7Ia008681: from=root, size=458, class=0, nrcpts=1, msgid=<200606290823.k5T8N7Ia008681@linux2.unix.nt>, relay=root@localhost Jun 29 11:23:07 linux2 sendmail[8681]: k5T8N7Ia008681: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:23:16 linux2 sendmail[8685]: k5T8NGQD008685: from=root, size=15, class=0, nrcpts=1, msgid=<200606290823.k5T8NGQD008685@linux2.unix.nt>, relay=root@localhost Jun 29 11:23:16 linux2 sendmail[8685]: k5T8NGQD008685: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp REJECT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN reject-with tcp-reset Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#netstat -lnp
unix 2 [ ACC ] STREAM LISTENING 6081 3306/kdm /var/run/xdmctl/dmctl/socket unix 2 [ ACC ] STREAM LISTENING 6217 3306/kdm /var/run/xdmctl/dmctl-:0/socket unix 2 [ ACC ] STREAM LISTENING 5823 3215/lpd /dev/printer unix 2 [ ACC ] STREAM LISTENING 16225 7312/sendmail: MTA: /var/run/sendmail/mta/smcontrol unix 2 [ ACC ] STREAM LISTENING 7115 3641/ssh-agent /tmp/ssh-btprqR3640/agent.3640 unix 2 [ ACC ] STREAM LISTENING 6385 3486/ssh-agent /tmp/ssh-tjTstQ3448/agent.3448 unix 2 [ ACC ] STREAM LISTENING 6440 3517/kdeinit: dcops /tmp/.ICE-unix/dcop3517-1151561803 unix 2 [ ACC ] STREAM LISTENING 6533 3528/kdeinit: ksmse /tmp/.ICE-unix/3528 unix 2 [ ACC ] STREAM LISTENING 5868 3210/gpm /dev/gpmctl unix 2 [ ACC ] STREAM LISTENING 6427 3514/kdeinit Runnin /tmp/ksocket-user/kdeinit__0 unix 2 [ ACC ] STREAM LISTENING 6429 3514/kdeinit Runnin /tmp/ksocket-user/kdeinit-:0 unix 2 [ ACC ] STREAM LISTENING 6461 3519/kdeinit: klaun /tmp/ksocket-user/klauncheryJOgCa.slave-socket unix 2 [ ACC ] STREAM LISTENING 6645 3538/artsd /tmp/ksocket-user/linux2.unix.nt-0dd2-44a37055 unix 2 [ ACC ] STREAM LISTENING 6213 3312/X /tmp/.X11-unix/X0 |
#netstat -lnp | grep sendmail
tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 7312/sendmail: MTA: tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 7312/sendmail: MTA: unix 2 [ ACC ] STREAM LISTENING 16225 7312/sendmail: MTA: /var/run/sendmail/mta/smcontrol |
#iptables -I FORWARD -p tcp --dport 587 -j ACCEPT
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... |
#echo test | mail user
|
#tail /var/log/mail.log
Jun 29 11:23:07 linux2 sendmail[8681]: k5T8N7Ia008681: from=root, size=458, class=0, nrcpts=1, msgid=<200606290823.k5T8N7Ia008681@linux2.unix.nt>, relay=root@localhost Jun 29 11:23:07 linux2 sendmail[8681]: k5T8N7Ia008681: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:23:16 linux2 sendmail[8685]: k5T8NGQD008685: from=root, size=15, class=0, nrcpts=1, msgid=<200606290823.k5T8NGQD008685@linux2.unix.nt>, relay=root@localhost Jun 29 11:23:16 linux2 sendmail[8685]: k5T8NGQD008685: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:24:01 linux2 sm-mta[8715]: k5T8O0N3008715: from=<root@localhost.localdomain>, size=520, class=0, nrcpts=1, msgid=<200606290825.k5T8P7Hi006835@linux1.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=root@linux1.linux.nt [192.168.15.1] (may be forged) Jun 29 11:24:01 linux2 sm-mta[8716]: k5T8O0N3008715: to=<user@linux2.unix.nt>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30771, dsn=2.0.0, stat=Sent Jun 29 11:24:06 linux2 sendmail[8728]: k5T8O6Gl008728: from=root, size=458, class=0, nrcpts=1, msgid=<200606290824.k5T8O6Gl008728@linux2.unix.nt>, relay=root@localhost Jun 29 11:24:06 linux2 sendmail[8728]: k5T8O6Gl008728: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:24:53 linux2 sendmail[8738]: k5T8Or6r008738: from=root, size=15, class=0, nrcpts=1, msgid=<200606290824.k5T8Or6r008738@linux2.unix.nt>, relay=root@localhost Jun 29 11:24:53 linux2 sendmail[8738]: k5T8Or6r008738: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] |
#tail /var/log/mail.log
Jun 29 11:23:07 linux2 sendmail[8681]: k5T8N7Ia008681: from=root, size=458, class=0, nrcpts=1, msgid=<200606290823.k5T8N7Ia008681@linux2.unix.nt>, relay=root@localhost Jun 29 11:23:07 linux2 sendmail[8681]: k5T8N7Ia008681: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:23:16 linux2 sendmail[8685]: k5T8NGQD008685: from=root, size=15, class=0, nrcpts=1, msgid=<200606290823.k5T8NGQD008685@linux2.unix.nt>, relay=root@localhost Jun 29 11:23:16 linux2 sendmail[8685]: k5T8NGQD008685: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:24:01 linux2 sm-mta[8715]: k5T8O0N3008715: from=<root@localhost.localdomain>, size=520, class=0, nrcpts=1, msgid=<200606290825.k5T8P7Hi006835@linux1.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=root@linux1.linux.nt [192.168.15.1] (may be forged) Jun 29 11:24:01 linux2 sm-mta[8716]: k5T8O0N3008715: to=<user@linux2.unix.nt>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30771, dsn=2.0.0, stat=Sent Jun 29 11:24:06 linux2 sendmail[8728]: k5T8O6Gl008728: from=root, size=458, class=0, nrcpts=1, msgid=<200606290824.k5T8O6Gl008728@linux2.unix.nt>, relay=root@localhost Jun 29 11:24:06 linux2 sendmail[8728]: k5T8O6Gl008728: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:24:53 linux2 sendmail[8738]: k5T8Or6r008738: from=root, size=15, class=0, nrcpts=1, msgid=<200606290824.k5T8Or6r008738@linux2.unix.nt>, relay=root@localhost Jun 29 11:24:53 linux2 sendmail[8738]: k5T8Or6r008738: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] |
#iptables -I INPUT -p tcp --dport 587 -j ACCEPT
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... |
#iptables -D FORWARD -p tcp --dport 587 -j ACCEPT
|
#echo test | mail user
|
#tail /var/log/mail.log
Jun 29 11:24:06 linux2 sendmail[8728]: k5T8O6Gl008728: from=root, size=458, class=0, nrcpts=1, msgid=<200606290824.k5T8O6Gl008728@linux2.unix.nt>, relay=root@localhost Jun 29 11:24:06 linux2 sendmail[8728]: k5T8O6Gl008728: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:24:53 linux2 sendmail[8738]: k5T8Or6r008738: from=root, size=15, class=0, nrcpts=1, msgid=<200606290824.k5T8Or6r008738@linux2.unix.nt>, relay=root@localhost Jun 29 11:24:53 linux2 sendmail[8738]: k5T8Or6r008738: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:25:08 linux2 sendmail[8759]: k5T8P8qr008759: from=root, size=458, class=0, nrcpts=1, msgid=<200606290825.k5T8P8qr008759@linux2.unix.nt>, relay=root@localhost Jun 29 11:25:08 linux2 sendmail[8759]: k5T8P8qr008759: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30458, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Jun 29 11:25:14 linux2 sendmail[8774]: k5T8PEiJ008774: from=root, size=15, class=0, nrcpts=1, msgid=<200606290825.k5T8PEiJ008774@linux2.unix.nt>, relay=root@localhost Jun 29 11:25:14 linux2 sm-mta[8775]: k5T8PECK008775: from=<root@linux2.unix.nt>, size=293, class=0, nrcpts=1, msgid=<200606290825.k5T8PEiJ008774@linux2.unix.nt>, proto=ESMTP, daemon=MSP-v4, relay=localhost.localdomain [127.0.0.1] Jun 29 11:25:14 linux2 sendmail[8774]: k5T8PEiJ008774: to=user, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k5T8PECK008775 Message accepted for delivery) Jun 29 11:25:14 linux2 sm-mta[8776]: k5T8PECK008775: to=<user@linux2.unix.nt>, ctladdr=<root@linux2.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30527, dsn=2.0.0, stat=Sent |
$mutt
2 + Jun 29 root ( 1) -*-Mutt: /var/mail/user [Msgs:2 1,4K]---(threads/date)----------------------------------------(all)--- 2 kept, 0 deleted. |
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 2 messages > 1 root@linux2.unix. Thu Jun 29 11:24 21/863 2 root@linux2.unix. Thu Jun 29 11:25 18/625 & r 1 To: user@linux2.unix.nt root@linux2.unix.nt Subject: ROOT Privet, ROOT . Cc: & q New mail has arrived. Saved 1 message in /home/user/mbox Held 1 message in /var/mail/user |
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 3 messages 2 new 1 root@linux2.unix. Thu Jun 29 11:25 18/625 >N 2 root@linux2.unix. Thu Jun 29 11:25 18/825 N 3 user@linux2.unix. Thu Jun 29 11:25 17/653 ROOT & t 3 Message 3: From user@linux2.unix.nt Thu Jun 29 11:25:58 2006 Date: Thu, 29 Jun 2006 11:25:58 +0300 From: user <user@linux2.unix.nt> To: root@linux2.unix.nt, user@linux2.unix.nt Subject: ROOT In-Reply-To: <200606290825.k5T8P7Hi006835@linux1.unix.nt> Privet, ROOT & q New mail has arrived. Saved 1 message in /home/user/mbox Held 2 messages in /var/mail/user |
$mail user@linux1.unix.nt
Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... Subject: TEST from LINUX2 Hello, Kolya TEST . Cc: You have mail in /var/mail/user |
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 4 messages 2 new 3 unread 1 root@linux2.unix. Thu Jun 29 11:25 18/625 U 2 root@linux2.unix. Thu Jun 29 11:25 19/835 >N 3 root@linux2.unix. Thu Jun 29 11:26 22/1012 Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/ N 4 root@linux2.unix. Thu Jun 29 11:26 18/829 & t 4 Message 4: From root@linux2.unix.nt Thu Jun 29 11:26:18 2006 Date: Thu, 29 Jun 2006 11:27:24 +0300 ... At EOF & At EOF & At EOF & At EOF & q Saved 1 message in /home/user/mbox Held 3 messages in /var/mail/user |
$mutt
2 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 3 O + Jun 29 root ( 1) 4 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 Permission denied (publickey,keyboard-interactive). rsync: connection unexpectedly closed (0 bytes received so far) [receiver] *-Mutt: /var/mail/user [Msgs:4 New:1 Old:1 3,4K]---(threads/date)----------------------------(all)--- 4 kept, 0 deleted. |
$exit
exit |
#rsync -auvz m01:/bin/ /tmp/etc2
receiving file list ... done sent 16 bytes received 1426 bytes 2884.00 bytes/sec total size is 3314637 speedup is 2298.64 |
#rsync -auvz m01:/bin/ /tmp/etc2
receiving file list ... done sent 16 bytes received 1426 bytes 961.33 bytes/sec total size is 3314637 speedup is 2298.64 |
#vi /etc/crontab
14c14,15 < * * * * * root rsync -auvz m01:/bin/ /tmp/etc2 --- > * * * * * root rsync -auvz m01:/bin/ /tmp/etc2/ > |
#su - user
l3-agent is already running: pid=8794; pidfile=/home/user/.lilalo/l3-agent.pid |
$mutt
4 O Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 5 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 6 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ ived so far) [receiver] N*-Mutt: /var/mail/user [Msgs:6 Old:2 5,5K]---(threads/date)----------------------------------(all)--- 6 kept, 0 deleted. You have mail in /var/mail/user |
$exit
exit |
#rsync -auvz m01:/bin/ /tmp/etc2/
receiving file list ... done sent 16 bytes received 1426 bytes 2884.00 bytes/sec total size is 3314637 speedup is 2298.64 |
#rsync -auvz m01:/bin/ /tmp/etc2/
receiving file list ... done sent 16 bytes received 1426 bytes 961.33 bytes/sec total size is 3314637 speedup is 2298.64 |
#rsync -auvz m01:/bin/ /tmp/etc2/
receiving file list ... done sent 16 bytes received 1426 bytes 2884.00 bytes/sec total size is 3314637 speedup is 2298.64 |
#which rsync
/usr/bin/rsync |
#man rsync
|
#vi /etc/crontab
|
#vi /etc/crontab
|
$mutt
2 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 3 O + Jun 29 root ( 1) 4 O Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 5 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 6 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 7 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 8 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 6 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 7 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ -*-Mutt: /var/mail/user [Msgs:8 New:1 Old:2 7,5K]---(threads/date)----------------------------(all)--- 8 kept, 0 deleted. |
$mutt
3 O + Jun 29 root ( 1) 5 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 6 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 7 O Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 8 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ Sorting mailbox... Mailbox is unchanged. |
$exit
exit |
#vi /etc/crontab
15a16 > * * * * * root ssh root@m01 'date >> /tmp/test' |
#vi /etc/crontab
8a9 > HOME=/root/ |
#su - user
l3-agent is already running: pid=8794; pidfile=/home/user/.lilalo/l3-agent.pid |
$mutt
2 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 3 O + Jun 29 root ( 1) 4 OD Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 5 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 6 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 7 OD Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2/ 8 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 9 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 10 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 10 Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ N*-Mutt: /var/mail/user [Msgs:11 Old:3 Del:6 10K]---(threads/date)----------------------------(all)--- 5 kept, 6 deleted. |
$exit
exit |
#man ssh
|
#ls ~/.ssh/
authorized_keys id_dsa id_dsa.pub known_hosts |
#vi /etc/crontab
17c17 < * * * * * root ssh root@m01 'date >> /tmp/test' --- > * * * * * root ssh -i /root/.ssh/id_dsa root@m01 'date >> /tmp/test' |
#su - user
l3-agent is already running: pid=8794; pidfile=/home/user/.lilalo/l3-agent.pid |
$mutt
2 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 3 D+ Jun 29 root ( 1) 4 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 5 D Jun 29 Cron Daemon ( 1) Cron <root@linux2> ssh root@m01 'date >> /tmp/test' 6 D Jun 29 Cron Daemon ( 1) Cron <root@linux2> ssh root@m01 'date >> /tmp/test' 7 D Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ -*-Mutt: /var/mail/user [Msgs:7 Del:6 6,3K]---(threads/date)----------------------------------(all)--- 1 kept, 6 deleted. |
$mutt
2 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 3 Jun 29 Cron Daemon ( 1) Cron <root@linux2> ssh -i /root/.ssh/id_dsa root@m01 'date > -*-Mutt: /var/mail/user [Msgs:3 New:1 2,5K]---(threads/date)----------------------------------(all)--- 3 kept, 0 deleted. |
$exit
exit |
#ssh m01 ls
dbootstrap_settings Desktop install-report.template |
#export
declare -x DISPLAY="localhost:10.0" declare -x HOME="/root" declare -x L3_HOME="/root/.lilalo/" declare -x L3_PARENT_TTY="/dev/pts/7" declare -x L3_SESSION_ID="21241257961680232471-1151565290" declare -x L3_TAMPERED_EDITORS=" vi pico nano vi pico nano" declare -x LANG="en_US" declare -x LANGUAGE="en_UA:en_US:en_GB:en" declare -x LOGNAME="root" declare -x MAIL="/var/mail/root" ... :k4=\\EOS:k5=\\E[15~:k6=\\E[17~:k7=\\E[18~:k8=\\E[19~:\\ :k9=\\E[20~:k;=\\E[21~:F1=\\E[23~:F2=\\E[24~:F3=\\EO2P:\\ :F4=\\EO2Q:F5=\\EO2R:F6=\\EO2S:F7=\\E[15;2~:F8=\\E[17;2~:\\ :F9=\\E[18;2~:FA=\\E[19;2~:kb=:K2=\\EOE:kB=\\E[Z:\\ :*4=\\E[3;2~:*7=\\E[1;2F:#2=\\E[1;2H:#3=\\E[2;2~:#4=\\E[1;2D:\\ :%c=\\E[6;2~:%e=\\E[5;2~:%i=\\E[1;2C:kh=\\E[1~:@1=\\E[1~:\\ :kH=\\E[4~:@7=\\E[4~:kN=\\E[6~:kP=\\E[5~:kI=\\E[2~:kD=\\E[3~:\\ :ku=\\EOA:kd=\\EOB:kr=\\EOC:kl=\\EOD:km:" declare -x USER="root" declare -x WINDOW="0" |
#unset USER
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... |
#ssh m01 ls
dbootstrap_settings Desktop install-report.template |
#unset HOME
|
#ssh m01 ls
dbootstrap_settings Desktop install-report.template |
#echo $SSH_
$SSH_AGENT_PID $SSH_AUTH_SOCK $SSH_CLIENT $SSH_CONNECTION $SSH_TTY |
#unset SSH_AGENT_PID
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... |
#ssh m01 ls
dbootstrap_settings Desktop install-report.template |
#UNSET SSH_AUTH_SOCK
bash: UNSET: command not found |
#unset SSH_AUTH_SOCK
|
#ssh m01 ls
Enter passphrase for key '/root/.ssh/id_dsa': Password: Password: Password: Permission denied (publickey,keyboard-interactive). |
#ssh-keygen -p -f ~/.ssh/id_dsa
To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... Enter old passphrase: Key has comment '/root/.ssh/id_dsa' Enter new passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved with the new passphrase. |
#ssh m01 ls
dbootstrap_settings Desktop install-report.template |
#su - user
OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... l3-agent is already running: pid=8794; pidfile=/home/user/.lilalo/l3-agent.pid |
$mutt
2 O Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 4 ND Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 5 ND Jun 29 Cron Daemon ( 1) Cron <root@linux2> ssh -i /root/.ssh/id_dsa root@m01 'date > 6 ND Jun 29 Cron Daemon ( 1) Cron <root@linux2> ssh -i /root/.ssh/id_dsa root@m01 'date > 7 ND Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ -*-Mutt: /var/mail/user [Msgs:7 New:4 Old:1 Del:4 6,4K]---(threads/date)----------------------(all)--- 3 kept, 4 deleted. |
$mutt
2 OD Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 3 D Jun 29 Cron Daemon ( 1) Cron <root@linux2> ssh -i /root/.ssh/id_dsa root@m01 'date > -*-Mutt: /var/mail/user [Msgs:3 Old:1 Del:2 2,6K]---(threads/date)----------------------------(all)--- 1 kept, 2 deleted. |
$mutt
70 N F Jun 29 To user@linux2. ( 1) TEST 71 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 72 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 73 N + Jun 29 root ( 1) test 74 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 75 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 76 N Jun 29 Cron Daemon ( 1) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 sent 16 bytes received 1426 bytes 2884.00 bytes/sec 78 N Jun 29 Cron Daemon ( 3) Cron <root@linux2> rsync -auvz m01:/bin/ /tmp/etc2 81 + Jun 29 root ( 1) 82 D Jun 29 Cron Daemon ( 4) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 83 D Jun 29 Cron Daemon ( 4) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ 84 D Jun 29 Cron Daemon ( 4) Cron <root@linux2> rsync -auvz root@m01:/bin/ /tmp/etc2/ N*-Mutt: /var/mail/user [Msgs:84 New:80 Del:3 83K]---(threads/date)---------------------------(end)--- 81 kept, 3 deleted. You have mail in /var/mail/user |
$exit
exit |
#vi /etc/crontab
17c17 < * * * * * root ssh -i /root/.ssh/id_dsa root@m01 'date >> /tmp/test' --- > * * * * * root ssh -i /root/.ssh/id_dsa root@m01 'date >> /tmp/test' > /dev/null |
#netstat -lnp | grep popa3d
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 10856/popa3d |
#apt-cache search pop3
balsa - An e-mail client for GNOME courier-base - Courier Mail Server - Base system courier-pop - Courier Mail Server - POP3 server courier-pop-ssl - Courier Mail Server - POP3 over SSL crywrap - Simple TCP service encryption using TLS/SSL cvm - Credential Validation Modules cvm-dev - Credential Validation Modules (development files, documentation) cvm-mysql - Credential Validation Modules (mysql) cvm-pgsql - Credential Validation Modules (postgresql) cyrus-clients-2.2 - Cyrus mail system (test clients) ... tinyhoneypot - Small honeypot to trap attackers twig - The Web Information Gateway wl - mail/news reader supporting IMAP for emacsen wl-beta - mail/news reader supporting IMAP for emacsen (development version) wmbiff - A dockable app that displays information about mailboxes wmmail - A mail notification program designed for WindowMaker wmmaiload - dockapp to monitor mails in one or more mail boxes xlassie - Dockable mail notifier w/ message count & POP3/APOP/IMAP support xmail - advanced, fast and reliable ESMTP/POP3 mail server xmail-doc - documentation for xmail |
#apt-cache search
E: You must give exactly one pattern |
#apt-cache search popa3d
popa3d - A tiny POP3 daemon, designed with security as the primary goal |
#less /etc/inetd.conf
|
#apt-cache search pop3
balsa - An e-mail client for GNOME courier-base - Courier Mail Server - Base system courier-pop - Courier Mail Server - POP3 server courier-pop-ssl - Courier Mail Server - POP3 over SSL crywrap - Simple TCP service encryption using TLS/SSL cvm - Credential Validation Modules cvm-dev - Credential Validation Modules (development files, documentation) cvm-mysql - Credential Validation Modules (mysql) cvm-pgsql - Credential Validation Modules (postgresql) cyrus-clients-2.2 - Cyrus mail system (test clients) ... tinyhoneypot - Small honeypot to trap attackers twig - The Web Information Gateway wl - mail/news reader supporting IMAP for emacsen wl-beta - mail/news reader supporting IMAP for emacsen (development version) wmbiff - A dockable app that displays information about mailboxes wmmail - A mail notification program designed for WindowMaker wmmaiload - dockapp to monitor mails in one or more mail boxes xlassie - Dockable mail notifier w/ message count & POP3/APOP/IMAP support xmail - advanced, fast and reliable ESMTP/POP3 mail server xmail-doc - documentation for xmail |
#apt-get install popa3d
Reading package lists... Done Building dependency tree... Done Recommended packages: exim4 mail-transport-agent The following NEW packages will be installed popa3d 0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded. Need to get 31,5kB of archives. After unpacking 94,2kB of additional disk space will be used. WARNING: The following packages cannot be authenticated! ... Unpacking popa3d (from .../popa3d_1.0.2-1_i386.deb) ... Setting up popa3d (1.0.2-1) ... Adding group `popa3d' (110)... Done. adduser: Warning: The home dir you specified already exists. Adding system user `popa3d' with uid 107... Adding new user `popa3d' (107) with group `popa3d'. The home directory `/var/lib/popa3d' already exists. Not copying from `/etc/skel' adduser: Warning: that home directory does not belong to the user you are currently creating Starting pop daemon: popa3d. |
#dpkg popa3d
Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... dpkg: need an action option Type dpkg --help for help about installing and deinstalling packages [*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files; Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*]. Options marked [*] produce a lot of output - pipe it through `less' or `more' ! |
#dpkg -L popa3d
/. /usr /usr/sbin /usr/sbin/popa3d /usr/share /usr/share/man /usr/share/man/man8 /usr/share/man/man8/popa3d.8.gz /usr/share/doc /usr/share/doc/popa3d ... /usr/share/doc/popa3d/changelog.Debian.gz /usr/share/doc/popa3d/changelog.gz /var /var/lib /var/lib/popa3d /etc /etc/init.d /etc/init.d/popa3d /etc/pam.d /etc/pam.d/popa3d |
#man dpkg-reconfigure
|
#/etc/init.d/start
bash: /etc/init.d/start: No such file or directory |
#/etc/init.d/pop3d/ start
bash: /etc/init.d/pop3d/: No such file or directory |
#/etc/init.d/pop3d start
bash: /etc/init.d/pop3d: No such file or directory |
#/etc/init.d/popa3d start
Starting pop daemon: /usr/sbin/popa3d already running. popa3d. |
#netstat -lnp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:32768 0.0.0.0:* LISTEN 3260/rpc.statd tcp 0 0 0.0.0.0:7 0.0.0.0:* LISTEN 3241/xinetd tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN 7312/sendmail: MTA: tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 10856/popa3d tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2372/portmap tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN 3241/xinetd tcp 0 0 192.168.15.2:53 0.0.0.0:* LISTEN 7782/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 7782/named ... unix 2 [ ACC ] STREAM LISTENING 7115 3641/ssh-agent /tmp/ssh-btprqR3640/agent.3640 unix 2 [ ACC ] STREAM LISTENING 6385 3486/ssh-agent /tmp/ssh-tjTstQ3448/agent.3448 unix 2 [ ACC ] STREAM LISTENING 6440 3517/kdeinit: dcops /tmp/.ICE-unix/dcop3517-1151561803 unix 2 [ ACC ] STREAM LISTENING 6533 3528/kdeinit: ksmse /tmp/.ICE-unix/3528 unix 2 [ ACC ] STREAM LISTENING 5868 3210/gpm /dev/gpmctl unix 2 [ ACC ] STREAM LISTENING 6427 3514/kdeinit Runnin /tmp/ksocket-user/kdeinit__0 unix 2 [ ACC ] STREAM LISTENING 6429 3514/kdeinit Runnin /tmp/ksocket-user/kdeinit-:0 unix 2 [ ACC ] STREAM LISTENING 6461 3519/kdeinit: klaun /tmp/ksocket-user/klauncheryJOgCa.slave-socket unix 2 [ ACC ] STREAM LISTENING 6645 3538/artsd /tmp/ksocket-user/linux2.unix.nt-0dd2-44a37055 unix 2 [ ACC ] STREAM LISTENING 6213 3312/X /tmp/.X11-unix/X0 |
#netstat -lnp | grep popa3d
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 10856/popa3d |
#ssh clint@192.168.15.15
clint/etc$ ls /etc/mail Makefile aliases local-host-names sendmail.cf.errors submit.cf trusted-users access aliases.db m4 sendmail.conf submit.mc access.db databases sendmail.cf sendmail.mc tls clint/etc$ cd /etc/mail clint/etc/mail$ sudo make make: *** No rule to make target `/etc/mail/m4/dialup.m4', needed by `/etc/mail/databases'. Stop. clint/etc/mail$ dpkg -L | grep sendmail dpkg-query: --listfiles needs at least one package name argument Use --help for help about querying packages; Use --license for copyright license and lack of warranty (GNU GPL). clint/etc/mail$ dpkg -l | grep sendmail ii sendmail 8.13.7-1 powerful, efficient, and scalable Mail Trans ii sendmail-base 8.13.7-1 powerful, efficient, and scalable Mail Trans |
#apt-get install evolution
Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: dbus evolution-data-server gconf2 gconf2-common gnome-icon-theme gnome-keyring gnome-mime-data gtkhtml3.8 libavahi-glib1 libbonobo2-0 libbonobo2-common libbonoboui2-0 libbonoboui2-common libcamel1.2-8 libcroco3 libdbus-glib-1-2 libebook1.2-5 libecal1.2-3 libedata-book1.2-2 libedata-cal1.2-1 libedataserver1.2-7 libedataserverui1.2-6 libegroupwise1.2-9 libexchange-storage1.2-1 libgail-common libgail17 libgconf2-4 libgnome-keyring0 libgnome-pilot2 libgnome2-0 libgnome2-common ... Get: 50 http://debian.org.ua testing/main libedata-book1.2-2 1.6.1-3 [89,8kB] Get: 51 http://debian.org.ua testing/main libedata-cal1.2-1 1.6.1-3 [100kB] Get: 52 http://debian.org.ua testing/main evolution-data-server 1.6.1-3 [2672kB] Get: 53 http://debian.org.ua testing/main evolution 2.6.1-3 [12,2MB] Fetched 30,2MB in 2m30s (200kB/s) Failed to fetch http://debian.org.ua/debian/pool/main/libg/libgnomeui/libgnomeui-common_2.14.1-1_all.deb 404 Not Found Failed to fetch http://debian.org.ua/debian/pool/main/libg/libgnomeui/libgnomeui-0_2.14.1-1_i386.deb 404 Not Found Failed to fetch http://debian.org.ua/debian/pool/main/g/gtkhtml3.8/libgtkhtml3.8-15_3.10.1-1_i386.deb 404 Not Found Failed to fetch http://debian.org.ua/debian/pool/main/g/gtkhtml3.8/gtkhtml3.8_3.10.1-1_i386.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? |
#vi /etc/apt/apt.conf
|
#apt-get update
Get: 15 2006-06-25-1342.37.pdiff [8579B] Get: 16 2006-06-26-1346.13.pdiff [16,7kB] Get: 17 2006-06-26-1346.13.pdiff [16,7kB] Get: 18 2006-06-26-1346.13.pdiff [16,7kB] Get: 19 2006-06-27-1308.52.pdiff [12,3kB] Get: 20 2006-06-27-1308.52.pdiff [12,3kB] Get: 21 2006-06-27-1308.52.pdiff [12,3kB] Get: 22 2006-06-27-1308.52.pdiff [1182kB] Get: 23 2006-06-27-1308.52.pdiff [1182kB] Get: 24 2006-06-27-1308.52.pdiff [1182kB] Fetched 2860kB in 39s (73,0kB/s) Failed to fetch http://debian.org.ua/debian/dists/testing/main/source/SourcesIndex MD5Sum mismatch Reading package lists... Done E: Some index files failed to download, they have been ignored, or old ones used instead. |
#scp /etc/apt/apt.conf root@192.168.15.1:/etc/apt/apt.conf
[root@linux2:mail]# make Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. apt.conf 100% 59 0.1KB/s 00:00 |
#apt-get install evolution
Setting up libebook1.2-5 (1.6.1-3) ... Setting up libecal1.2-3 (1.6.1-3) ... Setting up libedataserverui1.2-6 (1.6.1-3) ... Setting up libegroupwise1.2-9 (1.6.1-3) ... Setting up libexchange-storage1.2-1 (1.6.1-3) ... Setting up libedata-book1.2-2 (1.6.1-3) ... Setting up libedata-cal1.2-1 (1.6.1-3) ... Setting up evolution-data-server (1.6.1-3) ... Setting up evolution (2.6.1-3) ... |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:submission ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp REJECT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN reject-with tcp-reset Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#ls /etc/squid/
[root@linux2:mail]# make Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Updating tls ... OpenSSL is not installed, will not configure sendmail support for it. to install openssl, get openssl. squid.conf |
#iptables -I 1 -A INPUT -p tcp --drop 110 -j ACCEPT
iptables v1.3.3: Can't use -A with -I Try `iptables -h' or 'iptables --help' for more information. |
#iptables -I -A INPUT -p tcp --drop 110 -j ACCEPT
iptables v1.3.3: Invalid rule number `INPUT' Try `iptables -h' or 'iptables --help' for more information. |
#iptables -I -A INPUT 1 -p tcp --drop 110 -j ACCEPT
iptables v1.3.3: Invalid rule number `INPUT' Try `iptables -h' or 'iptables --help' for more information. |
#vi /etc/mail/sendmail.mk
|
#vi /etc/mail/sendmail.mc
|
Время первой команды журнала | 11:23:16 2006- 6-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:41:32 2006- 6-29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 8.91 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.29 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008