/l3/users/Andrey/nt-voip/linux12.unix.nt.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#[ ]
Reading package lists... Done Building dependency tree Reading state information... Done Package bind is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: manpages dnsutils bind9 E: Package bind has no installation candidate |
#apt-get install bind9
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: bind9utils Suggested packages: bind9-doc resolvconf ufw The following NEW packages will be installed: bind9 bind9utils 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. ... Setting up bind9utils (1:9.6.ESV.R1+dfsg-0+lenny2) ... Setting up bind9 (1:9.6.ESV.R1+dfsg-0+lenny2) ... Adding group `bind' (GID 110) ... Done. Adding system user `bind' (UID 107) ... Adding new user `bind' (UID 107) with group `bind' ... Not creating home directory `/var/cache/bind'. wrote key file "/etc/bind/rndc.key" # Starting domain name service...: bind9. |
#vi /etc/bind/named.conf
|
#};
|
#vi /etc/bind/named.conf.options
--- /tmp/l3-saved-7213.31802.30015 2010-10-26 16:45:04.000000000 +0300 +++ /etc/bind/named.conf.options 2010-10-26 16:45:37.000000000 +0300 @@ -10,9 +10,9 @@ // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. - // forwarders { - // 0.0.0.0; - // }; + forwarders { + 10.0.35.1; + }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; |
#vi /etc/bind/named.conf
--- /tmp/l3-saved-7213.8049.729 2010-10-26 16:45:42.000000000 +0300 +++ /etc/bind/named.conf 2010-10-26 16:50:42.000000000 +0300 @@ -37,4 +37,8 @@ file "/etc/bind/db.255"; }; +zone "mn.unix.nt" { + type master; + file "/etc/bind/mn.unix.nt"; +}; include "/etc/bind/named.conf.local"; |
#vi /etc/bind/mn.unix.nt
--- /dev/null 2010-10-26 09:38:13.504478140 +0300 +++ /etc/bind/mn.unix.nt 2010-10-26 16:53:53.000000000 +0300 @@ -0,0 +1,6 @@ +$TTL 3600 +@ SOA linux12.unix.nt. root 1 7200 900 9000 3600 + NS linux12.unix.nt. + MX 10 linux12.unix.nt. + A 192.168.112.1 + |
#vi /etc/bind/named.conf
|
#/etc/init.d/bind9 stop
Stopping domain name service...: bind9. |
#/etc/init.d/bind9 start
Starting domain name service...: bind9. |
#@dig @192.168.103.1 kv.unix.nt ns
bash: @dig: command not found |
#apt-get install dig
Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package dig |
#ping google.com
PING google.com (74.125.87.104) 56(84) bytes of data. 64 bytes from hb-in-f104.1e100.net (74.125.87.104): icmp_seq=1 ttl=47 time=48.9 ms 64 bytes from hb-in-f104.1e100.net (74.125.87.104): icmp_seq=2 ttl=47 time=41.1 ms ^C --- google.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1003ms rtt min/avg/max/mdev = 41.186/45.059/48.933/3.879 ms |
#apt-get install dig
Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package dig |
#apt-get update
Hit http://ftp.ua.debian.org lenny Release.gpg Ign http://ftp.ua.debian.org lenny/main Translation-en_US Ign http://ftp.ua.debian.org lenny/non-free Translation-en_US Ign http://ftp.ua.debian.org lenny/contrib Translation-en_US Hit http://ftp.ua.debian.org lenny Release Ign http://ftp.ua.debian.org lenny/main Packages/DiffIndex Ign http://ftp.ua.debian.org lenny/non-free Packages/DiffIndex Ign http://ftp.ua.debian.org lenny/contrib Packages/DiffIndex Ign http://ftp.ua.debian.org lenny/main Sources/DiffIndex Ign http://ftp.ua.debian.org lenny/non-free Sources/DiffIndex ... Ign http://volatile.debian.org lenny/volatile/non-free Sources/DiffIndex Hit http://security.debian.org lenny/updates/non-free Sources Hit http://volatile.debian.org lenny/volatile/main Packages Hit http://volatile.debian.org lenny/volatile/contrib Packages Hit http://volatile.debian.org lenny/volatile/non-free Packages Hit http://volatile.debian.org lenny/volatile/main Sources Hit http://volatile.debian.org lenny/volatile/contrib Sources Hit http://volatile.debian.org lenny/volatile/non-free Sources Fetched 41.2kB in 1s (37.1kB/s) Reading package lists... Done |
#apt-get install dig\
> |
#apt-get install dig
Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package dig |
#man dig
|
#dig @192.168.103.1 kv.unix.nt ns
; <<>> DiG 9.6-ESV-R1 <<>> @192.168.103.1 kv.unix.nt ns ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59535 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;kv.unix.nt. IN NS ;; ANSWER SECTION: kv.unix.nt. 604800 IN NS linux3.unix.nt. ;; Query time: 0 msec ;; SERVER: 192.168.103.1#53(192.168.103.1) ;; WHEN: Tue Oct 26 17:00:50 2010 ;; MSG SIZE rcvd: 49 |
#vi /etc/mail
|
#vi /etc/mail
--- /tmp/l3-saved-7213.11102.21097 2010-10-26 17:07:35.000000000 +0300 +++ /etc/mail/local-host-names 2010-10-26 17:08:11.000000000 +0300 @@ -1,2 +1,3 @@ localhost -linux12.unix.nt.unix.nt +linux12.unix.nt +mn.unix.nt |
#aptitude sendmail
Unknown command "sendmail" aptitude 0.4.11.11 Usage: aptitude [-S fname] [-u|-i] aptitude [options] <action> ... Actions (if none is specified, aptitude will enter interactive mode): install - Install/upgrade packages remove - Remove packages purge - Remove packages and their configuration files hold - Place packages on hold unhold - Cancel a hold command for a package ... -t [release] Set the release from which packages should be installed -q In command-line mode, suppress the incremental progress indicators. -o key=val Directly set the configuration option named 'key' --with(out)-recommends Specify whether or not to treat recommends as strong dependencies -S fname Read the aptitude extended status info from fname. -u Download new package lists on startup. -i Perform an install run on startup. This aptitude does not have Super Cow Powers. |
#aptitude install sendmail
Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Writing extended state information... Done Reading task descriptions... Done The following packages are BROKEN: exim4 exim4-config The following NEW packages will be installed: ... Starting Mail Transport Agent (MTA): sendmail. Setting up sensible-mda (8.14.3-5+lenny1) ... Setting up sendmail (8.14.3-5+lenny1) ... Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initializing package states... Done Writing extended state information... Done Reading task descriptions... Done |
#vi /etc/mail
--- /tmp/l3-saved-7213.200.30279 2010-10-26 17:10:05.000000000 +0300 +++ /etc/mail/sendmail.mc 2010-10-26 17:11:04.000000000 +0300 @@ -89,7 +89,7 @@ FEATURE(`ratecontrol', `nodelay', `terminate')dnl dnl # Masquerading options FEATURE(`always_add_domain')dnl -MASQUERADE_AS(`tl.unix.nt')dnl +MASQUERADE_AS(`mn.unix.nt')dnl FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl dnl # |
#vi /etc/mail/sendmail.mc
--- /tmp/l3-saved-7213.11462.22938 2010-10-26 17:17:07.000000000 +0300 +++ /etc/mail/access 2010-10-26 17:18:01.000000000 +0300 @@ -97,7 +97,7 @@ #Connect:172.29 RELAY #Connect:172.30 RELAY #Connect:172.31 RELAY -#Connect:192.168 RELAY +Connect:192.168.112 RELAY #GreetPause:192.168 0 #ClientRate:192.168 0 #ClientConn:192.168 0 |
#vi /etc/local
|
#vi /etc/mail/local-host-names
|
#vi /etc/mail/sendmail.mc
|
#/etc/mail/s
sasl/ smrsh/ |
#/etc/init.d/sendmail start
Starting Mail Transport Agent (MTA): sendmailMTA is already running. (warning). |
#/etc/init.d/sendmail stop
Stopping Mail Transport Agent (MTA): sendmail. |
#/etc/init.d/sendmail start
Starting Mail Transport Agent (MTA): sendmail. |
#apt-get install qpopper
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: qpopper 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 414kB of archives. After this operation, 647kB of additional disk space will be used. Get:1 http://ftp.ua.debian.org lenny/main qpopper 4.0.9.dfsg-1 [414kB] Fetched 414kB in 3s (104kB/s) Selecting previously deselected package qpopper. (Reading database ... 45182 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) ... |
#man qpopper
|
#useradd -s /bin/false user
|
#passwd user
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#vi /etc/mail/access
|
#dig @localhost
; <<>> DiG 9.6-ESV-R1 <<>> @localhost ; (2 servers found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43309 ;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 14 ;; QUESTION SECTION: ;. IN NS ;; ANSWER SECTION: . 515686 IN NS k.root-servers.net. ... g.root-servers.net. 602086 IN A 192.112.36.4 h.root-servers.net. 602086 IN A 128.63.2.53 h.root-servers.net. 602086 IN AAAA 2001:500:1::803f:235 i.root-servers.net. 602086 IN A 192.36.148.17 i.root-servers.net. 602086 IN AAAA 2001:7fe::53 j.root-servers.net. 602086 IN A 192.58.128.30 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Tue Oct 26 17:21:01 2010 ;; MSG SIZE rcvd: 500 |
#cat /etc/host
cat: /etc/host: No such file or directory |
#cat /etc/host
host.conf hostname hosts hosts.allow hosts.deny |
#cat /etc/hosts
hosts hosts.allow hosts.deny |
#cat /etc/hostname
linux12.unix.nt |
#netstat -nlp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:34696 0.0.0.0:* LISTEN 2011/rpc.statd tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 10844/sendmail: MTA tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 2552/asterisk tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1985/portmap tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 2552/asterisk tcp 0 0 192.168.112.1:53 0.0.0.0:* LISTEN 8812/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 8812/named tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2255/sshd ... raw 0 0 0.0.0.0:1 0.0.0.0:* 7 2632/dhcpd3 Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 6827 2233/acpid /var/run/acpid.socket unix 2 [ ACC ] STREAM LISTENING 6847 2243/dbus-daemon /var/run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 7216 2552/asterisk /var/run/asterisk/asterisk.ctl unix 2 [ ACC ] STREAM LISTENING 29571 10844/sendmail: MTA /var/run/sendmail/mta/smcontrol unix 2 [ ACC ] STREAM LISTENING 7235 2562/hald @/var/run/hald/dbus-BOKeC2oJJS unix 2 [ ACC ] STREAM LISTENING 7111 2532/lpd /dev/printer unix 2 [ ACC ] STREAM LISTENING 7240 2562/hald @/var/run/hald/dbus-0GOWArQS4W |
#netstat -nlp | grep 110
|
#netstat -nlp | grep 25
tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 2552/asterisk tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 2552/asterisk tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2255/sshd tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 10844/sendmail: MTA tcp6 0 0 :::22 :::* LISTEN 2255/sshd udp 0 0 0.0.0.0:2727 0.0.0.0:* 2552/asterisk udp 0 0 0.0.0.0:4520 0.0.0.0:* 2552/asterisk udp 0 0 0.0.0.0:5060 0.0.0.0:* 2552/asterisk udp 0 0 0.0.0.0:4569 0.0.0.0:* 2552/asterisk unix 2 [ ACC ] STREAM LISTENING 7216 2552/asterisk /var/run/asterisk/asterisk.ctl unix 2 [ ACC ] STREAM LISTENING 7235 2562/hald @/var/run/hald/dbus-BOKeC2oJJS unix 2 [ ACC ] STREAM LISTENING 7111 2532/lpd /dev/printer unix 2 [ ACC ] STREAM LISTENING 7240 2562/hald @/var/run/hald/dbus-0GOWArQS4W |
#/etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd. |
#nc 127.0.0.1 110
+OK Qpopper (version 4.0.9) at linux12.unix.nt.unix.nt starting. <11465.1288103197@linux12.unix.nt.unix.nt> USER andrey +OK Password required for andrey. PASS 1qaz2wsx +OK andrey has 1 visible message (0 hidden) in 632 octets. ^C |
#cat /etc/passwd
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh ... statd:x:102:65534::/var/lib/nfs:/bin/false andrey:x:1000:1000:andrey,,,:/home/andrey:/bin/bash sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin messagebus:x:104:106::/var/run/dbus:/bin/false haldaemon:x:105:107:Hardware abstraction layer,,,:/var/run/hal:/bin/false asterisk:x:106:109:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false bind:x:107:110::/var/cache/bind:/bin/false smmta:x:108:111:Mail Transfer Agent,,,:/var/lib/sendmail:/bin/false smmsp:x:109:112:Mail Submission Program,,,:/var/lib/sendmail:/bin/false user:x:1001:1001::/home/user:/bin/false |
#/etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd. |
#nc 192.168.112.1 110
+OK Qpopper (version 4.0.9) at linux12.unix.nt.unix.nt starting. <11523.1288103354@linux12.unix.nt.unix.nt> USER andrey +OK Password required for andrey. PASS 1qaz2wsx +OK andrey has 1 visible message (0 hidden) in 643 octets. ^C |
#dig @192.168.112.1
; <<>> DiG 9.6-ESV-R1 <<>> @192.168.112.1 ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59304 ;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 14 ;; QUESTION SECTION: ;. IN NS ;; ANSWER SECTION: . 515038 IN NS l.root-servers.net. ... g.root-servers.net. 601438 IN A 192.112.36.4 h.root-servers.net. 601438 IN A 128.63.2.53 h.root-servers.net. 601438 IN AAAA 2001:500:1::803f:235 i.root-servers.net. 601438 IN A 192.36.148.17 i.root-servers.net. 601438 IN AAAA 2001:7fe::53 j.root-servers.net. 601438 IN A 192.58.128.30 ;; Query time: 0 msec ;; SERVER: 192.168.112.1#53(192.168.112.1) ;; WHEN: Tue Oct 26 17:31:49 2010 ;; MSG SIZE rcvd: 500 |
#dig @192.168.112.1 mn.unix.nt
; <<>> DiG 9.6-ESV-R1 <<>> @192.168.112.1 mn.unix.nt ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36076 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;mn.unix.nt. IN A ;; ANSWER SECTION: mn.unix.nt. 3600 IN A 192.168.112.1 ;; AUTHORITY SECTION: mn.unix.nt. 3600 IN NS linux12.unix.nt. ;; Query time: 0 msec ;; SERVER: 192.168.112.1#53(192.168.112.1) ;; WHEN: Tue Oct 26 17:32:00 2010 ;; MSG SIZE rcvd: 66 |
#dig @192.168.112.1 mn.unix.nt mx
; <<>> DiG 9.6-ESV-R1 <<>> @192.168.112.1 mn.unix.nt mx ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40838 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;mn.unix.nt. IN MX ;; ANSWER SECTION: mn.unix.nt. 3600 IN MX 10 linux12.unix.nt. ;; AUTHORITY SECTION: mn.unix.nt. 3600 IN NS linux12.unix.nt. ;; Query time: 0 msec ;; SERVER: 192.168.112.1#53(192.168.112.1) ;; WHEN: Tue Oct 26 17:32:13 2010 ;; MSG SIZE rcvd: 66 |
#dig @192.168.111.1 bb.unix.nt
; <<>> DiG 9.6-ESV-R1 <<>> @192.168.111.1 bb.unix.nt ; (1 server found) ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15229 ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;bb.unix.nt. IN A ;; ANSWER SECTION: bb.unix.nt. 3600 IN A 192.168.111.1 ;; AUTHORITY SECTION: bb.unix.nt. 3600 IN NS linux11.unix.nt. ;; Query time: 0 msec ;; SERVER: 192.168.111.1#53(192.168.111.1) ;; WHEN: Tue Oct 26 17:32:40 2010 ;; MSG SIZE rcvd: 66 |
#vi /etc/mail
|
#vi /etc/mail/
|
#vi /etc/mail/access
|
#vi /etc/mail/access
|
#/etc/init.d/sendmail restart
Restarting Mail Transport Agent (MTA): sendmail. |
#mc
|
#netstat -tnlp
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:56329 0.0.0.0:* LISTEN 2026/rpc.statd tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 2455/sendmail: MTA: tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 2323/asterisk tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 2307/inetd tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2015/portmap tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 2323/asterisk tcp 0 0 192.168.112.1:53 0.0.0.0:* LISTEN 2268/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 2268/named tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2283/sshd tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 2455/sendmail: MTA: tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 2268/named tcp6 0 0 :::53 :::* LISTEN 2268/named tcp6 0 0 :::22 :::* LISTEN 2283/sshd tcp6 0 0 ::1:953 :::* LISTEN 2268/named |
#netstat -tunlp | 25
bash: 25: command not found |
#/etc/init.d/sendmail start
Starting Mail Transport Agent (MTA): sendmailMTA is already running. (warning). |
#vi
|
#~
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully |
#whoami
root |
#ls -lah
total 112K drwxr-xr-x 4 andrey andrey 4.0K 2010-10-27 09:53 . drwxr-xr-x 4 root root 4.0K 2010-10-25 11:40 .. -rw------- 1 andrey andrey 498 2010-10-26 17:44 .bash_history -rw-r--r-- 1 andrey andrey 220 2010-10-25 11:40 .bash_logout -rw-r--r-- 1 andrey root 10 2010-10-25 14:21 .bash_profile -rw-r--r-- 1 andrey andrey 3.2K 2010-10-25 14:21 .bashrc drwx------ 3 root root 4.0K 2010-10-25 12:58 .dbus -rw-r--r-- 1 root root 3.5K 2010-10-25 16:10 dhcpd.conf.orig -rw------- 1 root root 179 2010-10-25 12:58 .ICEauthority -rw-r--r-- 1 root root 5.2K 2010-10-25 14:19 install -rw-r--r-- 1 andrey root 58 2010-10-25 14:21 .l3rc drwxr-xr-x 2 andrey root 4.0K 2010-10-27 09:35 .lilalo -rw-r--r-- 1 andrey andrey 675 2010-10-25 11:40 .profile -rw-r--r-- 1 root root 503 2010-10-25 12:03 q -rw-r----- 1 root root 32K 2010-10-25 18:04 sip.conf.orig -rw------- 1 root root 12K 2010-10-27 09:38 .swp -rw------- 1 root root 61 2010-10-25 12:58 .Xauthority -rw------- 2 andrey andrey 0 2010-10-25 15:18 .Xauthority-c -rw------- 2 andrey andrey 0 2010-10-25 15:18 .Xauthority-l -rw------- 1 root root 995 2010-10-25 12:58 .xsession-errors |
#ls -lah /home/
andrey/ lost+found/ |
#ls -lah /home/
andrey/ lost+found/ |
#ls -lah /home/
andrey/ lost+found/ |
#ls -lah /home/andrey/
total 112K drwxr-xr-x 4 andrey andrey 4.0K 2010-10-27 09:53 . drwxr-xr-x 4 root root 4.0K 2010-10-25 11:40 .. -rw------- 1 andrey andrey 498 2010-10-26 17:44 .bash_history -rw-r--r-- 1 andrey andrey 220 2010-10-25 11:40 .bash_logout -rw-r--r-- 1 andrey root 10 2010-10-25 14:21 .bash_profile -rw-r--r-- 1 andrey andrey 3.2K 2010-10-25 14:21 .bashrc drwx------ 3 root root 4.0K 2010-10-25 12:58 .dbus -rw-r--r-- 1 root root 3.5K 2010-10-25 16:10 dhcpd.conf.orig -rw------- 1 root root 179 2010-10-25 12:58 .ICEauthority -rw-r--r-- 1 root root 5.2K 2010-10-25 14:19 install -rw-r--r-- 1 andrey root 58 2010-10-25 14:21 .l3rc drwxr-xr-x 2 andrey root 4.0K 2010-10-27 09:35 .lilalo -rw-r--r-- 1 andrey andrey 675 2010-10-25 11:40 .profile -rw-r--r-- 1 root root 503 2010-10-25 12:03 q -rw-r----- 1 root root 32K 2010-10-25 18:04 sip.conf.orig -rw------- 1 root root 12K 2010-10-27 09:38 .swp -rw------- 1 root root 61 2010-10-25 12:58 .Xauthority -rw------- 2 andrey andrey 0 2010-10-25 15:18 .Xauthority-c -rw------- 2 andrey andrey 0 2010-10-25 15:18 .Xauthority-l -rw------- 1 root root 995 2010-10-25 12:58 .xsession-errors |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2711.5387.30268 2010-10-27 10:22:08.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-27 10:38:17.000000000 +0300 @@ -588,11 +588,18 @@ exten => s,n,Dial(${ARG1}) [local] -exten =>_22XX,1,Dial(SIP/${EXTEN}) +exten =>_22XX,1,Dial(SIP/${EXTEN},10) +exten =>_22XX,n,Playback(/tmp/voicemail-greeting-${EXTEN:}) +exten =>_22XX,n,Voicemail(${EXTEN}@default) +exten =>_22XX,n,Hangup +;exten => 2298,1,Record(/tmp/warning1:gsm,,3) +;exten => 2297,1,Playback(/tmp/warning1) + +[service] +exten =>2296,1,Voicemail(${EXTEN}@default) exten => 2298,1,Record(/tmp/warning1:gsm,,3) exten => 2297,1,Playback(/tmp/warning1) - [national] exten => _19XX,1,Macro(dial-with-callerid,SIP/gm/${EXTEN}) exten => _20XX,1,Macro(dial-with-callerid,SIP/br/${EXTEN}) @@ -609,10 +616,13 @@ include => local include => national include => international +include => service [group2] include => local include => national +include => service [group3] include => local +include => service |
#vi /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-2711.25655.26190 2010-10-27 10:38:23.000000000 +0300 +++ /etc/asterisk/voicemail.conf 2010-10-27 10:52:35.000000000 +0300 @@ -230,6 +230,7 @@ ;maxmsg=50 1234 => 4242,Example Mailbox,root@localhost +2201 => 1234,Andrey,andrey@mn.unix.nt ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => -5432,Sales,sales@marko.net |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2711.14897.8434 2010-10-27 10:52:38.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-27 11:00:41.000000000 +0300 @@ -589,14 +589,15 @@ [local] exten =>_22XX,1,Dial(SIP/${EXTEN},10) -exten =>_22XX,n,Playback(/tmp/voicemail-greeting-${EXTEN:}) +exten =>_22XX,n,Playback(/tmp/voicemail-greeting-${EXTEN}) exten =>_22XX,n,Voicemail(${EXTEN}@default) exten =>_22XX,n,Hangup ;exten => 2298,1,Record(/tmp/warning1:gsm,,3) ;exten => 2297,1,Playback(/tmp/warning1) [service] -exten =>2296,1,Voicemail(${EXTEN}@default) +exten => 2296,1,VoiceMailMain() +exten => 2295,1,Record(/tmp/voicemail-greeting-${CALLERID(number)}) exten => 2298,1,Record(/tmp/warning1:gsm,,3) exten => 2297,1,Playback(/tmp/warning1) |
#asterisk -rcv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= Connected to Asterisk 1.4.21.2~dfsg-3+lenny1 currently running on linux12 (pid = 2323) Verbosity was 0 and is now 1 linux12*CLI> sip reload Reloading SIP linux12*CLI> extensions reload Dialplan reloaded. The 'extensions reload' command is deprecated and will be removed in a future release. Please use 'dialplan reload' instead. linux12*CLI> linux12*CLI> quit Executing last minute cleanups Asterisk cleanly ending (0). |
#/etc/init.d/asterisk stop
Stopping Asterisk PBX: asterisk. |
#/etc/init.d/asterisk start
Starting Asterisk PBX: asterisk. |
#vi /etc/asterisk/extensions.conf
|
#asterisk -rcv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Executing [2295@group1:3] VoiceMail("SIP/2201-0864a348", "2295@default") in new stack [Oct 27 11:04:56] WARNING[3430]: app_voicemail.c:2862 leave_voicemail: No entry in voicemail config file for '2295' -- Executing [2295@group1:4] Hangup("SIP/2201-0864a348", "") in new stack == Spawn extension (group1, 2295, 4) exited non-zero on 'SIP/2201-0864a348' -- Remote UNIX connection Executing last minute cleanups == Destroying musiconhold processes Disconnected from Asterisk server Executing last minute cleanups Asterisk cleanly ending (0). |
#ls /tmp/
.ICE-unix/ lost+found/ v170423/ l3-saved-2711.16695.512 v164054/ .X11-unix/ |
#ls /tmp/
.ICE-unix/ lost+found/ v170423/ l3-saved-2711.16695.512 v164054/ .X11-unix/ |
#ls /tmp/
.ICE-unix/ lost+found/ v170423/ l3-saved-2711.16695.512 v164054/ .X11-unix/ |
#ls /var/spool/asterisk/
dictate/ meetme/ monitor/ outgoing/ system/ tmp/ voicemail/ |
#ls /var/spool/asterisk/
dictate/ meetme/ monitor/ outgoing/ system/ tmp/ voicemail/ |
#ls /var/spool/asterisk/voicemail/default/2295/
INBOX/ temp/ tmp/ |
#ls /var/spool/asterisk/voicemail/default/2295/
INBOX/ temp/ tmp/ |
#asterisk -rcv
|
#asterisk -rcv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Oct 27 11:12:17] WARNING[3821]: chan_sip.c:2921 create_addr: No such host: 2296 [Oct 27 11:12:17] WARNING[3821]: app_dial.c:1202 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) [Oct 27 11:12:17] WARNING[3821]: file.c:602 ast_openstream_full: File /tmp/voicemail-greeting-2296 does not exist in any format [Oct 27 11:12:17] WARNING[3821]: file.c:912 ast_streamfile: Unable to open /tmp/voicemail-greeting-2296 (format 0x4 (ulaw)): No such file or directory [Oct 27 11:12:17] WARNING[3821]: app_playback.c:439 playback_exec: ast_streamfile failed on SIP/2201-088b1758 for /tmp/voicemail-greeting-2296 [Oct 27 11:12:17] WARNING[3821]: app_voicemail.c:2862 leave_voicemail: No entry in voicemail config file for '2296' [Oct 27 11:23:20] WARNING[3885]: channel.c:1882 ast_waitfordigit_full: Unexpected control subclass '16' linux12*CLI> exit Executing last minute cleanups Asterisk cleanly ending (0). |
#asterisk "extensions reload"
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -x "extensions reload"
Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#asterisk -rx "extensions reload"
Dialplan reloaded. The 'extensions reload' command is deprecated and will be removed in a future release. Please use 'dialplan reload' instead. |
#asterisk -rcv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Oct 27 11:34:48] WARNING[3949]: app.c:611 __ast_play_and_record: No audio available on SIP/2202-088b7358?? -- User hung up == Spawn extension (group3, 2201, 2) exited non-zero on 'SIP/2202-088b7358' -- Executing [2201@group3:1] Dial("SIP/2202-0887c6e0", "SIP/2201|10") in new stack -- Called 2201 -- SIP/2201-088b1758 is ringing == Spawn extension (group3, 2201, 1) exited non-zero on 'SIP/2202-0887c6e0' linux12*CLI> quit Executing last minute cleanups Asterisk cleanly ending (0). |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-2711.18280.21726 2010-10-27 11:36:43.000000000 +0300 +++ /etc/asterisk/extensions.conf 2010-10-27 11:44:48.000000000 +0300 @@ -588,7 +588,7 @@ exten => s,n,Dial(${ARG1}) [local] -exten =>_22XX,1,Dial(SIP/${EXTEN},10) +exten =>_22XX,1,Dial(SIP/${EXTEN},3) ;exten =>_22XX,n,Playback(/tmp/voicemail-greeting-${EXTEN}) exten =>_22XX,n,Voicemail(${EXTEN}@default) exten =>_22XX,n,Hangup |
#asterisk -rcv
Asterisk 1.4.21.2~dfsg-3+lenny1, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... -- Including context 'local' in context 'group2' -- Including context 'national' in context 'group2' -- Including context 'service' in context 'group2' -- Registered extension context 'group3' -- Including context 'local' in context 'group3' -- Including context 'service' in context 'group3' == Parsing '/etc/asterisk/users.conf': Found linux12*CLI> quit Executing last minute cleanups Asterisk cleanly ending (0). |
#vi /etc/asterisk/extensions.conf
|
#vi /etc/asterisk/extensions.conf
|
#;exten => 2297,1,Playback(/tmp/warning1)
dictate/ meetme/ monitor/ outgoing/ system/ tmp/ voicemail/ |
#ls /var/spool/asterisk/voicemail/default/22
2201/ 2295/ |
linux12.unix.nt
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh Debian-exim:x:101:103::/var/spool/exim4:/bin/false statd:x:102:65534::/var/lib/nfs:/bin/false andrey:x:1000:1000:andrey,,,:/home/andrey:/bin/bash sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin messagebus:x:104:106::/var/run/dbus:/bin/false haldaemon:x:105:107:Hardware abstraction layer,,,:/var/run/hal:/bin/false asterisk:x:106:109:Asterisk PBX daemon,,,:/var/lib/asterisk:/bin/false bind:x:107:110::/var/cache/bind:/bin/false smmta:x:108:111:Mail Transfer Agent,,,:/var/lib/sendmail:/bin/false smmsp:x:109:112:Mail Submission Program,,,:/var/lib/sendmail:/bin/false user:x:1001:1001::/home/user:/bin/false
Время первой команды журнала | 15:26:09 2010-10-26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:56:35 2010-10-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 24.75 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.53 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.48 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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