Журнал лабораторных работ

Содержание

Журнал

Среда (06/28/06)

/dev/pts/11
16:35:48
#ps aux | grep bind
root     11577  0.0  0.1   3892  1100 pts/8    S+   16:23   0:00 /usr/bin/vi /etc/bind/named.conf
root     11739  0.0  0.0   3336   612 pts/12   S+   16:35   0:00 grep bind
16:35:55
#ps aux | grep named
root     11509  0.0  0.1   2896  1792 ?        Ss   16:21   0:00 /usr/sbin/named
root     11577  0.0  0.1   3892  1100 pts/8    S+   16:23   0:00 /usr/bin/vi /etc/bind/named.conf
root     11746  0.0  0.0   3336   608 pts/12   R+   16:35   0:00 grep named
16:35:58
#vi /etc/default/n
16:35:58
#vi /etc/init.d/bind
16:36:30
#ls /etc/default/
arpwatch  discover  ifupdown         locale      portmap  syslogd
bootlogd  exim4     initrd-tools.sh  lpd         rcS      tmpfs
devpts    halt      iptables         nfs-common  rsync    useradd
dirmngr   hotplug   klogd            ntpdate     ssh      xinetd
/dev/pts/17
16:36:58
#alias exit='echo You are inside of screen\!'

/dev/pts/19
16:37:08
#screen -x
/dev/pts/21
16:37:12
#screen -x
/dev/pts/19
16:37:16
#sc
scdaemon      screen        script
scp           screendump    scriptreplay
16:37:16
#screen -x
/dev/pts/17
16:37:21
#exit
You are inside of screen!
/dev/pts/21
16:37:26
#vi /etc/bind/
16:37:26
#vi /etc/bind/named.conf
/dev/pts/17
16:37:29
#vi /etc/bind/named.conf.
16:37:29
#vi /etc/bind/named.conf.options
/dev/pts/19
16:37:33
#screen
/dev/pts/17
16:37:39
#vi /etc/bind/named.conf
43a44,45
> 
> 
50a53,60
> zone "linux1.unix.nt" {
> 	type slave;
> 	file "db.linux1.bak";
> 	forwarders{};
> 	allow-transfer {127.0.0.1; };
> 	masters { 192.168.15.1; };
> };
> 
16:39:02
#/etc/init.d/bind restart
Stopping domain name service: named.
Starting domain name service: named.
16:39:17
#ls /var/cache/bind/
db.linux1.bak
16:39:35
#dig @127.0.0.1 linux1.unix.nt axfr
;; Connection to 127.0.0.1#53(127.0.0.1) for linux1.unix.nt failed: connection refused.
16:39:47
#vi /etc/bind/named.conf
57c57
< 	allow-transfer {127.0.0.1; };
---
> 	allow-transfer { 127.0.0.1; };
16:40:03
#dig @127.0.0.1 linux1.unix.nt axfr
;; Connection to 127.0.0.1#53(127.0.0.1) for linux1.unix.nt failed: connection refused.
16:40:06
#iptables -L INPUT
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
16:40:14
#iptables -I INPUT -p tcp --dport 53 --syn -j ACCEPT

