/l3/users/eb/2009/linux10/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 |
|
#sendxmpp date.log
![]() Could not connect to 'jubber.ru' on port 5222: IO::Socket::INET: connect: timeout |
#vim .sendxmpprc
|
#sendxmpp date.log
![]() ^C |
#sendxmpp < date.log
![]() bash: date.log: Нет такого файла или каталога |
#cd /tmp
|
#sendxmpp < date.log
sendxmpp version 1.15 Copyright (c) 2004 - 2005 Dirk-Jan C. Binnema Copyright (c) 2006 - 2007 Lubomir Host 'rajo' usage: sendxmpp [options] <recipient1> [<recipient2> ...] or refer to the the sendxmpp manpage |
#echo hello | sendxmpp user12@jabber.ru
|
#echo hello | sendxmpp usernvv999@jabber.ru
|
#echo hello | sendxmpp nvv9999@jabber.ru
|
#~
3 # command to install the new version when you edit this file 4 # and files in /etc/cron.d. These files also have username fields, 5 # that none of the other crontabs do. 6 eport /etc/cron.daily ) eport /etc/cron.weekly )test -x /usr/sbin/anacron || ( cd / && run-parts --rr eport /etc/cron.monthly )est -x /usr/sbin/anacron || ( cd / && run-parts --rr 15 # m h dom mon dow user command | sendxmpp div-one@jubber.ru 16 * * * * * root echo `date` >> /tmp/date.log-report /etc/cron.hourly ~ r ~ 6b31 "/etc/crontab" 17L, 843C записано |
#tail -f /tmp/date.log
Wed May 27 11:11:01 EEST 2009 Wed May 27 11:12:01 EEST 2009 Wed May 27 11:13:01 EEST 2009 Wed May 27 11:14:02 EEST 2009 Wed May 27 11:15:01 EEST 2009 Wed May 27 11:16:01 EEST 2009 Wed May 27 11:17:01 EEST 2009 Wed May 27 11:18:01 EEST 2009 Wed May 27 11:19:01 EEST 2009 Wed May 27 11:20:01 EEST 2009 Wed May 27 11:21:01 EEST 2009 ^C |
#tail -f /tmp/date.log
Wed May 27 11:12:01 EEST 2009 Wed May 27 11:13:01 EEST 2009 Wed May 27 11:14:02 EEST 2009 Wed May 27 11:15:01 EEST 2009 Wed May 27 11:16:01 EEST 2009 Wed May 27 11:17:01 EEST 2009 Wed May 27 11:18:01 EEST 2009 Wed May 27 11:19:01 EEST 2009 Wed May 27 11:20:01 EEST 2009 Wed May 27 11:21:01 EEST 2009 ^C У вас есть новая почта в /var/mail/root |
#apt-get install anacron
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово Следующие пакеты устанавливались автоматически и больше не требуются: update-inetd portmap Для их удаления используйте 'apt-get autoremove'. НОВЫЕ пакеты, которые будут установлены: anacron обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 29,2kБ архивов. После данной операции, объём занятого дискового пространства возрастёт на 193kB. Получено:1 http://10.0.35.1 sid/main anacron 2.3-13.1 [29,2kB] Получено 29,2kБ за 0s (0Б/c) Выбор ранее не выбранного пакета anacron. (Чтение базы данных ... на данный момент установлено 50362 файлов и каталогов.) Распаковывается пакет anacron (из файла .../anacron_2.3-13.1_i386.deb)... Обрабатываются триггеры для man-db ... Настраивается пакет anacron (2.3-13.1) ... Starting anac(h)ronistic cron: anacron. |
#cat /etc/anacrontab
# /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # These replace cron's entries 1 5 cron.daily nice run-parts --report /etc/cron.daily 7 10 cron.weekly nice run-parts --report /etc/cron.weekly @monthly 15 cron.monthly nice run-parts --report /etc/cron.monthly |
#pa -Af | grep l3-agent
![]() bash: pa: команда не найдена |
#ps -Af | grep l3-agent
root 3040 1 2 09:40 ? 00:02:29 l3-agent root 7539 3190 0 11:36 pts/5 00:00:00 grep l3-agent |
#~
Wed May 27 11:39:01 EEST 2009 Wed May 27 11:40:02 EEST 2009 Wed May 27 11:41:01 EEST 2009 Wed May 27 11:42:01 EEST 2009 Wed May 27 11:43:01 EEST 2009 Wed May 27 11:44:01 EEST 2009 Wed May 27 11:45:01 EEST 2009 Wed May 27 11:46:01 EEST 2009 Wed May 27 11:47:01 EEST 2009 Wed May 27 11:48:01 EEST 2009 Wed May 27 11:49:01 EEST 2009 ^[[A^[[A^[[B^[[B^[[B^[[B^C |
#?\<2\>
2 # Unlike any other crontab you don't have to run the `crontab' 3 # command to install the new version when you edit this file 4 # and files in /etc/cron.d. These files also have username fields, 5 # that none of the other crontabs do. 6 eport /etc/cron.daily ) eport /etc/cron.weekly )test -x /usr/sbin/anacron || ( cd / && run-parts --rr eport /etc/cron.monthly )est -x /usr/sbin/anacron || ( cd / && run-parts --rr 15 #* * * * * root echo `date` >> /tmp/date.log | sendxmpp div-one@jubber.ru < /tmp/date.log 16 #*/2 * * * * root echo `date` >> /tmp/date2.log ndxmpp div-one@jubber.ru < // 17 */2 * * * * root echo `date` >> /tmp/date2.log ~ r "/etc/crontab" 17L, 861C записано |
#ntpdate ntp.psn.ru
27 May 11:51:57 ntpdate[13721]: step time server 194.149.67.130 offset 0.619706 sec |
#date
Срд Май 27 11:52:07 EEST 2009 |
#vim /etc/rsyslog.conf
|
#cat /var.log/mail.log
![]() cat: /var.log/mail.log: Нет такого файла или каталога |
#cat /var/log/mail.log
May 26 11:49:16 linux10 sendmail[10138]: alias database /etc/mail/aliases rebuilt by root May 26 11:49:16 linux10 sendmail[10138]: /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total May 26 11:49:17 linux10 sm-mta[10191]: starting daemon (8.14.3): SMTP+queueing@00:10:00 May 27 09:27:37 linux10 sm-mta[2104]: starting daemon (8.14.3): SMTP+queueing@00:10:00 May 27 10:12:01 linux10 sendmail[7290]: n4R7C1XA007290: from=root, size=403, class=0, nrcpts=1, msgid=<200905270712.n4R7C1XA007290@linux10>, relay=root@localhost May 27 10:12:02 linux10 sm-mta[7325]: n4R7C1kE007325: from=<root@linux10>, size=635, class=0, nrcpts=1, msgid=<200905270712.n4R7C1XA007290@linux10>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] May 27 10:12:02 linux10 sendmail[7290]: n4R7C1XA007290: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30403, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R7C1kE007325 Message accepted for delivery) May 27 10:12:03 linux10 sm-mta[7354]: n4R7C1kE007325: to=<root@linux10>, ctladdr=<root@linux10> (0/0), delay=00:00:02, xdelay=00:00:01, mailer=local, pri=30822, dsn=2.0.0, stat=Sent May 27 10:14:01 linux10 sendmail[8282]: n4R7E1lW008282: from=root, size=403, class=0, nrcpts=1, msgid=<200905270714.n4R7E1lW008282@linux10>, relay=root@localhost May 27 10:14:01 linux10 sm-mta[8289]: n4R7E11q008289: from=<root@linux10>, size=635, class=0, nrcpts=1, msgid=<200905270714.n4R7E1lW008282@linux10>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] ... May 27 11:22:02 linux10 sm-mta[1522]: n4R8M2LX001509: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 11:23:01 linux10 sendmail[1957]: n4R8N10a001957: from=root, size=467, class=0, nrcpts=1, msgid=<200905270823.n4R8N10a001957@linux10.unix.nt>, relay=root@localhost May 27 11:23:01 linux10 sm-mta[1961]: n4R8N15O001961: from=<root@linux10.unix.nt>, size=731, class=0, nrcpts=1, msgid=<200905270823.n4R8N10a001957@linux10.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged) May 27 11:23:01 linux10 sendmail[1957]: n4R8N10a001957: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30467, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R8N15O001961 Message accepted for delivery) May 27 11:23:01 linux10 sm-mta[1974]: n4R8N15O001961: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 11:24:01 linux10 sendmail[2293]: n4R8O1hT002293: from=root, size=467, class=0, nrcpts=1, msgid=<200905270824.n4R8O1hT002293@linux10.unix.nt>, relay=root@localhost May 27 11:24:01 linux10 sm-mta[2299]: n4R8O167002299: from=<root@linux10.unix.nt>, size=731, class=0, nrcpts=1, msgid=<200905270824.n4R8O1hT002293@linux10.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged) May 27 11:24:01 linux10 sendmail[2293]: n4R8O1hT002293: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30467, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R8O167002299 Message accepted for delivery) May 27 11:24:01 linux10 sm-mta[2311]: n4R8O167002299: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 12:28:24 linux10 sendmail: hello |
#cat /var/log/sys.log
cat: /var/log/sys.log: Нет такого файла или каталога |
#vim /etc/rsyslog.conf
|
#cat /var/log/syslog
May 24 15:17:28 book kernel: [ 1.561284] hub 2-0:1.0: USB hub found May 24 15:17:28 book kernel: [ 1.561336] hub 2-0:1.0: 2 ports detected May 24 15:17:28 book kernel: [ 1.561532] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17 May 24 15:17:28 book kernel: [ 1.561588] uhci_hcd 0000:00:1d.1: setting latency timer to 64 May 24 15:17:28 book kernel: [ 1.561592] uhci_hcd 0000:00:1d.1: UHCI Host Controller May 24 15:17:28 book kernel: [ 1.561670] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3 May 24 15:17:28 book kernel: [ 1.561766] uhci_hcd 0000:00:1d.1: irq 17, io base 0x00008400 May 24 15:17:28 book kernel: [ 1.561855] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001 May 24 15:17:28 book kernel: [ 1.561904] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 May 24 15:17:28 book kernel: [ 1.561962] usb usb3: Product: UHCI Host Controller ... May 24 15:17:28 book kernel: [ 7.028648] scsi 0:0:0:0: Direct-Access WD 3200BMV External 1.05 PQ: 0 ANSI: 4 May 24 15:17:28 book kernel: [ 7.030776] sd 0:0:0:0: [sdc] 625142448 512-byte hardware sectors: (320 GB/298 GiB) May 24 15:17:28 book kernel: [ 7.031646] sd 0:0:0:0: [sdc] Write Protect is off May 24 15:17:28 book kernel: [ 7.031698] sd 0:0:0:0: [sdc] Mode Sense: 21 00 00 00 May 24 15:17:28 book kernel: [ 7.031702] sd 0:0:0:0: [sdc] Assuming drive cache: write through May 24 15:17:28 book kernel: [ 7.032526] sd 0:0:0:0: [sdc] 625142448 512-byte hardware sectors: (320 GB/298 GiB) May 24 15:17:28 book kernel: [ 7.033388] sd 0:0:0:0: [sdc] Write Protect is off May 24 15:17:28 book kernel: [ 7.033440] sd 0:0:0:0: [sdc] Mode Sense: 21 00 00 00 May 24 15:17:28 book kernel: [ 7.033444] sd 0:0:0:0: [sdc] Assuming drive cache: write through May 24 15:17:28 book kernel: [ 7.033496] sdc: sdc1 sdc2 sdc3 |
#/var/log/syslog
![]() bash: /var/log/syslog: Отказано в доступе |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:13:d4:b2:4f:e0 inet addr:192.168.15.10 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::213:d4ff:feb2:4fe0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:19373 errors:0 dropped:0 overruns:0 frame:0 TX packets:17388 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13458475 (12.8 MiB) TX bytes:2362157 (2.2 MiB) Memory:cffe0000-d0000000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:265 errors:0 dropped:0 overruns:0 frame:0 TX packets:265 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:28302 (27.6 KiB) TX bytes:28302 (27.6 KiB) |
#tail -f /var/log/syslog
![]() May 27 12:28:24 linux10 sendmail: hello May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered messages 0 May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered presences 0 May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered iqs 0 May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered subscriptions 0 May 27 12:33:53 linux10 sendmail: hello May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered messages 0 May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered presences 0 May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered iqs 0 May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered subscriptions 0 ^[[A^C |
#tail -f /var/log/syslog
![]() May 27 12:28:24 linux10 sendmail: hello May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered messages 0 May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered presences 0 May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered iqs 0 May 27 12:29:56 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered subscriptions 0 May 27 12:33:53 linux10 sendmail: hello May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered messages 0 May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered presences 0 May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered iqs 0 May 27 12:34:57 linux10 jabberd14[20223]: [stat] (sessions.localhost): delivered subscriptions 0 ^C |
#tail -f /var/log/mail.log
![]() May 27 11:23:01 linux10 sendmail[1957]: n4R8N10a001957: from=root, size=467, class=0, nrcpts=1, msgid=<200905270823.n4R8N10a001957@linux10.unix.nt>, relay=root@localhost May 27 11:23:01 linux10 sm-mta[1961]: n4R8N15O001961: from=<root@linux10.unix.nt>, size=731, class=0, nrcpts=1, msgid=<200905270823.n4R8N10a001957@linux10.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged) May 27 11:23:01 linux10 sendmail[1957]: n4R8N10a001957: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30467, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R8N15O001961 Message accepted for delivery) May 27 11:23:01 linux10 sm-mta[1974]: n4R8N15O001961: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 11:24:01 linux10 sendmail[2293]: n4R8O1hT002293: from=root, size=467, class=0, nrcpts=1, msgid=<200905270824.n4R8O1hT002293@linux10.unix.nt>, relay=root@localhost May 27 11:24:01 linux10 sm-mta[2299]: n4R8O167002299: from=<root@linux10.unix.nt>, size=731, class=0, nrcpts=1, msgid=<200905270824.n4R8O1hT002293@linux10.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged) May 27 11:24:01 linux10 sendmail[2293]: n4R8O1hT002293: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30467, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R8O167002299 Message accepted for delivery) May 27 11:24:01 linux10 sm-mta[2311]: n4R8O167002299: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 12:28:24 linux10 sendmail: hello May 27 12:33:53 linux10 sendmail: hello ^C |
#tail -f /var/log/mail.log
May 27 11:23:01 linux10 sendmail[1957]: n4R8N10a001957: from=root, size=467, class=0, nrcpts=1, msgid=<200905270823.n4R8N10a001957@linux10.unix.nt>, relay=root@localhost May 27 11:23:01 linux10 sm-mta[1961]: n4R8N15O001961: from=<root@linux10.unix.nt>, size=731, class=0, nrcpts=1, msgid=<200905270823.n4R8N10a001957@linux10.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged) May 27 11:23:01 linux10 sendmail[1957]: n4R8N10a001957: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30467, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R8N15O001961 Message accepted for delivery) May 27 11:23:01 linux10 sm-mta[1974]: n4R8N15O001961: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 11:24:01 linux10 sendmail[2293]: n4R8O1hT002293: from=root, size=467, class=0, nrcpts=1, msgid=<200905270824.n4R8O1hT002293@linux10.unix.nt>, relay=root@localhost May 27 11:24:01 linux10 sm-mta[2299]: n4R8O167002299: from=<root@linux10.unix.nt>, size=731, class=0, nrcpts=1, msgid=<200905270824.n4R8O1hT002293@linux10.unix.nt>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1] (may be forged) May 27 11:24:01 linux10 sendmail[2293]: n4R8O1hT002293: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30467, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n4R8O167002299 Message accepted for delivery) May 27 11:24:01 linux10 sm-mta[2311]: n4R8O167002299: to=<root@linux10.unix.nt>, ctladdr=<root@linux10.unix.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30950, dsn=2.0.0, stat=Sent May 27 12:28:24 linux10 sendmail: hello May 27 12:33:53 linux10 sendmail: hello ^C |
#vim /etc/default/rsyslog
|
#/etc/init.d/rsyslog restart
Stopping enhanced syslogd: rsyslogd. Starting enhanced syslogd: rsyslogdrsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c3 as the first rsyslogd option. . |
#echo hello | logger -t sendmail -p mail.6
|
#echo lamer | logger -t sendmail -p mail.6
|
#cat /dev/urandom | hexdump -C | head | nc -u 192.168.15.9 514
![]() ^C |
$su - root
Пароль: l3-agent is already running: pid=3040; pidfile=/root/.lilalo/l3-agent.pid |
#echo test | nc -u 192.168.15.9 514
![]() ^C |
#apt-get install nc
Чтение списков пакетов... Готово Построение дерева зависимостей Чтение информации о состоянии... Готово E: Не удалось найти пакет nc |
#cat /dev/zero | nv -l -p 3000
![]() bash: nv: команда не найдена |
#cat /dev/zero | nc -l -p 3000
![]() ^C |
$ssh root@10.0.35.100
root@10.0.35.100's password: Linux linux0 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 27 14:10:36 2009 from linux13.unix.nt |
#less /etc/logrotate.d
![]() |