/l3/users/eb/2009/linux4/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 |
|
#ssh -l quiz 10.0.35.100
Host key fingerprint is 69:b5:3e:1a:9a:b7:c3:c3:96:03:c7:b7:b4:69:1d:3b +--[ RSA 2048]----+ | | | | | . | | o . | | .S . | | ..o.o . | | =.+o= o | | oXo=.E | | ooo* . | +-----------------+ quiz@10.0.35.100's password: |
#ssh -l quiz 10.0.35.100
-----------------------------------------------------------------[41/41]----- Вы хотите полностью ограничить доступ компьютера с доменным именем node1 во внешнюю сеть; Вы хотите сделать так, чтобы его пакеты во внешнюю сеть просто терялись, и никакой информации почему они потерялись и где не было. В то же время по всем остальным сетям, которые маршрутизируются на шлюзе его трафик должен передаваться безболезненно. Шлюз подключен к интернет через интерфейс eth1. Какую команду вы будете использовать? 1. iptables -A FORWARD -f node1 -t internet -j DROP 2. iptables -A FORWARD -f node1 -t eth1 -j DROP ... 5. iptables -A FORWARD -s node1 -o eth1 -j REJECT 6. iptables -A FORWARD -s node1 -t internet -j DROP 7. iptables -A FORWARD -f node1 -t eth1 -j DROP 8. iptables -A FORWARD -s node1 -o eth1 -j DROP 9. iptables -A FORWARD -s node1 -i eth0 -j REJECT 10. iptables -A FORWARD -f node1 -o eth1 -j REJECT --------------------------------------------------------------------------- 8 Your score: 29.3 Connection to 10.0.35.100 closed. |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:76:a0:a9:12 inet addr:192.168.15.4 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::204:76ff:fea0:a912/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:53590 errors:0 dropped:0 overruns:1 frame:0 TX packets:46616 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:44119153 (42.0 MiB) TX bytes:5825555 (5.5 MiB) Interrupt:20 Base address:0xcc00 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:9075 errors:0 dropped:0 overruns:0 frame:0 TX packets:9075 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:17548671 (16.7 MiB) TX bytes:17548671 (16.7 MiB) |
#ip route show
192.168.15.0/24 dev eth0 proto kernel scope link src 192.168.15.4 default via 192.168.15.254 dev eth0 |
#netstat -r
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.168.15.0 * 255.255.255.0 U 0 0 0 eth0 default 192.168.15.254 0.0.0.0 UG 0 0 0 eth0 |
#clear
|
#apt-get install sendmail
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sendmail: Depends: sendmail-bin but it is not going to be installed E: Broken packages |
#apt-get update
Get:1 http://127.0.0.1 sid Release.gpg [1032B] Ign http://127.0.0.1 sid/main Translation-en_US Get:2 http://127.0.0.1 sid Release [94.4kB] Ign http://127.0.0.1 sid/main Packages/DiffIndex Ign http://127.0.0.1 sid/main Packages Get:3 http://127.0.0.1 sid/main Packages [7775kB] Fetched 7871kB in 3s (2543kB/s) Reading package lists... Done |
#apt-get install sensible-mda
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: procmail The following NEW packages will be installed: procmail sensible-mda ... Get:2 http://127.0.0.1 sid/main sensible-mda 8.14.3-9 [214kB] Fetched 356kB in 0s (3504kB/s) Selecting previously deselected package procmail. (Reading database ... 59724 files and directories currently installed.) Unpacking procmail (from .../procmail_3.22-16_i386.deb) ... Selecting previously deselected package sensible-mda. Unpacking sensible-mda (from .../sensible-mda_8.14.3-9_i386.deb) ... Processing triggers for man-db ... Setting up procmail (3.22-16) ... Setting up sensible-mda (8.14.3-9) ... |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done sendmail-bin is already the newest version. The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded. |
#/etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd. |
#ls /etc/m
magic mailcap mail.rc menu/ mke2fs.conf monit/ mtab magic.mime mailcap.order manpath.config menu-methods/ modprobe.d/ motd mysql/ mail/ mailname mdadm/ mime.types modules motd.tail |
#ls /etc/mail
access aliases helpfile Makefile sendmail.cf sendmail.mc smrsh tls access.db aliases.db local-host-names peers sendmail.cf.errors service.switch submit.cf trusted-users address.resolve databases m4 sasl sendmail.conf service.switch-nodns submit.mc |
#lees /etc/mail/sendmail.mc
bash: lees: command not found |
#less /etc/mail/sendmail.mc
|
#vi /etc/mail/sendmail.mc
|
#SDelay_TLS_Clt
linux4.class4.unix.nt |
#apt-get install wine
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: avahi-daemon libavahi-core6 libdaemon0 libgphoto2-2 libgphoto2-port0 libieee1284-3 libnss-mdns libsane libsane-extras libwine libwine-alsa libwine-cms libwine-gl libwine-gphoto2 libwine-ldap libwine-print libwine-sane libxslt1.1 sane-utils ... Setting up libwine-ldap (1.0.1-1) ... Setting up libwine-print (1.0.1-1) ... Setting up libwine-sane (1.0.1-1) ... Setting up sane-utils (1.0.20-4) ... Adding saned group and user... Adding user saned to group scanner saned disabled; edit /etc/default/saned Setting up wine-bin (1.0.1-1) ... Setting up wine-utils (1.0.1-1) ... Setting up wine (1.0.1-1) ... |
#dpkg-reconfigure locales
Package configuration ┌──────────────────────────────┤ Configuring locales ├──────────────────────────────┐ │ Locales are a framework to switch between multiple languages and allow users to │ │ use their language, country, characters, collation order, etc. │ │ │ │ Please choose which locales to generate. UTF-8 locales should be chosen by │ │ default, particularly for new installations. Other character sets may be useful │ │ for backwards compatibility with older systems and software. │ │ │ │ Locales to be generated: │ ... │ [ ] ca_ES@valencia ISO-8859-15 ▒ │ │ [ ] ca_FR ISO-8859-15 ▒ │ │ [ ] ca_FR.UTF-8 UTF-8 ▒ │ │ [ ] ca_IT ISO-8859-15 ▒ │ │ [ ] ca_IT.UTF-8 UTF-8 ↓ │ │ │ │ │ │ <Ok> <Cancel> │ │ │ └───────────────────────────────────────────────────────────────────────────────────┘ |
#vi /usr/local/bin/pref
--- /dev/null 2009-06-04 09:45:12.503976578 +0300 +++ /usr/local/bin/pref 2009-06-04 18:23:40.000000000 +0300 @@ -0,0 +1 @@ +LANG=ru_RU.CP1251 wine /home/user/.wine/ |
#ls
11.txt a Desktop Documents Download hello Music Pictures Public Templates Videos |
#vi /etc/mail/
|
#vi /etc/mail/local-host-names
|
#ls /home/user/.wine/drive_c/
Program Files windows |
#ls /home/user/.wine/drive_c/Program\ Files/
Common Files Internet Explorer Marriage |
#ls /home/user/.wine/drive_c/Program\ Files/Marriage/
club.cnt CODEX.HLP main.cnt marriage.cnt marunstl.ico CLUB.HLP cup.cnt marcodex.ico marriage.exe rules.cnt codex.cnt CUP.HLP marfonts.ico MARRIAGE.HLP RULES.HLP |
#vi /usr/local/bin/pref
--- /tmp/l3-saved-11630.31815.384 2009-06-04 18:24:42.000000000 +0300 +++ /usr/local/bin/pref 2009-06-04 18:24:49.000000000 +0300 @@ -1 +1,3 @@ +#!/bin/sh + LANG=ru_RU.CP1251 wine /home/user/.wine/drive_c/Program\ Files/Marriage/marriage.exe |
#chmod +x /usr/local/bin/pref
|
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#nc 192.168.15.4 25
220 linux4.class4.unix.nt ESMTP Sendmail 8.14.3/8.14.3/Debian-9; Thu, 4 Jun 2009 18:35:55 +0300; (No UCE/UBE) logging access from: linux4.class4.unix.nt(OK)-linux4.class4.unix.nt [192.168.15.4] helo class4.unix.nt 250 linux4.class4.unix.nt Hello linux4.class4.unix.nt [192.168.15.4], pleased to meet you mail from: root@localhost 250 2.1.0 root@localhost... Sender ok rcpt to: user@localhost 250 2.1.5 user@localhost... Recipient ok data 354 Enter mail, end with "." on a line by itself Ghbdt! hello usetr!!! GOODBY . 250 2.0.0 n54FZt0l013947 Message accepted for delivery quit 221 2.0.0 linux4.class4.unix.nt closing connection |
#apt-get install qpopper
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: qpopper 0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded. Need to get 414kB of archives. After this operation, 647kB of additional disk space will be used. Get:1 http://127.0.0.1 sid/main qpopper 4.0.9.dfsg-1 [414kB] Fetched 414kB in 0s (4456kB/s) Selecting previously deselected package qpopper. (Reading database ... 61051 files and directories currently installed.) Unpacking qpopper (from .../qpopper_4.0.9.dfsg-1_i386.deb) ... Processing triggers for man-db ... Setting up qpopper (4.0.9.dfsg-1) ... |
#ls /etc/in
inetd.conf init.d/ initramfs-tools/ inittab inputrc |
#vi /etc/inetd.conf
|
#nc 192.168.15.4 25
220 linux4.class4.unix.nt ESMTP Sendmail 8.14.3/8.14.3/Debian-9; Thu, 4 Jun 2009 18:48:52 +0300; (No UCE/UBE) logging access from: linux4.class4.unix.nt(OK)-linux4.class4.unix.nt [192.168.15.4] helo class4.unix.nt 250 linux4.class4.unix.nt Hello linux4.class4.unix.nt [192.168.15.4], pleased to meet you mail from: root@class4.unix.nt 250 2.1.0 root@class4.unix.nt... Sender ok rcpt to: root@class4.unix.nt 250 2.1.5 root@class4.unix.nt... Recipient ok data 354 Enter mail, end with "." on a line by itself Chitay svou poctu! . 250 2.0.0 n54Fmqqk015102 Message accepted for delivery ^C You have mail in /var/mail/root |
#nc 192.168.15.4 110
+OK Qpopper (version 4.0.9) at linux4.class4.unix.nt starting. <15251.1244130688@linux4.class4.unix.nt> USER root +OK Password required for root. PASS rootpass STAT -ERR [AUTH] Password supplied for "root" is incorrect. +OK Pop server at linux4.class4.unix.nt signing off. |
#nc 192.168.15.4 110
+OK Qpopper (version 4.0.9) at linux4.class4.unix.nt starting. <15303.1244130734@linux4.class4.unix.nt> USER root +OK Password required for root. PASS rootpass -ERR [AUTH] Password supplied for "root" is incorrect. +OK Pop server at linux4.class4.unix.nt signing off. |
#mutt
bash: mutt: command not found |
#apt-get install mutt
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: portmap Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libgpgme11 libpth20 Suggested packages: gpgsm urlview mixmaster ... Selecting previously deselected package libgpgme11. Unpacking libgpgme11 (from .../libgpgme11_1.1.8-2_i386.deb) ... Selecting previously deselected package mutt. Unpacking mutt (from .../mutt_1.5.19-4_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Setting up libpth20 (2.0.7-12) ... Setting up libgpgme11 (1.1.8-2) ... Setting up mutt (1.5.19-4) ... Processing triggers for menu ... |
#mutt
Message-Id: <200906041550.n54Fmqqk015102@linux4.class4.unix.nt> Returned mail: see transcript for details 94% 2 Jun 04 Mail Delivery S ( 40) └=> 2 Jun 04 Mail Delivery S ( 40) └=> 3 Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details |
#mutt
Mailbox is unchanged. |
#mutt
Mailbox is unchanged. |
#tail /var/log/daemon.log
Jun 4 18:59:26 linux4 monit[3214]: 'cron' trying to restart Jun 4 18:59:26 linux4 monit[3214]: 'cron' start: /etc/init.d/cron Jun 4 18:59:46 linux4 monit[3214]: 'cron' process is not running Jun 4 18:59:46 linux4 monit[3214]: 'cron' trying to restart Jun 4 18:59:46 linux4 monit[3214]: 'cron' start: /etc/init.d/cron Jun 4 18:59:46 linux4 monit[3214]: 'cron' failed to start Jun 4 19:00:06 linux4 monit[3214]: 'cron' process is not running Jun 4 19:00:06 linux4 monit[3214]: 'cron' trying to restart Jun 4 19:00:06 linux4 monit[3214]: 'cron' start: /etc/init.d/cron Jun 4 19:00:06 linux4 monit[3214]: 'cron' failed to start |
#tail /var/log/mail.log
Jun 4 18:51:19 linux4 sm-mta[15223]: n54FpJqk015223: to=root@class4.unix.nt, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=60000, relay=class4.unix.nt., dsn=5.3.5, stat=Local configuration error Jun 4 18:51:19 linux4 sm-mta[15223]: n54FpJqk015223: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=60000, dsn=2.0.0, stat=Sent Jun 4 18:51:19 linux4 sm-mta[15223]: n54FpJqk015223: n54FpJql015223: return to sender: Local configuration error Jun 4 18:51:19 linux4 sm-mta[15223]: n54FpJql015223: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent Jun 4 18:51:28 linux4 in.qpopper[15251]: (v4.0.9) Servicing request from "linux4.class4.unix.nt" at 192.168.15.4 [pop_init.c:1408] Jun 4 18:51:54 linux4 in.qpopper[15251]: [AUTH] Access is blocked for UIDs below 10 [pop_pass.c:1218] Jun 4 18:52:04 linux4 in.qpopper[15251]: root at linux4.class4.unix.nt (192.168.15.4): -ERR [AUTH] Password supplied for "root" is incorrect. [pop_pass.c:1222] Jun 4 18:52:14 linux4 in.qpopper[15303]: (v4.0.9) Servicing request from "linux4.class4.unix.nt" at 192.168.15.4 [pop_init.c:1408] Jun 4 18:52:28 linux4 in.qpopper[15303]: [AUTH] Access is blocked for UIDs below 10 [pop_pass.c:1218] Jun 4 18:52:38 linux4 in.qpopper[15303]: root at linux4.class4.unix.nt (192.168.15.4): -ERR [AUTH] Password supplied for "root" is incorrect. [pop_pass.c:1222] |
#dig zhmer.eb.co.ua
; <<>> DiG 9.6.0-P1 <<>> zhmer.eb.co.ua ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41818 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;zhmer.eb.co.ua. IN A ;; AUTHORITY SECTION: eb.co.ua. 3600 IN SOA dns.eb.co.ua. uiyn.email.ua. 200712056 10800 3600 604800 3600 ;; Query time: 58 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Fri Jun 5 09:39:44 2009 ;; MSG SIZE rcvd: 83 |
#cat /etc/resolv
resolvconf/ resolv.conf |
#cat /etc/resolv.conf
nameserver 127.0.0.1 # nameserver 10.0.35.1 domain class4.unix.nt |
#screen -x
|
#screen
|
#dig class4.unix.nt
; <<>> DiG 9.6.0-P1 <<>> class4.unix.nt ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48793 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;class4.unix.nt. IN A ;; AUTHORITY SECTION: class4.unix.nt. 3600 IN SOA linux4.class4.unix.nt. root.class4.unix.nt. 2009060401 10800 43200 259200 3600 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Fri Jun 5 10:12:56 2009 ;; MSG SIZE rcvd: 80 |
#cat /etc/bind
bind/ bindresvport.blacklist |
#cat /etc/bind/
db.0 db.255 db.empty db.root named.conf.local rndc.key db.127 db.class4 db.local named.conf named.conf.options zones.rfc1918 |
#cat /etc/bind/named.conf.options
options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 10.0.35.1; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; #listen-on {127.0.0.1; }; allow-recursion {127.0.0.0/8; }; }; |
#cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; // prime the server with knowledge of the root servers zone "." { ... zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; include "/etc/bind/named.conf.local" ; |
#cat /etc/bind/
db.0 db.255 db.empty db.root named.conf.local rndc.key db.127 db.class4 db.local named.conf named.conf.options zones.rfc1918 |
#cat /etc/bind/db.class4
@ SOA linux4.class4.unix.nt. root.class4.unix.nt. 2009060401 3h 12h 72h 1h MX 10 linux4 NS linux4.class4.unix.nt. linux4 A 192.168.15.4 super A 10.0.35.1 mega A 10.0.35.100 extra A 10.0.35.254 linux1 A 192.168.15.1 linux2 A 192.168.15.2 linux3 A 192.168.15.3 ... linux7 A 192.168.15.7 linux8 A 192.168.15.8 linux9 A 192.168.15.9 linux10 A 192.168.15.10 linux11 A 192.168.15.11 linux12 A 192.168.15.12 linux13 A 192.168.15.13 linux14 A 192.168.15.14 linux15 A 192.168.15.15 linux16 A 192.168.15.16 |
#cat /etc/bind/named.conf.local
// // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; zone "class4.unix.nt" { type master; file "/etc/bind/db.class4"; }; |
#cat /etc/bind/named.conf.options
options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 10.0.35.1; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; #listen-on {127.0.0.1; }; allow-recursion {127.0.0.0/8; }; }; |
#cat /etc/bind/named.conf.local
// // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; zone "class4.unix.nt" { type master; file "/etc/bind/db.class4"; }; |
#cat /etc/bind/db.class4
@ SOA linux4.class4.unix.nt. root.class4.unix.nt. 2009060401 3h 12h 72h 1h MX 10 linux4 NS linux4.class4.unix.nt. linux4 A 192.168.15.4 super A 10.0.35.1 mega A 10.0.35.100 extra A 10.0.35.254 linux1 A 192.168.15.1 linux2 A 192.168.15.2 linux3 A 192.168.15.3 ... linux7 A 192.168.15.7 linux8 A 192.168.15.8 linux9 A 192.168.15.9 linux10 A 192.168.15.10 linux11 A 192.168.15.11 linux12 A 192.168.15.12 linux13 A 192.168.15.13 linux14 A 192.168.15.14 linux15 A 192.168.15.15 linux16 A 192.168.15.16 |
#cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; // prime the server with knowledge of the root servers zone "." { ... zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; include "/etc/bind/named.conf.local" ; |
#cat /etc/bind/named.conf.local
// // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; zone "class4.unix.nt" { type master; file "/etc/bind/db.class4"; }; |
#cat /etc/bind/db.class4
@ SOA linux4.class4.unix.nt. root.class4.unix.nt. 2009060401 3h 12h 72h 1h MX 10 linux4 NS linux4.class4.unix.nt. linux4 A 192.168.15.4 super A 10.0.35.1 mega A 10.0.35.100 extra A 10.0.35.254 linux1 A 192.168.15.1 linux2 A 192.168.15.2 linux3 A 192.168.15.3 ... linux7 A 192.168.15.7 linux8 A 192.168.15.8 linux9 A 192.168.15.9 linux10 A 192.168.15.10 linux11 A 192.168.15.11 linux12 A 192.168.15.12 linux13 A 192.168.15.13 linux14 A 192.168.15.14 linux15 A 192.168.15.15 linux16 A 192.168.15.16 |
#ls /etc/ma
magic magic.mime mail/ mailcap mailcap.order mailname mail.rc manpath.config |
#ls /etc/mail
access aliases helpfile Makefile sendmail.cf service.switch submit.cf trusted-users access.db aliases.db local-host-names peers sendmail.conf service.switch-nodns submit.mc address.resolve databases m4 sasl sendmail.mc smrsh tls |
#less /etc/mail/peers/
|
#less /etc/mail/peers
|
#less /etc/mail/peers/
|
#ls /etc/mail/peers/
provider |
#less /etc/mail/peers/provider
|
#ls /etc/mail/se
sendmail.cf sendmail.conf sendmail.mc service.switch service.switch-nodns |
#less /etc/mail/sendmail.c
|
#less /etc/mail/sendmail.conf
|
#ls /etc/mail/
access aliases helpfile Makefile sendmail.cf service.switch submit.cf trusted-users access.db aliases.db local-host-names peers sendmail.conf service.switch-nodns submit.mc address.resolve databases m4 sasl sendmail.mc smrsh tls |
#less /etc/mail/sendmail.mc
|
#mutt
2 Jun 04 Mail Delivery S ( 40) m=> 3 Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details Îñòàâëåíî: 5, óäàëåíî: 0. |
#apt-get install evolution
×òåíèå ñïèñêîâ ïàêåòîâ... Ãîòîâî Ïîñòðîåíèå äåðåâà çàâèñèìîñòåé ×òåíèå èíôîðìàöèè î ñîñòîÿíèè... Ãîòîâî Ñëåäóþùèå ïàêåòû óñòàíàâëèâàëèñü àâòîìàòè÷åñêè è áîëüøå íå òðåáóþòñÿ: portmap Äëÿ èõ óäàëåíèÿ èñïîëüçóéòå 'apt-get autoremove'. Áóäóò óñòàíîâëåíû ñëåäóþùèå äîïîëíèòåëüíûå ïàêåòû: bogofilter bogofilter-bdb bogofilter-common doc-base esound-clients esound-common evolution-common evolution-data-server evolution-data-server-common evolution-plugins evolution-webcal gnome-desktop-data gnome-doc-utils gnome-icon-theme gnome-mime-data gnome-mount gnome-pilot gnome-pilot-conduits libaudiofile0 libbluetooth3 libbonobo2-0 libbonobo2-common ... Ïîëó÷åíî:29 http://127.0.0.1 sid/main libgtkhtml3.14-19 3.26.2-1 [1094kB] Ïîëó÷åíî:30 http://127.0.0.1 sid/main libgtkhtml-editor-common 3.26.2-1 [91,7kB] Ïîëó÷åíî:31 http://127.0.0.1 sid/main libgtkhtml-editor0 3.26.2-1 [114kB] Ïîëó÷åíî:32 http://127.0.0.1 sid/main libproxy0 0.2.3-3 [32,0kB] Ïîëó÷åíî:33 http://127.0.0.1 sid/main libsoup-gnome2.4-1 2.26.2-1 [31,2kB] Ïîëó÷åíî:34 http://127.0.0.1 sid/main libgweather-common 2.26.1-1 [14,0MB] Ïîëó÷åíî:35 http://127.0.0.1 sid/main libgweather1 2.26.1-1 [62,0kB] Ïîëó÷åíî:36 http://127.0.0.1 sid/main libpisock9 0.12.4-2 [278kB] Ïîëó÷åíî:37 http://127.0.0.1 sid/main libpisync1 0.12.4-2 [20,0kB] Ïîëó÷åíî:38 http://127.0.0.1 sid/main evolution-common 2.26.2-2 [51,9MB] |
#vi ~/.muttrc
--- /dev/null 2009-06-05 09:34:55.504666675 +0300 +++ /root/.muttrc 2009-06-05 12:38:00.000000000 +0300 @@ -0,0 +1,3 @@ +my_hdr From: Zveruha Vladimir user@class4.unix.nt +my_hdr Reply-To: zaveruha Vladimir user@class4.unix.nt +set realname = 'zaveruha Vladimir' |
#mutt
qoot@clasd:Óäàëèòü u:Âîññòàíîâèòü s:Ñîõðàíèòü m:Ñîçäàòü r:Îòâåòèòü g:Âñåì Ïîñëåäíÿÿ ñòðîêà ñîîáùåíèÿ óæå íà ýêðàíå. 1 Jun 04 Mail Delivery S ( 40) Returned mail: see transcript for details 3 Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 30:06 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details ocalhost Postmaster notify: see transcript for details 54% Ïî÷òîâûé ÿùèê íå èçìåíèëñÿ. |
#LANC=c
|
#mutt
1 Jun 04 Mail Delivery S ( 40) Returned mail: see transcript for details 2 Jun 04 Mail Delivery S ( 40) m=> 3 Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details ---Mutt: /var/mail/root [Msgs:5 10K]---(threads/date)--------------------------------------(all)--- Ïî÷òîâûé ÿùèê íå èçìåíèëñÿ. |
#vi ~/.muttrc
--- /tmp/l3-saved-18438.20002.14449 2009-06-05 12:41:54.000000000 +0300 +++ /root/.muttrc 2009-06-05 12:42:44.000000000 +0300 @@ -1,3 +1,4 @@ my_hdr From: Zveruha Vladimir user@class4.unix.nt my_hdr Reply-To: zaveruha Vladimir user@class4.unix.nt set realname = 'zaveruha Vladimir' +set editor = "vim -c 'set tw=68'" |
#mutt
2 D Jun 04 Mail Delivery S ( 40) m=> 3 D Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details 3 Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 3 Jun 04 Mail Delivery S ( 46) Postmaster notify: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 4 Jun 05 Mail Delivery S ( 40) Returned mail: see transcript for details 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details 5 Jun 05 Mail Delivery S ( 46) Postmaster notify: see transcript for details * Del:3 10K]---(threads/date) Îñòàâëåíî: 2, óäàëåíî: 3. |
#LANG=c
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "c" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). |
#LANG=c
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "c" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). |
#dpkg-reconfigure locales
x uk_UA.UTF-8 x x x x x x <Ok> <Cancel> x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Generating locales (this might take a while)... en_US.UTF-8... done ru_RU.CP1251... done ru_RU.UTF-8... done ru_UA.UTF-8... done uk_UA.UTF-8... done Generation complete. |
#dpkg-reconfigure locales
x uk_UA.UTF-8 x x x x x x <Ok> <Cancel> x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Generating locales (this might take a while)... en_US.UTF-8... done ru_RU.CP1251... done ru_RU.UTF-8... done ru_UA.UTF-8... done uk_UA.UTF-8... done Generation complete. |
#mutt
3 kept, 0 deleted. You have mail in /var/mail/root |
#ls -a
. .gqview .profile .swp bin screen.png .. .l3rc .rnd .vim harddisk.img sent .bash_history .lesshst .screenrc .viminfo hello t1.txt .bash_profile .lilalo .sendxmpprc 1 m1 .bashrc .muttrc .ssh Mail screen.dot |
#ls -a
. .gqview .profile .swp bin screen.png .. .l3rc .rnd .vim harddisk.img sent .bash_history .lesshst .screenrc .viminfo hello t1.txt .bash_profile .lilalo .sendxmpprc 1 m1 .bashrc .muttrc .ssh Mail screen.dot |
bind/ bindresvport.blacklist
db.0 db.255 db.empty db.root named.conf.local rndc.key db.127 db.class4 db.local named.conf named.conf.options zones.rfc1918
@ SOA linux4.class4.unix.nt. root.class4.unix.nt. 2009060401 3h 12h 72h 1h MX 10 linux4 NS linux4.class4.unix.nt. linux4 A 192.168.15.4 super A 10.0.35.1 mega A 10.0.35.100 extra A 10.0.35.254 linux1 A 192.168.15.1 linux2 A 192.168.15.2 linux3 A 192.168.15.3 linux5 A 192.168.15.5 linux6 A 192.168.15.6 linux7 A 192.168.15.7 linux8 A 192.168.15.8 linux9 A 192.168.15.9 linux10 A 192.168.15.10 linux11 A 192.168.15.11 linux12 A 192.168.15.12 linux13 A 192.168.15.13 linux14 A 192.168.15.14 linux15 A 192.168.15.15 linux16 A 192.168.15.16
// This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; include "/etc/bind/named.conf.local" ;
// // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; zone "class4.unix.nt" { type master; file "/etc/bind/db.class4"; };
options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 10.0.35.1; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; #listen-on {127.0.0.1; }; allow-recursion {127.0.0.0/8; }; };
resolvconf/ resolv.conf
nameserver 127.0.0.1 # nameserver 10.0.35.1 domain class4.unix.nt
Время первой команды журнала | 15:43:52 2009- 6- 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:52:46 2009- 6- 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 6.93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.04 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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