16:40:33
#dig @127.0.0.1 linux1.unix.nt axfr
; <<>> DiG 9.3.2 <<>> @127.0.0.1 linux1.unix.nt axfr
; (1 server found)
;; global options:  printcmd
linux1.unix.nt.         3600    IN      SOA     kolya.linux1.unix.nt. admin.linux2.unix.nt. 200651103 10800 3600 604800 86400
linux1.unix.nt.         3600    IN      NS      kolya.linux1.unix.nt.
linux1.unix.nt.         3600    IN      NS      m02.linux2.unix.nt.
linux1.unix.nt.         3600    IN      MX      10 kolya.linux1.unix.nt.
m02.linux1.unix.nt.     3600    IN      A       192.168.15.2
admin.linux1.unix.nt.   3600    IN      A       192.168.15.254
kolya.linux1.unix.nt.   3600    IN      A       192.168.15.1
linux15.linux1.unix.nt. 3600    IN      A       192.168.15.15
linux1.unix.nt.         3600    IN      SOA     kolya.linux1.unix.nt. admin.linux2.unix.nt. 200651103 10800 3600 604800 86400
;; Query time: 18 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Jun 28 16:40:34 2006
;; XFR size: 9 records (messages 9)
16:40:34
#vi /etc/bind/named.conf
прошло 10 минут
/dev/pts/21
16:50:58
#vi /etc/bind/db.
16:50:58
#vi /etc/bind/db.
/dev/tty1
16:56:56
#vi /etc/bind/named.conf
17:03:24
#ssh 192.168.15.254
Connection to m01 closed by remote host.
17:11:21
#ssh user@192.168.15.254
Password:
Linux herz.linux.nt 2.6.17 #1 PREEMPT Sun Jun 25 09:50:55 EEST 2006 i686 GNU/Linux
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.
No mail.
Last login: Wed Jun 28 10:48:46 2006 from linux2.linux.nt
user@herz:~$
...
;3      PTR  linux3.linux.nt.
;4      PTR  linux4.linux.nt.
;5      PTR  linux5.linux.nt.
6       PTR  linux6.linux.nt.
7       PTR  linux7.linux.nt.
8       PTR  linux8.linux.nt.
9       PTR  linux9.linux.nt.
10      PTR  linux10.linux.nt.
11      PTR  linux11.linux.nt.
12      PTR  linux12.linux.nt.

Четверг (06/29/06)

09:46:29
#ssh 192.168.15.254

09:51:33
#ssh user@192.168.15.254
Password:
Linux herz.linux.nt 2.6.10 #1 Fri Mar 11 12:21:52 EET 2005 i686 GNU/Linux
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.
No mail.
Last login: Wed Jun 28 17:11:52 2006 from 192.168.15.2
Identity added: /home/user/.ssh/id_rsa (/home/user/.ssh/id_rsa)
...
25 6    * * *   root    test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
47 6    * * 7   root    test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly
52 6    1 * *   root    test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly
#*/10 9-17      * * *   devi    HOME=/home/devi /home/devi/lm/lm-web > /dev/null 2>&1
30 7    * * *   root    ssh -f -N -R 20000:127.0.0.1:22 devi@home
30 13,17        * * *   devi    sh -c 'PATH=$PATH:~/bin; cd /home/devi/cvs/lilalo; ./lm do copy-lablogs ; ./lm report' >& /dev/null
*  *    * * *   root    /var/lilalo/lablogs-xml/trainings/sync > /dev/null 2>&1
user@herz:~$ exit
logout
Connection to 192.168.15.254 closed.
09:52:37
#apt-cache search sendmail
amavisd-new - Interface between MTA and virus scanner/content filters
amavisd-new-milter - Interface between sendmail-milter and amavisd-new
anteater - MTA log analyser written 100% in C++
balsa - An e-mail client for GNOME
clamav-milter - antivirus scanner for sendmail
dcc-milter - Distributed Checksum Clearinghouse - sendmail milter plugin
dhis-mx-sendmail-engine - Dynamic Host Information System - sendmail MX engine
drac - Dynamic Relay Authorization Control (pop-before-smtp)
drac-dev - Dynamic Relay Authorization Control (development files)
emil - Conversion Filter for Internet Messages
...
sendmail-bin - powerful, efficient, and scalable Mail Transport Agent
sendmail-cf - powerful, efficient, and scalable Mail Transport Agent
sendmail-doc - powerful, efficient, and scalable Mail Transport Agent
sensible-mda - Mail Delivery Agent wrapper
smtpd - Mail proxy for firewalls with anti-spam and anti-relay features
smtpfeed - SMTP feed -- SMTP Fast Exploding External Deliver for Sendmail
spamass-milter - sendmail milter for filtering mail through spamassassin
spfmilter - A simple milter for performing SPF checks
uw-imapd - remote mail folder access server
uw-mailutils - C-client support programs from UW
прошло 17 минут
10:09:43
#apt-get install sendmail.*
Reading package lists... Done
Building dependency tree... Done
Note, selecting sendmail-bin for regex ‘sendmail.*’
Note, selecting sendmail-doc for regex ‘sendmail.*’
Note, selecting sendmail for regex ‘sendmail.*’
Note, selecting sendmail-base for regex ‘sendmail.*’
Note, selecting sendmail-tls for regex ‘sendmail.*’
Note, selecting libsendmail-pmilter-perl for regex ‘sendmail.*’
Note, selecting libsendmail-milter-perl for regex ‘sendmail.*’
Note, selecting libmail-sendmail-perl for regex ‘sendmail.*’
...
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.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
  libsendmail-pmilter-perl: Conflicts: libsendmail-milter-perl but 0.18-7 is to be installed
