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

Содержание

Журнал

Суббота (04/09/11)

/dev/pts/4
10:26:32
#vim /etc/named.conf
10:28:18
#vim /etc/named.
10:28:18
#vim /var/named/
10:28:18
#vim /var/named/aktau.unix.bas
--- /tmp/l3-saved-3705.32658.3021	2011-04-09 14:29:12.000000000 +0600
+++ /var/named/aktau.unix.bas	2011-04-09 14:29:45.000000000 +0600
@@ -1,5 +1,6 @@
 $TTL 3h
 @	SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h
+	MX	linux5.unix.bas.
 	NS	linux5.unix.bas.
 	NS	linux2.unix.bas.
 	A	192.168.15.5
10:29:45
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:
Error in named configuration:
zone localdomain/IN: loaded serial 42
zone localhost/IN: loaded serial 42
zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loaded serial 1997022700
zone 255.in-addr.arpa/IN: loaded serial 42
zone 0.in-addr.arpa/IN: loaded serial 42
dns_rdata_fromtext: aktau.unix.bas:3: near 'linux5.unix.bas.': not a valid number
zone aktau.unix.bas/IN: loading master file aktau.unix.bas: not a valid number
localhost_resolver/aktau.unix.bas/IN: not a valid number
zone 50.168.192.in-addr.arpa/IN: loaded serial 2011040701
dns_rdata_fromtext: aktau.unix.bas:3: near 'linux5.unix.bas.': not a valid number
zone aktau.unix.bas/IN: loading master file aktau.unix.bas: not a valid number
all/aktau.unix.bas/IN: not a valid number
zone 50.168.192.in-addr.arpa/IN: loaded serial 2011040701
                                                           [FAILED]
10:31:01
#rndc flush
rndc: connect failed: 127.0.0.1#953: connection refused
10:31:20
#rndc flush
rndc: connect failed: 127.0.0.1#953: connection refused
10:31:25
#dig aktau.unix.bas mx
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> aktau.unix.bas mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64120
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;aktau.unix.bas.                        IN      MX
;; ANSWER SECTION:
aktau.unix.bas.         10800   IN      MX      10 linux5.unix.bas.
;; AUTHORITY SECTION:
aktau.unix.bas.         10800   IN      NS      linux5.unix.bas.
aktau.unix.bas.         10800   IN      NS      linux2.unix.bas.
;; ADDITIONAL SECTION:
linux2.unix.bas.        9456    IN      A       192.168.15.2
;; Query time: 0 msec
;; SERVER: 192.168.15.5#53(192.168.15.5)
;; WHEN: Sat Apr  9 14:39:06 2011
;; MSG SIZE  rcvd: 106
/dev/pts/11
10:32:34
#dig aktau.unix.bas mx

10:32:53
#cat /etc/resolv.conf
nameserver      192.168.15.5
10:32:58
#tail /var/log/messages
Apr  9 14:31:01 linux5 named: localhost_resolver/aktau.unix.bas/IN: not a valid number
Apr  9 14:31:01 linux5 named: dns_rdata_fromtext: 50.in-addr.arpa:4: near 'linix5.unix.bas.': not a valid number
Apr  9 14:31:01 linux5 named: zone 50.168.192.in-addr.arpa/IN: loading master file 50.in-addr.arpa: not a valid number
Apr  9 14:31:01 linux5 named: localhost_resolver/50.168.192.in-addr.arpa/IN: not a valid number
Apr  9 14:31:01 linux5 named: dns_rdata_fromtext: aktau.unix.bas:3: near 'linux5.unix.bas.': not a valid number
Apr  9 14:31:01 linux5 named: zone aktau.unix.bas/IN: loading master file aktau.unix.bas: not a valid number
Apr  9 14:31:01 linux5 named: all/aktau.unix.bas/IN: not a valid number
Apr  9 14:31:01 linux5 named: dns_rdata_fromtext: 50.in-addr.arpa:4: near 'linix5.unix.bas.': not a valid number
Apr  9 14:31:01 linux5 named: zone 50.168.192.in-addr.arpa/IN: loading master file 50.in-addr.arpa: not a valid number
Apr  9 14:31:01 linux5 named: all/50.168.192.in-addr.arpa/IN: not a valid number
10:33:05
#vim /var/named/
10:33:05
#vim /var/named/aktau.unix.bas
--- /tmp/l3-saved-8562.9378.6544	2011-04-09 14:33:41.000000000 +0600
+++ /var/named/aktau.unix.bas	2011-04-09 14:34:06.000000000 +0600
@@ -1,6 +1,6 @@
 $TTL 3h
 @	SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h
-	MX	linux5.unix.bas.
+	MX	10 linux5.unix.bas.
 	NS	linux5.unix.bas.
 	NS	linux2.unix.bas.
 	A	192.168.15.5
