/l3/users/kos/nt-VOIP/linux6.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 |
|
#apt-get install tcpdump
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: tcpdump 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 376 kB of archives. After this operation, 901 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main tcpdump i386 4.1.1-1 [376 kB] Fetched 376 kB in 0s (10.4 MB/s) Selecting previously deselected package tcpdump. (Reading database ... 115863 files and directories currently installed.) Unpacking tcpdump (from .../tcpdump_4.1.1-1_i386.deb) ... Processing triggers for man-db ... Setting up tcpdump (4.1.1-1) ... |
#apt-get install tcpdump
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: tcpdump 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 376 kB of archives. After this operation, 901 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main tcpdump i386 4.1.1-1 [376 kB] Fetched 376 kB in 0s (10.4 MB/s) Selecting previously deselected package tcpdump. (Reading database ... 115863 files and directories currently installed.) Unpacking tcpdump (from .../tcpdump_4.1.1-1_i386.deb) ... Processing triggers for man-db ... Setting up tcpdump (4.1.1-1) ... |
#tcpdump -i eth2 not port 22
![]() tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes 09:43:27.856316 IP 192.168.60.200.61428 > linux6.unix.nt.sip: SIP, length: 4 09:43:27.856885 IP linux6.unix.nt.36955 > 10.0.35.1.domain: 29368+ PTR? 1.60.168.192.in-addr.arpa. (43) 09:43:27.857287 IP 10.0.35.1.domain > linux6.unix.nt.36955: 29368* 1/1/1 PTR linux6.unix.nt. (101) 09:43:27.857438 IP linux6.unix.nt.43262 > 10.0.35.1.domain: 31657+ PTR? 200.60.168.192.in-addr.arpa. (45) 09:43:27.857715 IP 10.0.35.1.domain > linux6.unix.nt.43262: 31657 NXDomain* 0/1/0 (95) 09:43:27.958142 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 200.60.168.192.in-addr.arpa. (45) 09:43:27.958187 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 200.60.168.192.in-addr.arpa. (45) 09:43:28.959563 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 200.60.168.192.in-addr.arpa. (45) ... 09:43:42.969145 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:42.969245 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:43.970606 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:43.970649 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:45.972065 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:45.972109 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) ^C 47 packets captured 69 packets received by filter 22 packets dropped by kernel |
#tcpdump -i eth2 not port 22
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes 09:43:27.856316 IP 192.168.60.200.61428 > linux6.unix.nt.sip: SIP, length: 4 09:43:27.856885 IP linux6.unix.nt.36955 > 10.0.35.1.domain: 29368+ PTR? 1.60.168.192.in-addr.arpa. (43) 09:43:27.857287 IP 10.0.35.1.domain > linux6.unix.nt.36955: 29368* 1/1/1 PTR linux6.unix.nt. (101) 09:43:27.857438 IP linux6.unix.nt.43262 > 10.0.35.1.domain: 31657+ PTR? 200.60.168.192.in-addr.arpa. (45) 09:43:27.857715 IP 10.0.35.1.domain > linux6.unix.nt.43262: 31657 NXDomain* 0/1/0 (95) 09:43:27.958142 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 200.60.168.192.in-addr.arpa. (45) 09:43:27.958187 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 200.60.168.192.in-addr.arpa. (45) 09:43:28.959563 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 200.60.168.192.in-addr.arpa. (45) ... 09:43:42.969145 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:42.969245 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:43.970606 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:43.970649 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:45.972065 IP6 fe80::7271:bcff:fe09:3aec.mdns > ff02::fb.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) 09:43:45.972109 IP linux6.unix.nt.mdns > 224.0.0.251.mdns: 0 PTR (QM)? 201.60.168.192.in-addr.arpa. (45) ^C 47 packets captured 69 packets received by filter 22 packets dropped by kernel |
#apt-get install netdiag
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: netdiag 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 290 kB of archives. After this operation, 1,004 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main netdiag i386 1.0-13 [290 kB] Fetched 290 kB in 0s (10.5 MB/s) Preconfiguring packages ... Selecting previously deselected package netdiag. (Reading database ... 115875 files and directories currently installed.) Unpacking netdiag (from .../netdiag_1.0-13_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Setting up netdiag (1.0-13) ... Processing triggers for menu ... |
#apt-get install netdiag
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: netdiag 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 290 kB of archives. After this operation, 1,004 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main netdiag i386 1.0-13 [290 kB] Fetched 290 kB in 0s (10.5 MB/s) Preconfiguring packages ... Selecting previously deselected package netdiag. (Reading database ... 115875 files and directories currently installed.) Unpacking netdiag (from .../netdiag_1.0-13_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Setting up netdiag (1.0-13) ... Processing triggers for menu ... |
#apt-cache search wireshark
![]() etherpuppet - create a virtual interface from a remote Ethernet interface packeth - Ethernet packet generator tshark - network traffic analyzer - console version wireshark-common - network traffic analyzer - common files wireshark-dbg - network traffic analyzer - debug symbols wireshark-dev - network traffic analyzer - development tools wireshark - network traffic analyzer - GTK+ version |
#apt-cache search wireshark
etherpuppet - create a virtual interface from a remote Ethernet interface packeth - Ethernet packet generator tshark - network traffic analyzer - console version wireshark-common - network traffic analyzer - common files wireshark-dbg - network traffic analyzer - debug symbols wireshark-dev - network traffic analyzer - development tools wireshark - network traffic analyzer - GTK+ version |
#tc
![]() Usage: tc [ OPTIONS ] OBJECT { COMMAND | help } tc [-force] -batch filename where OBJECT := { qdisc | class | filter | action | monitor } OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [filename] } |
#tc
Usage: tc [ OPTIONS ] OBJECT { COMMAND | help } tc [-force] -batch filename where OBJECT := { qdisc | class | filter | action | monitor } OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -p[retty] | -b[atch] [filename] } |
#apt-get install hping3
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: hping3 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 103 kB of archives. After this operation, 315 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main hping3 i386 3.a2.ds2-6 [103 kB] Fetched 103 kB in 0s (8,343 kB/s) Selecting previously deselected package hping3. (Reading database ... 115909 files and directories currently installed.) Unpacking hping3 (from .../hping3_3.a2.ds2-6_i386.deb) ... Processing triggers for man-db ... Setting up hping3 (3.a2.ds2-6) ... |
#apt-get install hping3
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: hping3 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 103 kB of archives. After this operation, 315 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main hping3 i386 3.a2.ds2-6 [103 kB] Fetched 103 kB in 0s (8,343 kB/s) Selecting previously deselected package hping3. (Reading database ... 115909 files and directories currently installed.) Unpacking hping3 (from .../hping3_3.a2.ds2-6_i386.deb) ... Processing triggers for man-db ... Setting up hping3 (3.a2.ds2-6) ... |
#hping3 -S -p 80 www.microsoft.com
![]() HPING www.microsoft.com (eth2 65.55.12.249): S set, 40 headers + 0 data bytes len=46 ip=65.55.12.249 ttl=240 id=28432 sport=80 flags=SA seq=0 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=58969 sport=80 flags=SA seq=1 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=49824 sport=80 flags=SA seq=2 win=8190 rtt=186.5 ms len=46 ip=65.55.12.249 ttl=240 id=29947 sport=80 flags=SA seq=3 win=8190 rtt=186.6 ms len=46 ip=65.55.12.249 ttl=240 id=4945 sport=80 flags=SA seq=4 win=8190 rtt=186.4 ms len=46 ip=65.55.12.249 ttl=240 id=14508 sport=80 flags=SA seq=5 win=8190 rtt=186.6 ms len=46 ip=65.55.12.249 ttl=240 id=62209 sport=80 flags=SA seq=6 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=45394 sport=80 flags=SA seq=7 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=49322 sport=80 flags=SA seq=8 win=8190 rtt=186.8 ms ^C --- www.microsoft.com hping statistic --- 9 packets transmitted, 9 packets received, 0% packet loss round-trip min/avg/max = 186.1/186.4/186.8 ms |
#hping3 -S -p 80 www.microsoft.com
HPING www.microsoft.com (eth2 65.55.12.249): S set, 40 headers + 0 data bytes len=46 ip=65.55.12.249 ttl=240 id=28432 sport=80 flags=SA seq=0 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=58969 sport=80 flags=SA seq=1 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=49824 sport=80 flags=SA seq=2 win=8190 rtt=186.5 ms len=46 ip=65.55.12.249 ttl=240 id=29947 sport=80 flags=SA seq=3 win=8190 rtt=186.6 ms len=46 ip=65.55.12.249 ttl=240 id=4945 sport=80 flags=SA seq=4 win=8190 rtt=186.4 ms len=46 ip=65.55.12.249 ttl=240 id=14508 sport=80 flags=SA seq=5 win=8190 rtt=186.6 ms len=46 ip=65.55.12.249 ttl=240 id=62209 sport=80 flags=SA seq=6 win=8190 rtt=186.2 ms len=46 ip=65.55.12.249 ttl=240 id=45394 sport=80 flags=SA seq=7 win=8190 rtt=186.1 ms len=46 ip=65.55.12.249 ttl=240 id=49322 sport=80 flags=SA seq=8 win=8190 rtt=186.8 ms ^C --- www.microsoft.com hping statistic --- 9 packets transmitted, 9 packets received, 0% packet loss round-trip min/avg/max = 186.1/186.4/186.8 ms |
#apt-cache search icmp tunnel
![]() icmptx - Tunnel IP over ICMP ptunnel - Tunnel TCP connections over ICMP packets |
#apt-cache search icmp tunnel
icmptx - Tunnel IP over ICMP ptunnel - Tunnel TCP connections over ICMP packets |
#apt-get install iperf
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: iperf 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 52.5 kB of archives. After this operation, 143 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main iperf i386 2.0.4-5 [52.5 kB] Fetched 52.5 kB in 0s (0 B/s) Selecting previously deselected package iperf. (Reading database ... 115940 files and directories currently installed.) Unpacking iperf (from .../iperf_2.0.4-5_i386.deb) ... Processing triggers for man-db ... Setting up iperf (2.0.4-5) ... |
#apt-get install iperf
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: iperf 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 52.5 kB of archives. After this operation, 143 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main iperf i386 2.0.4-5 [52.5 kB] Fetched 52.5 kB in 0s (0 B/s) Selecting previously deselected package iperf. (Reading database ... 115940 files and directories currently installed.) Unpacking iperf (from .../iperf_2.0.4-5_i386.deb) ... Processing triggers for man-db ... Setting up iperf (2.0.4-5) ... |
#iperf -s
![]() ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ |
#iperf -s
------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 85.3 KByte (default) ------------------------------------------------------------ |
#nc 192.168.90.1 3000 |dd of=/dev/null
![]() (UNKNOWN) [192.168.90.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.00120368 s, 0.0 kB/s |
#nc 192.168.90.1 3000 |dd of=/dev/null
(UNKNOWN) [192.168.90.1] 3000 (?) : Connection refused 0+0 records in 0+0 records out 0 bytes (0 B) copied, 0.00120368 s, 0.0 kB/s |
#apt-get install sox
![]() Reading package lists... Done Building dependency tree Reading state information... Done sox is already the newest version. sox set to manually installed. The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install sox
Reading package lists... Done Building dependency tree Reading state information... Done sox is already the newest version. sox set to manually installed. The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.27512.14487 2011-10-19 10:23:29.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 10:24:41.000000000 +0300 @@ -15,7 +15,7 @@ [local] exten => _220X,1,Answer -exnet => _220X,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%M)}) +exnet => _220X,n,Set(CALLFILENAME=${EXTEN}-${CALLERID(num)}-${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S)}) exten => _220X,n,Monitor(wav,${CALLFILENAME},m) exten => _220X,n,Voicemail(${EXTEN}@default) |
#ls /var/spool/asterisk/monito
![]() ls: cannot access /var/spool/asterisk/monito: No such file or directory |
#ls /var/spool/asterisk/monito
![]() ls: cannot access /var/spool/asterisk/monito: No such file or directory |
#apt-get install samba
![]() Package configuration âââââââââââââââââââââââââââââââââââââââââââââ⤠Samba Server ââââââââââââââââââââââââââââââââââââââââââââââ â Please specify the workgroup for this system. This setting controls which workgroup the system will â â appear in when used as a server, the default workgroup to be used when browsing with various â â frontends, and the domain name used with the "security=domain" setting. â â â â Workgroup/Domain Name: â â â âunix.nt__UP_____________________________________________________________________________________________ â â â ... Importing account for nobody...ok Importing account for user...ok Adding group `sambashare' (GID 117) ... Done. update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode. Starting Samba daemons: nmbd smbd. Setting up samba-common-bin (2:3.5.6~dfsg-3squeeze5) ... update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode. update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode. update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode. |
#apt-get install samba
Package configuration âââââââââââââââââââââââââââââââââââââââââââââ⤠Samba Server ââââââââââââââââââââââââââââââââââââââââââââââ â Please specify the workgroup for this system. This setting controls which workgroup the system will â â appear in when used as a server, the default workgroup to be used when browsing with various â â frontends, and the domain name used with the "security=domain" setting. â â â â Workgroup/Domain Name: â â â âunix.nt__UP_____________________________________________________________________________________________ â â â ... Importing account for nobody...ok Importing account for user...ok Adding group `sambashare' (GID 117) ... Done. update-alternatives: using /usr/bin/smbstatus.samba3 to provide /usr/bin/smbstatus (smbstatus) in auto mode. Starting Samba daemons: nmbd smbd. Setting up samba-common-bin (2:3.5.6~dfsg-3squeeze5) ... update-alternatives: using /usr/bin/nmblookup.samba3 to provide /usr/bin/nmblookup (nmblookup) in auto mode. update-alternatives: using /usr/bin/net.samba3 to provide /usr/bin/net (net) in auto mode. update-alternatives: using /usr/bin/testparm.samba3 to provide /usr/bin/testparm (testparm) in auto mode. |
#vim /etc/samba/samba.conf
![]() |
#~
![]() #### Debugging/Accounting #### # This tells Samba to use a separate log file for each machine # that connects log file = /var/log/samba/log.%m # Cap the size of the individual log files (in KiB). max log size = 1000 # If you want Samba to only log through syslog then set the following # parameter to 'yes'. # syslog only = no # We want Samba to log a minimum amount of information to syslog. Everything ... # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom "/etc/samba/smb.conf" 325L, 11897C written |
#~
# # Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as ... # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 # # The CD-ROM gets unmounted automatically after the connection to the # # If you don't want to use auto-mounting/unmounting make sure the CD # is mounted on /cdrom # ; preexec = /bin/mount /cdrom ; postexec = /bin/umount /cdrom "/etc/samba/smb.conf" 325L, 11897C written |
#; name resolve order = lmhosts host wins bcast
![]() gnats:x:41: shadow:x:42: utmp:x:43: video:x:44:user sasl:x:45: plugdev:x:46:user staff:x:50: games:x:60: users:x:100: nogroup:x:65534: ... netdev:x:108: bluetooth:x:109: fuse:x:110: Debian-gdm:x:111: scanner:x:112:saned saned:x:113: asterisk:x:114: smmta:x:115: :user sambashare:x:117: "/etc/group" 57L, 764C written |
#; name resolve order = lmhosts host wins bcast
man:x:12: proxy:x:13: kmem:x:15: dialout:x:20:asterisk fax:x:21: voice:x:22: cdrom:x:24:user floppy:x:25:user tape:x:26: sudo:x:27: ... fuse:x:110: Debian-gdm:x:111: scanner:x:112:saned saned:x:113: asterisk:x:114: smmta:x:115: smmsp:x:116: :user sambashare:x:117: "/etc/group" 57L, 764C written |
#vim /etc/samba/smb.conf
--- /tmp/l3-saved-3748.23424.13793 2011-10-19 10:36:01.000000000 +0300 +++ /etc/samba/smb.conf 2011-10-19 10:36:51.000000000 +0300 @@ -304,10 +304,10 @@ # A sample share for sharing your CD-ROM with others. [Monik] comment = Asterisk monitor files -; read only = yes -; locking = no -; path = /cdrom -; guest ok = yes + read only = yes + locking = no + path = /var/spool/asterisk/monitor + guest ok = yes # The next two parameters show how to auto-mount a CD-ROM when the # cdrom share is accesed. For this to work /etc/fstab must contain |
#/etc/init.d/samba restart
![]() Stopping Samba daemons: nmbd smbd. Starting Samba daemons: nmbd smbd. |
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd. Starting Samba daemons: nmbd smbd. |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.9912.8866 2011-10-19 10:57:57.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 11:08:28.000000000 +0300 @@ -1,39 +1,47 @@ -[default] - -;------------------------------ -; RESOURCES -;------------------------------ - -[international] - -exten => _[123]XXX,1,Dial(SIP/tbs/${EXTEN}) - -[national] - -exten => _2[12]XXX,1,Dial(SIP/tbs/${EXTEN}) - -[local] - -exten => _220X,1,Answer -exten => _220X,n,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${EXTEN}-${CALLERID(num)}) -exten => _220X,n,Monitor(wav,${CALLFILENAME},m) -exten => _220X,n,Dial(SIP,${EXTEN},10) -exten => _220X,n,Voicemail(${EXTEN}@default) - -[internal] - -exten => _228X,1,GotoIf($["${CALLERID(num)}" != "220${EXTEN:3}"]?password) -exten => _228X,n,VoicemailMain(220${EXTEN:3},s) -exten => _228X,n,Hangup -exten => _228X,n(password),VoicemailMain(220${EXTEN:3}) -exten => _228X,n,Hangup - -exten => 2297,1,VoicemailMain() -exten => 2299,1,Playback(demo-thanks) -exten => 2298,1,Record(/var/lib/asterisk/sounds/recorded-voice:wav,2) exten => 2298,n,Playback(/var/lib/asterisk/sounds/recorded-voice) -;------------------------------------ +RSOURCES +; ------------------------------- + +[macro-monitor] + +exten => s,1,Set(CALLFILENAME=${EPOCH}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H-%M-%S")}-${MACRO_EXTEN}-${CALLERID(num)}) +exten => s,n,MixMonitor(wav,${CALLFILENAME}) +exten => s,n,Dial(${ARG1},10) + +[internal] + +exten => _228X,1,GotoIf($[ "${CALLERID(num)}" != "310${EXTEN:3}" ]?password) +exten => _228X,n,VoicemailMain(310${EXTEN:3},s) +exten => _228X,n,Hangup +exten => _228X,n(password),VoicemailMain(310${EXTEN:3}) +exten => _228X,n,Hangup + +exten => 2297,1,VoicemailMain() + +exten => 2298,1,Record(/var/lib/asterisk/sounds/recorded-voice:gsm,2) +exten => 2298,n,Playback(/var/lib/asterisk/sounds/recorded-voice) + +exten => 2299,1,Playback(demo-thanks) +exten => 2299,n,Playback(demo-thanks) +exten => 2299,n,Playback(demo-thanks) + +[local] + +exten => _220X,1,Answer +exten => _220X,n,Macro(monitor,SIP/${EXTEN}) +exten => _220X,n,Voicemail(${EXTEN}@default) + +[national] + +exten => _2[34]XX,1,Macro(monitor,SIP/tbs/${EXTEN}) + +[international] + +exten => _[123]XXX,1,Macro(monitor,SIP/tbs/${EXTEN}) + +; ------------------------------- +; ; USERS ;------------------------------------ |
#asterisk -rvvv
![]() Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux6 (pid = 12563) Verbosity was 2 and is now 3 == Using SIP RTP CoS mark 5 -- Executing [2202@gr3:1] Answer("SIP/2201-00000016", "") in new stack -- Executing [2202@gr3:2] Set("SIP/2201-00000016", "CALLFILENAME=1319012666-"2011-10-19-11-24-26"-2202-2201") in new stack -- Executing [2202@gr3:3] Monitor("SIP/2201-00000016", "wav,1319012666-"2011-10-19-11-24-26"-2202-2201,m") in new stack -- Executing [2202@gr3:4] Dial("SIP/2201-00000016", "SIP,2202,10") in new stack [Oct 19 11:24:26] WARNING[16460]: app_dial.c:1663 dial_exec_full: Dial argument takes format (technology/[device:]number1) == Spawn extension (gr3, 2202, 4) exited non-zero on 'SIP/2201-00000016' linux6*CLI> exit Executing last minute cleanups |
#asterisk -rvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux6 (pid = 12563) Verbosity was 2 and is now 3 == Using SIP RTP CoS mark 5 -- Executing [2202@gr3:1] Answer("SIP/2201-00000016", "") in new stack -- Executing [2202@gr3:2] Set("SIP/2201-00000016", "CALLFILENAME=1319012666-"2011-10-19-11-24-26"-2202-2201") in new stack -- Executing [2202@gr3:3] Monitor("SIP/2201-00000016", "wav,1319012666-"2011-10-19-11-24-26"-2202-2201,m") in new stack -- Executing [2202@gr3:4] Dial("SIP/2201-00000016", "SIP,2202,10") in new stack [Oct 19 11:24:26] WARNING[16460]: app_dial.c:1663 dial_exec_full: Dial argument takes format (technology/[device:]number1) == Spawn extension (gr3, 2202, 4) exited non-zero on 'SIP/2201-00000016' linux6*CLI> exit Executing last minute cleanups |
#vim /etc/asterisk/extensions.conf
![]() |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.30674.2276 2011-10-19 11:26:04.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 11:26:42.000000000 +0300 @@ -11,10 +11,10 @@ [internal] -exten => _228X,1,GotoIf($[ "${CALLERID(num)}" != "310${EXTEN:3}" ]?password) -exten => _228X,n,VoicemailMain(310${EXTEN:3},s) +exten => _228X,1,GotoIf($[ "${CALLERID(num)}" != "220${EXTEN:3}" ]?password) +exten => _228X,n,VoicemailMain(220${EXTEN:3},s) exten => _228X,n,Hangup -exten => _228X,n(password),VoicemailMain(310${EXTEN:3}) +exten => _228X,n(password),VoicemailMain(220${EXTEN:3}) exten => _228X,n,Hangup exten => 2297,1,VoicemailMain() |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.18321.6613 2011-10-19 11:28:02.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 11:29:05.000000000 +0300 @@ -34,7 +34,7 @@ [national] -exten => _2[34]XX,1,Macro(monitor,SIP/tbs/${EXTEN}) +exten => _22XX,1,Macro(monitor,SIP/tbs/${EXTEN}) [international] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.13072.31327 2011-10-19 11:33:56.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 11:35:19.000000000 +0300 @@ -1,6 +1,6 @@ exten => 2298,n,Playback(/var/lib/asterisk/sounds/recorded-voice) -RSOURCES +; RSOURCES ; ------------------------------- [macro-monitor] |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.7590.2759 2011-10-19 11:35:39.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 11:35:56.000000000 +0300 @@ -1,4 +1,4 @@ -exten => 2298,n,Playback(/var/lib/asterisk/sounds/recorded-voice) +;exten => 2298,n,Playback(/var/lib/asterisk/sounds/recorded-voice) ; RSOURCES ; ------------------------------- |
#vim /etc/asterisk/extensions.conf
--- /tmp/l3-saved-3748.20401.32550 2011-10-19 11:36:47.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-19 11:38:14.000000000 +0300 @@ -1,6 +1,7 @@ -;exten => 2298,n,Playback(/var/lib/asterisk/sounds/recorded-voice) +[default] -; RSOURCES +;-------------------------------- +; RESOURCES ; ------------------------------- [macro-monitor] |
#apt-cache search sox mp3
![]() cplay - A front-end for various audio players libsox-fmt-mp3 - SoX MP3 format library sox - Swiss army knife of sound processing |
#apt-cache search sox mp3
cplay - A front-end for various audio players libsox-fmt-mp3 - SoX MP3 format library sox - Swiss army knife of sound processing |
#apt-get install libsox-fmt-mp3
![]() Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: libsox-fmt-mp3 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 47.0 kB of archives. After this operation, 102 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main libsox-fmt-mp3 i386 14.3.1-1 [47.0 kB] Fetched 47.0 kB in 0s (0 B/s) Selecting previously deselected package libsox-fmt-mp3. (Reading database ... 116060 files and directories currently installed.) Unpacking libsox-fmt-mp3 (from .../libsox-fmt-mp3_14.3.1-1_i386.deb) ... Setting up libsox-fmt-mp3 (14.3.1-1) ... |
#apt-get install libsox-fmt-mp3
Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. The following NEW packages will be installed: libsox-fmt-mp3 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 47.0 kB of archives. After this operation, 102 kB of additional disk space will be used. Get:1 http://10.0.35.1/debian/ squeeze/main libsox-fmt-mp3 i386 14.3.1-1 [47.0 kB] Fetched 47.0 kB in 0s (0 B/s) Selecting previously deselected package libsox-fmt-mp3. (Reading database ... 116060 files and directories currently installed.) Unpacking libsox-fmt-mp3 (from .../libsox-fmt-mp3_14.3.1-1_i386.deb) ... Setting up libsox-fmt-mp3 (14.3.1-1) ... |
#apt-get install libsox-fmt-base
![]() Reading package lists... Done Building dependency tree Reading state information... Done libsox-fmt-base is already the newest version. libsox-fmt-base set to manually installed. The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install libsox-fmt-base
Reading package lists... Done Building dependency tree Reading state information... Done libsox-fmt-base is already the newest version. libsox-fmt-base set to manually installed. The following packages were automatically installed and are no longer required: mysql-common libmysqlclient16 Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#apt-get install libsox-fmt-gsm
![]() Reading package lists... Done Building dependency tree Reading state information... Done Package libsox-fmt-gsm 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: libsox-fmt-base E: Package 'libsox-fmt-gsm' has no installation candidate |
#apt-get install libsox-fmt-gsm
![]() Reading package lists... Done Building dependency tree Reading state information... Done Package libsox-fmt-gsm 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: libsox-fmt-base E: Package 'libsox-fmt-gsm' has no installation candidate |
#scp -r 192.168.50.1:/home/user/Music /home/user
![]() root@192.168.50.1's password: Permission denied, please try again. root@192.168.50.1's password: Vova.mp3 100% 70KB 69.8KB/s 00:00 jsmailo.mp3 100% 848KB 848.1KB/s 00:00 |
#scp -r 192.168.50.1:/home/user/Music /home/user
root@192.168.50.1's password: Permission denied, please try again. root@192.168.50.1's password: Vova.mp3 100% 70KB 69.8KB/s 00:00 jsmailo.mp3 100% 848KB 848.1KB/s 00:00 |
Время первой команды журнала | 16:29:15 2011-10-18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:52:02 2011-10-19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 9.90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 7.92 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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