E: Broken packages
10:10:10
#apt-get install sendmail
Reading package lists... Done
Building dependency tree... 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.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
  sendmail: Depends: sendmail-bin (= 8.13.7-1) but it is not going to be installed
            Depends: rmail (= 8.13.7-1) but it is not going to be installed
E: Broken packages
10:10:32
#apt-get install sendmail-bin
 mailx depends on exim4 | mail-transport-agent; however:
  Package exim4 is not installed.
  Package mail-transport-agent is not installed.
  Package exim4-daemon-light which provides mail-transport-agent is to be removed.
 mutt depends on exim4 | mail-transport-agent; however:
  Package exim4 is not installed.
  Package mail-transport-agent is not installed.
  Package exim4-daemon-light which provides mail-transport-agent is to be removed.
Removing exim4-daemon-light ...
Stopping MTA: exim4.
...
Warning: 3 database(s) sources
        were not found, (but were created)
        please investigate.
Warning: These messages were issued while creating sendmail.cf
        make sure they are benign before starting sendmail!
Errors in generating sendmail.cf
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()
Starting Mail Transport Agent: sendmail.
/dev/pts/4
10:10:55
#apt-get install sendmail
Reading package lists... Done
Building dependency tree... 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.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
  sendmail: Depends: sendmail-bin (= 8.13.7-1) but it is not going to be installed
            Depends: rmail (= 8.13.7-1) but it is not going to be installed
E: Broken packages
10:10:59
#apt-get install sendmail-bin
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  sendmail-base sendmail-cf
Suggested packages:
  sendmail-doc ca-certificates logcheck sasl2-bin openssl
Recommended packages:
  resolvconf
The following packages will be REMOVED
  exim4 exim4-base exim4-config exim4-daemon-light
The following NEW packages will be installed
  sendmail-base sendmail-bin sendmail-cf