10:34:06
#vim /var/named/
10:34:06
#vim /var/named/50.in-addr.arpa
--- /tmp/l3-saved-8562.8894.19434	2011-04-09 14:34:15.000000000 +0600
+++ /var/named/50.in-addr.arpa	2011-04-09 14:34:49.000000000 +0600
@@ -1,7 +1,6 @@
 $TTL 3h
 
 @	SOA linux5.unix.bas. root.linux5.unix.bas. 2011040701 1d 1h 1w 3h
-        MX	linix5.unix.bas.
 	NS	linux5.unix.bas.
 	NS	linux2.unix.bas.
 
10:34:49
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
/dev/pts/11
10:36:27
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
/dev/pts/4
10:39:06
#netstat -lnp | grep 127.0.0.1
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN      2733/hpiod
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      9054/named
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2760/cupsd
tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN      9054/named
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      2811/sendmail: acce
tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN      2738/python
udp        0      0 127.0.0.1:53                0.0.0.0:*                               9054/named
/dev/pts/11
10:39:31
#vim /etc/named.c
10:39:31
#vim /etc/named.conf
10:39:47
# listen-on-v6 port 53 { ::1; };
     file "aktau.unix.bas";
     allow-transfer {
         192.168.15.5;
        192.168.15.2;
     };
};
     type slave;
zone file "slaves/karakol.unix.bas";
     masters {
         192.168.15.2;
...
                   {
    type192.168.15.5;
        192.168.15.2;
    }
}   };le "50.in-addr.arpa";
~
~
~
~
"/etc/named.zones" 23L, 430C written
10:40:07
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
/dev/pts/4
10:41:51
#vim /etc/mail/
10:41:51
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-3705.32054.21804	2011-04-09 14:42:10.000000000 +0600
+++ /etc/mail/sendmail.mc	2011-04-09 14:42:45.000000000 +0600
@@ -113,7 +113,7 @@
 dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
 dnl # address restriction to accept email from the internet or intranet.
 dnl #
-DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
+DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl
 dnl #
 dnl # The following causes sendmail to additionally listen to port 587 for
 dnl # mail from MUAs that authenticate. Roaming users who can't reach their
10:42:45
#/etc/init.d/sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
10:42:56
#make
make: *** No targets specified and no makefile found.  Stop.
10:43:20
#cd /etc/ma
madm/       mail/       mailcap     mail.rc     makedev.d/  man.config  maven/
10:43:20
#cd /etc/mail

10:43:35
#make
WARNING: 'sendmail.mc' is modified. Please install package sendmail-cf to update your configuration.
WARNING: 'submit.mc' is modified. Please install package sendmail-cf to update your configuration.
10:43:37
#yum installsendmail-cf
Loaded plugins: fastestmirror
usage: yum [options] COMMAND
List of Commands:
check-update   Check for available package updates
clean          Remove cached data
deplist        List a package's dependencies
downgrade      downgrade a package
erase          Remove a package or packages from your system
groupinfo      Display details about a package group
groupinstall   Install the packages in a group on your system
...
  --obsoletes           enable obsoletes processing during updates
  --noplugins           disable Yum plugins
  --nogpgcheck          disable gpg signature checking
  --disableplugin=[plugin]
                        disable plugins by name
  --enableplugin=[plugin]
                        enable plugins by name
  --skip-broken         skip packages with depsolving problems
  --color=COLOR         control whether color is used
  Plugin Options:
10:43:55
#yum install sendmail-cf
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.space.kz
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : sendmail-cf                                                    1/1
Installed:
  sendmail-cf.x86_64 0:8.13.8-8.el5
Complete!
You have new mail in /var/spool/mail/root
10:44:09
#make

10:45:44
#netstat -lnp | grep 0.0.0.0
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN      2733/hpiod
tcp        0      0 0.0.0.0:7                   0.0.0.0:*                   LISTEN      2779/xinetd
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      2489/portmap
tcp        0      0 0.0.0.0:1011                0.0.0.0:*                   LISTEN      2525/rpc.statd
tcp        0      0 192.168.15.5:53             0.0.0.0:*                   LISTEN      9054/named
tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      9054/named
tcp        0      0 192.168.122.1:53            0.0.0.0:*                   LISTEN      2999/dnsmasq
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2760/cupsd
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      9281/sendmail: acce
tcp        0      0 127.0.0.1:953               0.0.0.0:*                   LISTEN      9054/named
tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN      2738/python
udp        0      0 192.168.15.5:53             0.0.0.0:*                               9054/named
udp        0      0 127.0.0.1:53                0.0.0.0:*                               9054/named
udp        0      0 192.168.122.1:53            0.0.0.0:*                               2999/dnsmasq
udp        0      0 0.0.0.0:67                  0.0.0.0:*                               2999/dnsmasq
udp        0      0 0.0.0.0:5353                0.0.0.0:*                               2989/avahi-daemon:
udp        0      0 0.0.0.0:1005                0.0.0.0:*                               2525/rpc.statd
udp        0      0 0.0.0.0:111                 0.0.0.0:*                               2489/portmap
udp        0      0 0.0.0.0:1008                0.0.0.0:*                               2525/rpc.statd
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               2760/cupsd
udp        0      0 0.0.0.0:54524               0.0.0.0:*                               2989/avahi-daemon:
10:45:52
#vim /etc/lo
10:45:52
#vim /etc/lo
10:45:52
#vim local-host-names
10:47:35
#~
linux5.unix.bas
~
~
~
~
~
~
~
~
~
...
~
~
~
~
~
~
~
~
~
"local-host-names" 3L, 94C written
10:48:37
#yum install pop3
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.space.kz
Setting up Install Process
No package pop3 available.
Nothing to do
прошло 35 минут
11:23:48
#vim /etc/dovecot.conf
--- /tmp/l3-saved-3705.15541.8306	2011-04-09 15:30:08.000000000 +0600
+++ /etc/dovecot.conf	2011-04-09 15:33:35.000000000 +0600
@@ -19,6 +19,8 @@
 # If you only want to use dovecot-auth, you can set this to "none".
 #protocols = imap imaps pop3 pop3s
 
+protocols = pop3
+
 # IP or host address where to listen in for connections. It's not currently
 # possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
 # "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
@@ -208,7 +210,7 @@
 #
 # <doc/wiki/MailLocation.txt>
 #
-#mail_location = 
+mail_location = mbox:/var/mail/%u
 
 # If you need to set multiple mailbox locations or want to change default
 # namespace settings, you can do it by defining namespace sections.
11:33:35
#/etc/init.d/dovecot start
Starting Dovecot Imap:                                     [  OK  ]
11:33:49
#nc 127.0.0.1 110
+OK Dovecot ready.
11:35:48
#nc 127.0.0.1 110
+OK Dovecot ready.
pass 123
-ERR No username given.
11:36:12
#nc 127.0.0.1 110
+OK Dovecot ready.
USER user2
+OK
PASS 123
-ERR Authentication failed.
11:36:44
#nc 127.0.0.1 110
+OK Dovecot ready.
USER USER
+OK
PASS pasword
-ERR Authentication failed.
11:37:05
#nc 127.0.0.1 110
+OK Dovecot ready.
PASS user
-ERR No username given.
PASS student
-ERR No username given.
11:39:48
#/etc/init.d/dovecot restart
Stopping Dovecot Imap:                                     [  OK  ]
Starting Dovecot Imap:                                     [  OK  ]
11:41:57
#adduser user1
adduser: user user1 exists
11:42:09
#passwd user
Changing password for user user.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
11:42:21
#nc 127.0.0.1 110
+OK Dovecot ready.
USER user1
+OK
PASS 123
-ERR Authentication failed.
PASS 123
-ERR No username given.
USER user1
+OK
PASS 123
-ERR Authentication failed.
USER user1
+OK
PASS rootpass
-ERR Authentication failed.
11:44:36
#yum install thunderbird
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: fr2.rpmfind.net
 * updates: mirror.space.kz
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
Transaction Summary
======================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)
Total download size: 22 M
Is this ok [y/N]: y
Downloading Packages:
thunderbird-2.0.0.24-15.el5.centos.x86_64.rpm                  | 9.4 MB     03:22
http://mirror.space.kz/centos/5.6/updates/x86_64/RPMS/thunderbird-2.0.0.24-15.el5.centos.x86_64.rpm: [Errno 4] Socket Error: (11, 'Resource temporarily unavailable')
Trying other mirror.
11:48:35
#adduser user2

11:48:48
#passwd user2
Changing password for user user2.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
11:49:24
#dig aktobe.unix.bas
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_5.3 <<>> aktobe.unix.bas
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64355
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;aktobe.unix.bas.               IN      A
;; AUTHORITY SECTION:
aktobe.unix.bas.        10703   IN      SOA     linux1.unix.bas. root.linux1.unix.bas. 2011040701 86400 3600 604800 10800
;; Query time: 0 msec
;; SERVER: 192.168.15.5#53(192.168.15.5)
;; WHEN: Sat Apr  9 15:59:29 2011
;; MSG SIZE  rcvd: 81
прошло 10 минут
11:59:29
#vim
11:59:29
#vim access
--- /tmp/l3-saved-3705.10802.14440	2011-04-09 15:59:56.000000000 +0600
+++ access	2011-04-09 16:00:15.000000000 +0600
@@ -7,4 +7,5 @@
 Connect:localhost.localdomain		RELAY
 Connect:localhost			RELAY
 Connect:127.0.0.1			RELAY
+Connect:192.168.15.5			RELAY
 
12:00:15
#/etc/init.d/sendmail restart
Shutting down sm-client:                                   [  OK  ]
Shutting down sendmail:                                    [  OK  ]
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]
12:00:28
#/etc/init.d/sm
smartd  smb
12:00:28