0 upgraded, 3 newly installed, 4 to remove and 15 not upgraded.
Need to get 1458kB of archives.
After unpacking 803kB of additional disk space will be used.
Do you want to continue [Y/n]?
10:12:30
#apt-get install sendmail-doc
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed
  sendmail-doc
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
Need to get 821kB of archives.
After unpacking 1135kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  sendmail-doc
Install these packages without verification [y/N]? y
Get: 1 http://debian.org.ua testing/main sendmail-doc 8.13.7-1 [821kB]
Fetched 821kB in 24s (33,7kB/s)
Selecting previously deselected package sendmail-doc.
(Reading database ... 67230 files and directories currently installed.)
Unpacking sendmail-doc (from .../sendmail-doc_8.13.7-1_all.deb) ...
Setting up sendmail-doc (8.13.7-1) ...
/dev/tty2
10:13:21
#apt-cache search sendmail
amavisd-new - Interface between MTA and virus scanner/content filters
amavisd-new-milter - Interface between sendmail-milter and amavisd-new
anteater - MTA log analyser written 100% in C++
balsa - An e-mail client for GNOME
clamav-milter - antivirus scanner for sendmail
dcc-milter - Distributed Checksum Clearinghouse - sendmail milter plugin
dhis-mx-sendmail-engine - Dynamic Host Information System - sendmail MX engine
drac - Dynamic Relay Authorization Control (pop-before-smtp)
drac-dev - Dynamic Relay Authorization Control (development files)
emil - Conversion Filter for Internet Messages
...
sendmail-bin - powerful, efficient, and scalable Mail Transport Agent
sendmail-cf - powerful, efficient, and scalable Mail Transport Agent
sendmail-doc - powerful, efficient, and scalable Mail Transport Agent
sensible-mda - Mail Delivery Agent wrapper
smtpd - Mail proxy for firewalls with anti-spam and anti-relay features
smtpfeed - SMTP feed -- SMTP Fast Exploding External Deliver for Sendmail
spamass-milter - sendmail milter for filtering mail through spamassassin
spfmilter - A simple milter for performing SPF checks
uw-imapd - remote mail folder access server
uw-mailutils - C-client support programs from UW
10:13:23
#vi /etc/ma
10:13:23
#vi /etc/ma
10:13:23
#vi /etc/mail/se
10:13:23
#vi /etc/mail/se
10:13:23
#vi /etc/mail/sendmail.mc
/dev/tty2
10:13:36
#apt-get install sendmail-cf
Reading package lists... Done
Building dependency tree... Done
sendmail-cf is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
10:14:24
#screen -X
/dev/pts/7
10:14:50
#alias exit='echo You are inside of screen'
[root@linux2:~]#
10:15:08
#[root@linux2:~]#
[root@linux2:~]#
[root@linux2:~]#
[root@linux2:~]#
[root@linux2:~]# ls /etc/mail
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
[root@linux2:~]#
10:15:16
#ls /etc/mail
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
10:15:20
#dig @linux2.unix.nt mx
a.root-servers.net.     602803  IN      A       198.41.0.4
h.root-servers.net.     602803  IN      A       128.63.2.53
c.root-servers.net.     602803  IN      A       192.33.4.12
g.root-servers.net.     602803  IN      A       192.112.36.4
f.root-servers.net.     602803  IN      A       192.5.5.241
b.root-servers.net.     602803  IN      A       192.228.79.201
j.root-servers.net.     602803  IN      A       192.58.128.30
k.root-servers.net.     602803  IN      A       193.0.14.129
;; Query time: 35 msec
;; SERVER: 192.168.15.2#53(192.168.15.2)
;; WHEN: Thu Jun 29 10:15:47 2006
;; MSG SIZE  rcvd: 436
10:15:47
#dig @m02.unix.nt mx
j.root-servers.net.     602783  IN      A       192.58.128.30
k.root-servers.net.     602783  IN      A       193.0.14.129
l.root-servers.net.     602783  IN      A       198.32.64.12
m.root-servers.net.     602783  IN      A       202.12.27.33
i.root-servers.net.     602783  IN      A       192.36.148.17
e.root-servers.net.     602783  IN      A       192.203.230.10
;; Query time: 17 msec
;; SERVER: 192.168.15.2#53(192.168.15.2)
;; WHEN: Thu Jun 29 10:16:07 2006
;; MSG SIZE  rcvd: 436
[root@linux2:~]# vi /etc/resolv
                               dig: couldn't get address for 'm02.unix.nt': not found
10:16:03
#dig @linux2.unix.nt mx
; <<>> DiG 9.3.2 <<>> @linux2.unix.nt mx
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35051
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
;; QUESTION SECTION:
;.                              IN      NS
;; ANSWER SECTION:
.                       516383  IN      NS      d.root-servers.net.
...
j.root-servers.net.     602783  IN      A       192.58.128.30
k.root-servers.net.     602783  IN      A       193.0.14.129
l.root-servers.net.     602783  IN      A       198.32.64.12
m.root-servers.net.     602783  IN      A       202.12.27.33
i.root-servers.net.     602783  IN      A       192.36.148.17
e.root-servers.net.     602783  IN      A       192.203.230.10
;; Query time: 17 msec
;; SERVER: 192.168.15.2#53(192.168.15.2)
;; WHEN: Thu Jun 29 10:16:07 2006
;; MSG SIZE  rcvd: 436
10:16:07
#vi /etc/resolv.conf
10:16:15
#vi /etc/bind/named.conf
10:16:33
#vi /etc/bind/db.linux2
10:16:44
#dig linux2.unix.nt mx
; <<>> DiG 9.3.2 <<>> linux2.unix.nt mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6830
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;linux2.unix.nt.                        IN      MX
;; ANSWER SECTION:
linux2.unix.nt.         3600    IN      MX      10 m02.linux2.unix.nt.
;; AUTHORITY SECTION:
linux2.unix.nt.         3600    IN      NS      linux15.sergey.unix.nt.
linux2.unix.nt.         3600    IN      NS      m02.linux2.unix.nt.
;; ADDITIONAL SECTION:
m02.linux2.unix.nt.     3600    IN      A       192.168.15.2
;; Query time: 9 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Jun 29 10:16:48 2006
;; MSG SIZE  rcvd: 111
10:17:17
#cd /etc/mail
linux2.unix.nt
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
10:17:20
#cat local-host-names
localhost
linux2.unix.nt.unix.nt
10:17:22
#vi local-host-names
2c2,4
< linux2.unix.nt.unix.nt
---
> linux2.unix.nt
> m02.linux2.unix.nt
> 
10:18:02
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
10:18:03
#less sendmail.mc
10:18:36
#make
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.
To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls"
Creating /etc/mail/relay-domains
# Optional file...
The following file(s) have changed:
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:18:39
#sudo /etc/init.d/sendmail restart
To enable sendmail TLS support at a later date, invoke "/usr/share/sendmail/update_tls"
Creating /etc/mail/relay-domains
# Optional file...
The following file(s) have changed:
** ** You should issue `/etc/init.d/sendmail reload` ** **
[root@linux2:mail]# sudo /etc/init.d/sendmail restart
Restarting Transport Agent: sendmail.
[root@linux2:mail]#
[root@linux2:mail]#
[root@linux2:mail]# netstat -lnp | grep
                                        Restarting Transport Agent: sendmail.
10:18:58
#netstat -lnp | grep :25
dnl #   instead - it will prevent any writes outside of /home !
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     5099/sendmail: MTA:
dnl #   define(`confSAFE_FILE_ENV',             `')dnl
dnl #
dnl # Daemon options - restrict to servicing LOCALHOST ONLY !!!
dnl # Remove `, Addr=' clauses to receive from any interface
dnl # If you want to support IPv6, switch the commented/uncommentd lines
FEATURE(`no_default_msa')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MTA-v6, Port=smtp, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
dnl DAEMON_OPTIONS(`Family=inet6, Name=MSP-v6, Port=submission, Addr=::1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, Addr=127.0.0.1')dnl
dnl #
dnl # Be somewhat anal in what we allow
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
10:19:09
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
10:19:22
#vi sendmail.mc
56c56,57
< DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
---
> #DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
> DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp')dnl
10:20:38
#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.
...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Updating sendmail.cf ...
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:20:45
#vi sendmail.mc
56c56
< #DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
---
> dnl DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
10:21:08
#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.
...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Updating sendmail.cf ...
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:21:11
#vi sendmail.mc
10:21:48
#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.
...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Updating sendmail.cf ...
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:21:53
#vi sendmail.mc
56,57c56,57
< DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
< dnl DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp')dnl
---
> dnl DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
> DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp')dnl
10:22:01
#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.
...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Updating sendmail.cf ...
*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER()
*** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER()
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:22:07
#/etc/init.d/sendmail reload
Reloading Mail Transport Agent configuration: sendmail.
10:22:19
#netstat -lnp | grep :25
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 ...
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     5099/sendmail: MTA:
10:22:25
#/etc/init.d/sendmail restart
Restarting Transport Agent: sendmail.
10:22:35
#netstat -lnp | grep :25
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     5099/sendmail: MTA:
10:22:36
#vi sendmail.mc
10:22:51
#ls
access           aliases.db        m4        sendmail.cf         service.switch        submit.mc
access.db        databases         Makefile  sendmail.cf.errors  service.switch-nodns  tls
address.resolve  helpfile          peers     sendmail.conf       smrsh                 trusted-users
aliases          local-host-names  sasl      sendmail.mc         submit.cf
10:22:52
#ls -l
total 187
-rw------- 1 root  root   4211 2006-06-29 10:12 access
-rw-r----- 1 smmta smmsp 12288 2006-06-29 10:12 access.db
-rw-r--r-- 1 root  root    281 2006-06-15 02:05 address.resolve
lrwxrwxrwx 1 root  smmsp    10 2006-06-29 10:12 aliases -> ../aliases
-rw-r----- 1 smmta smmsp 12288 2006-06-29 10:12 aliases.db
-rw-r--r-- 1 root  smmsp  3117 2006-06-29 10:22 databases
-rw-r--r-- 1 root  root   5594 2006-06-15 02:05 helpfile
-rw-r--r-- 1 root  smmsp    45 2006-06-29 10:18 local-host-names
drwxr-sr-x 2 smmta smmsp  1024 2006-06-29 10:12 m4
...
-rw-r--r-- 1 root  smmsp   269 2006-06-29 10:22 sendmail.cf.errors
-rw-r--r-- 1 root  root  11888 2006-06-29 10:12 sendmail.conf
-rw-r--r-- 1 root  smmsp  4170 2006-06-29 10:22 sendmail.mc
-rw-r--r-- 1 root  root    149 2006-06-15 02:05 service.switch
-rw-r--r-- 1 root  root    180 2006-06-15 02:05 service.switch-nodns
drwxr-sr-x 2 smmta smmsp  1024 2006-06-29 10:12 smrsh
-rw-r--r-- 1 root  smmsp 43623 2006-06-29 10:12 submit.cf
-rw-r--r-- 1 root  smmsp  2284 2006-06-29 10:12 submit.mc
drwxr-xr-x 2 root  smmsp  1024 2006-06-15 02:05 tls
-rw-r--r-- 1 root  smmsp     0 2006-06-29 10:12 trusted-users
10:22:53
#date
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 ...
Thu Jun 29 10:22:57 EEST 2006
10:22:57
#less sendmail.cf.errors
10:23:24
#vi sendmail.mc
97,100d96
< dnl # Default Mailer setup
< MAILER_DEFINITIONS
< MAILER(`local')dnl
< MAILER(`smtp')dnl
106a103,107
> 
> dnl # Default Mailer setup
> MAILER_DEFINITIONS
> MAILER(`local')dnl
> MAILER(`smtp')dnl
10:23:44
#make
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 ...
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:23:54
#/etc/init.d/sendmail restart
Restarting Transport Agent: sendmail.
10:24:06
#netstat -lnp | grep :25
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     5099/sendmail: MTA:
10:24:20
#vi sendmail.mc
59c59
< DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, Addr=127.0.0.1')dnl
---
> DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission')dnl
10:24:44
#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.
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 ...
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
10:24:52
#less sendmail.conf
10:25:09
#/etc/init.d/sendmail stop
Stopping Mail Transport Agent: sendmail.
10:25:14
#netstat -lnp | grep :25
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     5099/sendmail: MTA:
10:25:18
#kill 5099
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 ...
10:25:28
#netstat -lnp | grep :25

10:25:29
#/etc/init.d/sendmail start
Starting Mail Transport Agent: sendmail.
10:25:37
#netstat -lnp | grep :25
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN     6961/sendmail: MTA:
10:25:38
#la /var/mail/
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 ...
bash: la: command not found
10:26:31
#ls /var/mail/
arpwatch  user
10:26:34
#ls /var/spool/mail
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 ...
arpwatch  user
10:26:41
#ls /var/spool/mqueue

Файлы

  • local-host-names
  • local-host-names
    >
    localhost
    linux2.unix.nt.unix.nt
    

    Статистика

    Время первой команды журнала16:35:48 2006- 6-28
    Время последней команды журнала10:26:41 2006- 6-29
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %12.87
    Процент синтаксически неверно набранных команд, % 0.99
    Суммарное время работы с терминалом *, час 1.26
    Количество командных строк в единицу времени, команда/мин 1.33
    Частота использования команд
    vi28|=========================| 25.23%
    ls10|=========| 9.01%
    grep9|========| 8.11%
    dig7|======| 6.31%
    make7|======| 6.31%
    netstat7|======| 6.31%
    apt-get7|======| 6.31%
    /etc/init.d/sendmail6|=====| 5.41%
    screen5|====| 4.50%
    ssh4|===| 3.60%
    less3|==| 2.70%
    alias2|=| 1.80%
    ps2|=| 1.80%
    iptables2|=| 1.80%
    apt-cache2|=| 1.80%
    sudo1|| 0.90%
    /etc/init.d/bind1|| 0.90%
    cd1|| 0.90%
    [root@linux2:~]#1|| 0.90%
    la1|| 0.90%
    cat1|| 0.90%
    kill1|| 0.90%
    exit1|| 0.90%
    date1|| 0.90%
    sc1|| 0.90%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$