/l3/users/alexv/sl-voip-2016-03/asterisk4.unix.sl/user :1 :2 :3 |
|
#exit
exit |
$cd ~/.lilalo/
|
$ls
7775103941633717780-1459173267.info l3bashrc 7775103941633717780-1459173267.script l3prompt |
$cat l3bashrc
#!/bin/sh # (c) Igor Chubin, igor@chub.in, 2004-2006 # Environment variables set by the script: # # L3_SESSION_ID - uniq id of the LiLaLo-session # L3_PARENT_TTY - name of tty on which script is running # PS1 - intercative shell prompt in which LiLaLo hides # various information about the command # L3_TAMPERED_EDITORS - list of editors which are tampered with functions # Functions with the names starting _l3_ are internal. ... _l3_init_prompt() { PS1='[\u@\h:\W]\$ ' [ $UID = 0 ] \ && PS1='\[\033[0;31m\]'$PS1'\[\033[0m\]' \ || PS1='\[\033[0;32m\]'$PS1'\[\033[0m\]' \ export PS1 } l3_fix_prompt() { |
$ls -la
total 36 drwxr-xr-x 2 user root 4096 Mar 28 16:54 . drwxr-xr-x 19 user user 4096 Mar 28 16:46 .. -rw-r--r-- 1 user user 631 Mar 28 16:57 7775103941633717780-1459173267.info -rw-r--r-- 1 user user 9618 Mar 28 16:57 7775103941633717780-1459173267.script -rw-r--r-- 1 user root 7857 Mar 28 16:40 l3bashrc -rwxr-xr-x 1 user root 234 Mar 28 16:40 l3prompt |
$sudo apt-get update
[sudo] password for user: Hit http://security.debian.org jessie/updates InRelease Hit http://security.debian.org jessie/updates/main Sources Ign http://192.168.40.1:9999 jessie InRelease Hit http://security.debian.org jessie/updates/main amd64 Packages Hit http://security.debian.org jessie/updates/main Translation-en Get:1 http://192.168.40.1:9999 jessie-updates InRelease [142 kB] Hit http://192.168.40.1:9999 jessie Release.gpg Hit http://192.168.40.1:9999 jessie-updates/main Sources Get:2 http://192.168.40.1:9999 jessie-updates/main amd64 Packages/DiffIndex [1,504 B] Get:3 http://192.168.40.1:9999 jessie-updates/main Translation-en/DiffIndex [736 B] Hit http://192.168.40.1:9999 jessie Release Hit http://192.168.40.1:9999 jessie/main Sources Hit http://192.168.40.1:9999 jessie/main amd64 Packages Hit http://192.168.40.1:9999 jessie/main Translation-en Fetched 145 kB in 2s (53.5 kB/s) Reading package lists... Done |
$ls -la
total 40 drwxr-xr-x 2 user root 4096 Mar 28 16:54 . drwxr-xr-x 19 user user 4096 Mar 28 16:46 .. -rw-r--r-- 1 user user 706 Mar 28 16:58 7775103941633717780-1459173267.info -rw-r--r-- 1 user user 14421 Mar 28 16:58 7775103941633717780-1459173267.script -rw-r--r-- 1 user root 7857 Mar 28 16:40 l3bashrc -rwxr-xr-x 1 user root 234 Mar 28 16:40 l3prompt |
$^C
|
$clear
|
$cat ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options ... # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi . /home/user/.lilalo/l3bashrc && _l3_start |
$sudo apt-cache stats
[sudo] password for user: Total package names: 54141 (1,083 k) Total package structures: 54144 (3,032 k) Normal packages: 41895 Pure virtual packages: 462 Single virtual packages: 4648 Mixed virtual packages: 357 Missing: 6782 Total distinct versions: 43180 (3,109 k) Total distinct descriptions: 84525 (2,029 k) Total dependencies: 269943 (7,558 k) Total ver/file relations: 44573 (1,070 k) Total Desc/File relations: 84525 (2,029 k) Total Provides mappings: 7493 (150 k) Total globbed strings: 75 (581 ) Total dependency version space: 1,096 k Total slack space: 56.4 k Total space accounted for: 15.0 M |
$ssh user@192.168.40.1
user@192.168.40.1's password: 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. You have mail. Last login: Tue Mar 29 10:24:32 2016 from m3 vipicoeevimnanol3-agent is already running: pid=27049; pidfile=/home/user/.lilalo/l3-agent.pid |
$screen -x
|
$sudo ifconfig
[sudo] password for user: eth0 Link encap:Ethernet HWaddr 6c:62:6d:7a:c4:9f inet addr:192.168.40.2 Bcast:192.168.40.255 Mask:255.255.255.0 inet6 addr: fe80::6e62:6dff:fe7a:c49f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:18388 errors:0 dropped:0 overruns:0 frame:0 TX packets:11279 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11454835 (10.9 MiB) TX bytes:888480 (867.6 KiB) Interrupt:19 Memory:f0400000-f0420000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:30 errors:0 dropped:0 overruns:0 frame:0 TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3300 (3.2 KiB) TX bytes:3300 (3.2 KiB) |
$cat /etc/network/interfaces
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.40.2 netmask 255.255.255.0 network 192.168.40.0 broadcast 192.168.40.255 gateway 192.168.40.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 8.8.8.8 dns-search unix.sl |
$sudo route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.40.1 0.0.0.0 UG 0 0 0 eth0 192.168.40.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
$sudo apt-get install isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: isc-dhcp-server-ldap The following NEW packages will be installed: isc-dhcp-server 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 381 kB of archives. After this operation, 864 kB of additional disk space will be used. ... (Reading database ... 83332 files and directories currently installed.) Preparing to unpack .../isc-dhcp-server_4.3.1-6+deb8u2_amd64.deb ... Unpacking isc-dhcp-server (4.3.1-6+deb8u2) ... Processing triggers for systemd (215-17+deb8u3) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up isc-dhcp-server (4.3.1-6+deb8u2) ... Generating /etc/default/isc-dhcp-server... Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details. invoke-rc.d: initscript isc-dhcp-server, action "start" failed. Processing triggers for systemd (215-17+deb8u3) ... |
$sudo apt-cache -s bash
E: Command line option 's' [from -s] is not known. |
$sudo apt-cache search bash
acr - autoconf like tool android-androresolvd - Daemon to transfer Android DNS property to resolv.conf apparix - console-based bookmark tool for fast file system navigation awesome-extra - additional modules for awesome backup-manager - command-line backup tool bash - GNU Bourne Again SHell bash-builtins - Bash loadable builtins - headers & examples bash-doc - Documentation and examples for the GNU Bourne Again SHell bash-static - GNU Bourne Again SHell (static version) bash-completion - programmable completion for the bash shell ... spacefm-gtk3 - Multi-panel tabbed file manager - GTK3 version switchsh - bind-mount bash as /bin/sh syslogout - Modularized system wide shell logout mechanism sysprofile - Modularized system wide shell configuration mechanism texlive-extra-utils - TeX Live: TeX auxiliary programs texlive-latex-extra - TeX Live: LaTeX additional packages txt2regex - A Regular Expression "wizard", all written with bash2 builtins undistract-me - Notifies user when long-running terminal commands complete via libnotify yash - yet another shell z80asm - assembler for the Zilog Z80 microprocessor |
$sudo apt-get install bash-incompletion
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package bash-incompletion |
$sudo apt-get install bash-ncompletion
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package bash-ncompletion |
$sudo apt-get install bash-completion
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: bash-completion 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 182 kB of archives. After this operation, 951 kB of additional disk space will be used. Get:1 http://192.168.40.1:9999/debian/ jessie/main bash-completion all 1:2.1-4 [182 kB] Fetched 182 kB in 0s (16.6 MB/s) Selecting previously unselected package bash-completion. (Reading database ... 83346 files and directories currently installed.) Preparing to unpack .../bash-completion_1%3a2.1-4_all.deb ... Unpacking bash-completion (1:2.1-4) ... Processing triggers for man-db (2.7.0.2-5) ... Setting up bash-completion (1:2.1-4) ... |
$sudo apt-get install
.bash_history Downloads/ Pictures/ .bash_logout .gconf/ .profile .bash_profile .gnupg/ Public/ .bashrc .gstreamer-0.10/ .ssh/ .cache/ .ICEauthority Templates/ .config/ .l3rc Videos/ .dbus/ .lilalo/ .Xauthority Desktop/ .local/ .xscreensaver .dmrc .mozilla/ .xsession-errors Documents/ Music/ .xsession-errors.old |
$. /etc/bash_completion
|
$sudo gedit /root/.bashrc
** (gedit:2926): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:2926): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:2926): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:2926): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:2926): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:2926): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$su
Password: |
#sudo apt-get install is
isag isdnlog isomaster isatapd isdnlog-data isomd5sum isc-dhcp-client isdnutils-base isoqlog isc-dhcp-client-dbg isdnutils-doc isoquery isc-dhcp-common isdnutils-xtools ispanish isc-dhcp-dbg isdnvbox ispell isc-dhcp-dev isdnvboxclient isrcsubmit isc-dhcp-relay isdnvboxserver istanbul isc-dhcp-relay-dbg iselect istgt isc-dhcp-server isenkram iswedish isc-dhcp-server-dbg isenkram-cli iswiss isc-dhcp-server-ldap islamic-menus isync iscsitarget iso-codes iscsitarget-dkms isolinux |
#apt-get install isc-dhcp-server
Reading package lists... Done Building dependency tree Reading state information... Done isc-dhcp-server is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#exit
exit |
$sudo gedit /etc/lilalo/l3config.pm
** (gedit:3057): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:3057): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3057): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3057): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:3057): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:3057): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$l3-agent
|
#l3-agent
Removing stale pidfile |
#exit
exit |
$clear
|
$sudo gedit /etc/dhcp/dhcpd.conf
** (gedit:3182): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:3182): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:3182): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:3182): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:3182): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:3182): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:3182): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:3182): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$sudo service isc-dhcp-server restart
Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details. |
$sudo service isc-dhcp-server stop
|
$sudo service isc-dhcp-server start
Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details. |
$sudo service isc-dhcp-server start
|
$ps aux | grep dhcp
root 3377 0.0 0.0 28480 9488 ? Ss 11:54 0:00 /usr/sbin/dhcpd -q -cf /etc/dhcp/dhcpd.conf -pf /var/run/dhcpd.pid user 3388 0.0 0.0 12728 2136 pts/3 S+ 11:56 0:00 grep dhcp |
$cd /var/lib/dhcp/
|
$ls
dhclient.leases dhcpd.leases dhcpd.leases~ |
$cat dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377Dlbmz\304\237"; lease 192.168.40.200 { starts 2 2016/03/29 08:56:29; ends 2 2016/03/29 09:06:29; cltt 2 2016/03/29 08:56:29; binding state active; next binding state free; rewind binding state free; hardware ethernet e0:18:77:03:d5:88; client-hostname "FLB-S752"; } |
$cat dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377Dlbmz\304\237"; lease 192.168.40.200 { starts 2 2016/03/29 08:56:29; ends 2 2016/03/29 09:06:29; cltt 2 2016/03/29 08:56:29; binding state active; next binding state free; rewind binding state free; hardware ethernet e0:18:77:03:d5:88; client-hostname "FLB-S752"; } |
$cat dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377Dlbmz\304\237"; lease 192.168.40.200 { starts 2 2016/03/29 08:56:29; ends 2 2016/03/29 09:06:29; cltt 2 2016/03/29 08:56:29; binding state active; next binding state free; rewind binding state free; hardware ethernet e0:18:77:03:d5:88; client-hostname "FLB-S752"; } |
$cat dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377Dlbmz\304\237"; lease 192.168.40.200 { starts 2 2016/03/29 08:56:29; ends 2 2016/03/29 09:06:29; cltt 2 2016/03/29 08:56:29; binding state active; next binding state free; rewind binding state free; ... starts 2 2016/03/29 09:01:07; ends 2 2016/03/29 09:11:07; cltt 2 2016/03/29 09:01:07; binding state active; next binding state free; rewind binding state free; hardware ethernet 00:0e:08:d7:41:7b; uid "\001\000\016\010\327A{"; client-hostname "SipuraSPA"; } |
$cat dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377Dlbmz\304\237"; lease 192.168.40.200 { starts 2 2016/03/29 08:56:29; ends 2 2016/03/29 09:06:29; cltt 2 2016/03/29 08:56:29; binding state active; next binding state free; rewind binding state free; ... lease 192.168.40.200 { starts 2 2016/03/29 09:01:11; ends 2 2016/03/29 09:11:11; cltt 2 2016/03/29 09:01:11; binding state active; next binding state free; rewind binding state free; hardware ethernet e0:18:77:03:d5:88; client-hostname "FLB-S752"; } |
$sudo apt-get install nmap
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libblas-common libblas3 libgfortran3 liblinear1 liblua5.2-0 libpcap0.8 ndiff python-lxml Suggested packages: liblinear-tools liblinear-dev python-lxml-dbg The following NEW packages will be installed: libblas-common libblas3 libgfortran3 liblinear1 liblua5.2-0 libpcap0.8 ... Setting up libblas-common (1.2.20110419-10) ... Setting up libblas3 (1.2.20110419-10) ... update-alternatives: using /usr/lib/libblas/libblas.so.3 to provide /usr/lib/libblas.so.3 (libblas.so.3) in auto mode Setting up liblinear1:amd64 (1.8+dfsg-4) ... Setting up liblua5.2-0:amd64 (5.2.3-1.1) ... Setting up libpcap0.8:amd64 (1.6.2-2) ... Setting up python-lxml (3.4.0-1) ... Setting up ndiff (6.47-3) ... Setting up nmap (6.47-3+b1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... |
$nmap
Nmap 6.47 ( http://nmap.org ) Usage: nmap [Scan Type(s)] [Options] {target specification} TARGET SPECIFICATION: Can pass hostnames, IP addresses, networks, etc. Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254 -iL <inputfilename>: Input from list of hosts/networks -iR <num hosts>: Choose random targets --exclude <host1[,host2][,host3],...>: Exclude hosts/networks --excludefile <exclude_file>: Exclude list from file HOST DISCOVERY: ... --send-eth/--send-ip: Send using raw ethernet frames or IP packets --privileged: Assume that the user is fully privileged --unprivileged: Assume the user lacks raw socket privileges -V: Print version number -h: Print this help summary page. EXAMPLES: nmap -v -A scanme.nmap.org nmap -v -sn 192.168.0.0/16 10.0.0.0/8 nmap -v -iR 10000 -Pn -p 80 SEE THE MAN PAGE (http://nmap.org/book/man.html) FOR MORE OPTIONS AND EXAMPLES |
$nmap -p 22 -sn 192.168.40.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:05 MSK You cannot use -F (fast scan) or -p (explicit port selection) when not doing a port scan QUITTING! |
$nmap -sn 192.168.40.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:05 MSK Nmap scan report for 192.168.40.1 Host is up (0.00020s latency). Nmap scan report for asterisk4.unix.sl (192.168.40.2) Host is up (0.00014s latency). Nmap scan report for 192.168.40.200 Host is up (0.00022s latency). Nmap scan report for 192.168.40.201 Host is up (0.0044s latency). Nmap done: 256 IP addresses (4 hosts up) scanned in 2.48 seconds |
$nmap -p22 -sn 192.168.40.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:05 MSK You cannot use -F (fast scan) or -p (explicit port selection) when not doing a port scan QUITTING! |
$nmap -p 22 192.168.40.0/24
Starting Nmap 6.47 ( http://nmap.org ) at 2016-03-29 12:06 MSK Nmap scan report for 192.168.40.1 Host is up (0.00032s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for asterisk4.unix.sl (192.168.40.2) Host is up (0.00013s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for 192.168.40.200 Host is up (0.00028s latency). PORT STATE SERVICE 22/tcp open ssh Nmap scan report for 192.168.40.201 Host is up (0.0016s latency). PORT STATE SERVICE 22/tcp closed ssh Nmap done: 256 IP addresses (4 hosts up) scanned in 2.40 seconds |
$sudo arp -an
? (192.168.40.200) at e0:18:77:03:d5:88 [ether] on eth0 ? (192.168.40.1) at 6c:62:6d:7a:c2:cc [ether] on eth0 ? (192.168.40.201) at 00:0e:08:d7:41:7b [ether] on eth0 |
$sudo apt-get install asterisk
Reading package lists... Done Building dependency tree Reading state information... Done asterisk is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
$dpkg -L asterisk | less
|
$dpkg -L asterisk | tail
/usr/sbin/astgenkey /usr/sbin/smsq /usr/sbin/aelparse /usr/sbin/autosupport /usr/sbin/astdb2sqlite3 /usr/sbin/astdb2bdb /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/share/man/man8/rasterisk.8.gz /usr/sbin/rasterisk |
$dpkg -L asterisk | tail -20
/usr/share/doc/asterisk/BUGS /usr/share/doc/asterisk/copyright /usr/share/doc/asterisk/changelog.Debian.amd64.gz /usr/share/lintian /usr/share/lintian/overrides /usr/share/lintian/overrides/asterisk /usr/sbin /usr/sbin/asterisk /usr/sbin/safe_asterisk /usr/sbin/astcanary /usr/sbin/astgenkey /usr/sbin/smsq /usr/sbin/aelparse /usr/sbin/autosupport /usr/sbin/astdb2sqlite3 /usr/sbin/astdb2bdb /usr/share/asterisk/sounds/recordings /usr/share/asterisk/sounds/custom /usr/share/man/man8/rasterisk.8.gz /usr/sbin/rasterisk |
$cd /usr/lib/asterisk/modules/
|
$ls
app_adsiprog.so format_g729.so app_alarmreceiver.so format_gsm.so app_amd.so format_h263.so app_authenticate.so format_h264.so app_cdr.so format_ilbc.so app_celgenuserevent.so format_jpeg.so app_chanisavail.so format_ogg_vorbis.so app_channelredirect.so format_pcm.so app_chanspy.so format_siren14.so app_confbridge.so format_siren7.so ... codec_g722.so res_rtp_multicast.so codec_g726.so res_security_log.so codec_gsm.so res_smdi.so codec_lpc10.so res_snmp.so codec_resample.so res_speech.so codec_speex.so res_srtp.so codec_ulaw.so res_stun_monitor.so format_g719.so res_timing_pthread.so format_g723.so res_timing_timerfd.so format_g726.so res_xmpp.so |
$sudo apt-get install dahdi
[sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dahdi-linux fxload The following NEW packages will be installed: dahdi dahdi-linux fxload 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 433 kB of archives. ... Preparing to unpack .../dahdi-linux_1%3a2.10.0.1~dfsg-1_all.deb ... Unpacking dahdi-linux (1:2.10.0.1~dfsg-1) ... Selecting previously unselected package dahdi. Preparing to unpack .../dahdi_1%3a2.10.0.1-1_amd64.deb ... Unpacking dahdi (1:2.10.0.1-1) ... Processing triggers for man-db (2.7.0.2-5) ... Processing triggers for systemd (215-17+deb8u3) ... Setting up fxload (0.0.20081013-1) ... Setting up dahdi-linux (1:2.10.0.1~dfsg-1) ... Setting up dahdi (1:2.10.0.1-1) ... |
$ls chan_*
chan_agent.so chan_iax2.so chan_multicast_rtp.so chan_sip.so chan_alsa.so chan_local.so chan_oss.so chan_skinny.so chan_bridge.so chan_motif.so chan_phone.so chan_unistim.so |
$sudo apt-get install asterisk-dahdi
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libopenr2-3 libpri1.4 libss7-1 libtonezone2.0 The following NEW packages will be installed: asterisk-dahdi libopenr2-3 libpri1.4 libss7-1 libtonezone2.0 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 1,017 kB of archives. After this operation, 2,311 kB of additional disk space will be used. ... Unpacking libtonezone2.0:amd64 (1:2.10.0.1-1) ... Selecting previously unselected package asterisk-dahdi. Preparing to unpack .../asterisk-dahdi_1%3a11.13.1~dfsg-2+b1_amd64.deb ... Unpacking asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Setting up libopenr2-3 (1.3.3-1) ... Setting up libpri1.4 (1.4.15-1) ... Setting up libss7-1 (1.0.2-5) ... Setting up libtonezone2.0:amd64 (1:2.10.0.1-1) ... Setting up asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... |
$sudo apt-get install purge dahdi
Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package purge |
$sudo apt-get purge dahdi
Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: asterisk-dahdi* dahdi* libopenr2-3* 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. After this operation, 2,682 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 84900 files and directories currently installed.) Removing asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Removing libopenr2-3 (1.3.3-1) ... Purging configuration files for libopenr2-3 (1.3.3-1) ... Removing dahdi (1:2.10.0.1-1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... Processing triggers for man-db (2.7.0.2-5) ... |
$ls -l chan_*
-rw-r--r-- 1 root root 69904 Jan 6 2015 chan_agent.so -rw-r--r-- 1 root root 36808 Jan 6 2015 chan_alsa.so -rw-r--r-- 1 root root 14600 Jan 6 2015 chan_bridge.so -rw-r--r-- 1 root root 348296 Jan 6 2015 chan_iax2.so -rw-r--r-- 1 root root 39496 Jan 6 2015 chan_local.so -rw-r--r-- 1 root root 64336 Jan 6 2015 chan_motif.so -rw-r--r-- 1 root root 10512 Jan 6 2015 chan_multicast_rtp.so -rw-r--r-- 1 root root 39488 Jan 6 2015 chan_oss.so -rw-r--r-- 1 root root 42248 Jan 6 2015 chan_phone.so -rw-r--r-- 1 root root 751272 Jan 6 2015 chan_sip.so -rw-r--r-- 1 root root 181392 Jan 6 2015 chan_skinny.so -rw-r--r-- 1 root root 134992 Jan 6 2015 chan_unistim.so |
$pwd
/usr/lib/asterisk/modules |
$ls -l
total 9200 -rw-r--r-- 1 root root 43064 Jan 6 2015 app_adsiprog.so -rw-r--r-- 1 root root 22776 Jan 6 2015 app_alarmreceiver.so -rw-r--r-- 1 root root 18408 Jan 6 2015 app_amd.so -rw-r--r-- 1 root root 14320 Jan 6 2015 app_authenticate.so -rw-r--r-- 1 root root 10216 Jan 6 2015 app_cdr.so -rw-r--r-- 1 root root 10232 Jan 6 2015 app_celgenuserevent.so -rw-r--r-- 1 root root 10224 Jan 6 2015 app_chanisavail.so -rw-r--r-- 1 root root 10232 Jan 6 2015 app_channelredirect.so -rw-r--r-- 1 root root 30752 Jan 6 2015 app_chanspy.so ... -rw-r--r-- 1 root root 14640 Jan 6 2015 res_rtp_multicast.so -rw-r--r-- 1 root root 10256 Jan 6 2015 res_security_log.so -rw-r--r-- 1 root root 51712 Jan 6 2015 res_smdi.so -rw-r--r-- 1 root root 34464 Jan 6 2015 res_snmp.so -rw-r--r-- 1 root root 14448 Jan 6 2015 res_speech.so -rw-r--r-- 1 root root 18552 Jan 6 2015 res_srtp.so -rw-r--r-- 1 root root 18624 Jan 6 2015 res_stun_monitor.so -rw-r--r-- 1 root root 14416 Jan 6 2015 res_timing_pthread.so -rw-r--r-- 1 root root 14416 Jan 6 2015 res_timing_timerfd.so -rw-r--r-- 1 root root 102752 Jan 6 2015 res_xmpp.so |
$sudo apt-get install asterisk-dahdi
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dahdi libopenr2-3 The following NEW packages will be installed: asterisk-dahdi dahdi libopenr2-3 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/1,090 kB of archives. After this operation, 2,682 kB of additional disk space will be used. ... Unpacking libopenr2-3 (1.3.3-1) ... Selecting previously unselected package asterisk-dahdi. Preparing to unpack .../asterisk-dahdi_1%3a11.13.1~dfsg-2+b1_amd64.deb ... Unpacking asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Processing triggers for man-db (2.7.0.2-5) ... Processing triggers for systemd (215-17+deb8u3) ... Setting up dahdi (1:2.10.0.1-1) ... Setting up libopenr2-3 (1.3.3-1) ... Setting up asterisk-dahdi (1:11.13.1~dfsg-2+b1) ... Processing triggers for libc-bin (2.19-18+deb8u3) ... |
$sudo gedit /etc/asterisk/extensions.conf
[sudo] password for user: ** (gedit:5388): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found |
$sudo touch /etc/asterisk/sip.conf
|
$cd /etc/asterisk/
|
$ls
acl.conf config_test.conf ooh323.conf adsi.conf console.conf osp.conf agents.conf dbsep.conf oss.conf alarmreceiver.conf dnsmgr.conf phone.conf alsa.conf dsp.conf phoneprov.conf amd.conf dundi.conf queuerules.conf app_mysql.conf enum.conf queues.conf app_skel.conf extconfig.conf res_config_mysql.conf asterisk.adsi extensions.ael res_config_sqlite3.conf asterisk.conf extensions.conf res_config_sqlite.conf ... cel_pgsql.conf manager.conf sla.conf cel_sqlite3_custom.conf manager.d smdi.conf cel_tds.conf meetme.conf telcordia-1.adsi chan_dahdi.conf mgcp.conf udptl.conf chan_mobile.conf minivm.conf unistim.conf cli_aliases.conf misdn.conf users.conf cli.conf modules.conf voicemail.conf cli_permissions.conf motif.conf vpb.conf codecs.conf musiconhold.conf xmpp.conf confbridge.conf muted.conf |
$cat sip.conf
|
$clear
|
$sudo gedit sip.conf
** (gedit:5469): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:5469): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5469): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5469): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported (gedit:5469): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ... ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported (gedit:5469): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported ** (gedit:5469): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterisk4 (pid = 442) asterisk4*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description ... 1402/1402 192.168.40.202 D Auto (No) No 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] asterisk4*CLI> sip show peers Name/username Host Dyn Forcerport Comedia ACL Port Status Description 1401/1401 192.168.40.201 D Auto (No) No 5060 Unmonitored 1402/1402 192.168.40.202 D Auto (No) No 5060 Unmonitored 2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline] asterisk4*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo mv extensions.conf ~extensions.conf
[sudo] password for user: |
$sudo touch extensions.conf
|
$sudo gedit extensions.conf
** (gedit:5745): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:5745): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5745): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-language not supported (gedit:5745): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5745): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5745): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5745): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported (gedit:5745): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5745): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5745): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5745): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5745): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$cat extensions.conf
[default] exten => 4000,1,Playback(demo-thanks) |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterisk4 (pid = 442) asterisk4*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo gedit extensions.conf
** (gedit:5807): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:5807): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5807): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5807): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5807): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5807): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported ** (gedit:5807): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterisk4 (pid = 442) asterisk4*CLI> dialplan reload Dialplan reloaded. asterisk4*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo gedit extensions.conf
** (gedit:5837): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:5837): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5837): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5837): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5837): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5837): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterisk4 (pid = 442) asterisk4*CLI> dialplan reload Dialplan reloaded. [Mar 29 15:08:22] WARNING[5854]: config.c:1497 process_text_line: Unknown directive '#exten' at line 4 of /etc/asterisk/extensions.conf asterisk4*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo gedit extensions.conf
** (gedit:5863): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:5863): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5863): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5863): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5863): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5863): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$sudo asterisk -r
Asterisk 11.13.1~dfsg-2+b1, Copyright (C) 1999 - 2013 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. ========================================================================= Connected to Asterisk 11.13.1~dfsg-2+b1 currently running on asterisk4 (pid = 442) asterisk4*CLI> dialplan reload Dialplan reloaded. [Mar 29 15:10:44] NOTICE[477][C-00000006]: chan_sip.c:25628 handle_request_invite: Call from '1402' (192.168.40.202:5060) to extension '1402' rejected because extension not found in context 'default'. [Mar 29 15:10:48] NOTICE[477][C-00000007]: chan_sip.c:25628 handle_request_invite: Call from '1402' (192.168.40.202:5060) to extension '1402' rejected because extension not found in context 'default'. [Mar 29 15:11:20] NOTICE[477][C-00000008]: chan_sip.c:25628 handle_request_invite: Call from '1402' (192.168.40.202:5060) to extension '1402' rejected because extension not found in context 'default'. asterisk4*CLI> exi No such command 'exi' (type 'core show help exi' for other possible commands) asterisk4*CLI> exit Asterisk cleanly ending (0). Executing last minute cleanups |
$sudo mkdir -p /var/tmp/asterisk
|
$sudo chown asterisk:asterisk /var/tmp/asterisk
|
$sudo gedit extensions.conf
** (gedit:5916): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:5916): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5916): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:5916): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:5916): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:5916): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported |
$cd /var/tmp/asterisk/
|
$ls
message01.wav |
$cat message01.wav
cat: message01.wav: Permission denied |
$ls -la
total 76 drwxr-xr-x 2 asterisk asterisk 4096 Mar 29 15:16 . drwxrwxrwt 4 root root 4096 Mar 29 15:12 .. -rw-rw---- 1 asterisk asterisk 65580 Mar 29 15:16 message01.wav |
$sudo gedit extensions.conf
** (gedit:5976): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found ** (gedit:5976): WARNING **: Error when getting information for file '/var/tmp/asterisk/extensions.conf': No such file or directory |
$cd /etc/asterisk/
|
$ls
acl.conf config_test.conf muted.conf adsi.conf console.conf ooh323.conf agents.conf dbsep.conf osp.conf alarmreceiver.conf dnsmgr.conf oss.conf alsa.conf dsp.conf phone.conf amd.conf dundi.conf phoneprov.conf app_mysql.conf enum.conf queuerules.conf app_skel.conf extconfig.conf queues.conf asterisk.adsi extensions.ael res_config_mysql.conf asterisk.conf ~extensions.conf res_config_sqlite3.conf ... cel_pgsql.conf logger.conf skinny.conf cel_sqlite3_custom.conf manager.conf sla.conf cel_tds.conf manager.d smdi.conf chan_dahdi.conf meetme.conf telcordia-1.adsi chan_mobile.conf mgcp.conf udptl.conf cli_aliases.conf minivm.conf unistim.conf cli.conf misdn.conf users.conf cli_permissions.conf modules.conf voicemail.conf codecs.conf motif.conf vpb.conf confbridge.conf musiconhold.conf xmpp.conf |
$sudo gedit extensions.conf
** (gedit:6011): WARNING **: Could not load Gedit repository: Typelib file for namespace 'GtkSource', version '3.0' not found (gedit:6011): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:6011): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:6011): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:6011): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:6011): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported (gedit:6011): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:6011): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files (gedit:6011): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files ** (gedit:6011): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:6011): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported ** (gedit:6011): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported |
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.168.40.2 netmask 255.255.255.0 network 192.168.40.0 broadcast 192.168.40.255 gateway 192.168.40.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 8.8.8.8 dns-search unix.sl
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.3.1 server-duid "\000\001\000\001\036\214\377Dlbmz\304\237"; lease 192.168.40.200 { starts 2 2016/03/29 08:56:29; ends 2 2016/03/29 09:06:29; cltt 2 2016/03/29 08:56:29; binding state active; next binding state free; rewind binding state free; hardware ethernet e0:18:77:03:d5:88; client-hostname "FLB-S752"; } lease 192.168.40.201 { starts 2 2016/03/29 09:01:07; ends 2 2016/03/29 09:11:07; cltt 2 2016/03/29 09:01:07; binding state active; next binding state free; rewind binding state free; hardware ethernet 00:0e:08:d7:41:7b; uid "\001\000\016\010\327A{"; client-hostname "SipuraSPA"; } lease 192.168.40.200 { starts 2 2016/03/29 09:01:11; ends 2 2016/03/29 09:11:11; cltt 2 2016/03/29 09:01:11; binding state active; next binding state free; rewind binding state free; hardware ethernet e0:18:77:03:d5:88; client-hostname "FLB-S752"; }
[default] exten => 4000,1,Playback(demo-thanks)
#!/bin/sh # (c) Igor Chubin, igor@chub.in, 2004-2006 # Environment variables set by the script: # # L3_SESSION_ID - uniq id of the LiLaLo-session # L3_PARENT_TTY - name of tty on which script is running # PS1 - intercative shell prompt in which LiLaLo hides # various information about the command # L3_TAMPERED_EDITORS - list of editors which are tampered with functions # Functions with the names starting _l3_ are internal. # Such functions are unset before this rc script exits _l3_editors_to_tamper='/bin/vi /usr/bin/vi /usr/bin/vim /bin/ee /usr/bin/ee /usr/bin/pico /usr/bin/nano /usr/local/bin/vim' _l3_start() { echo $- | grep -q i || return 0 if _l3_is_running_here then _l3_env _l3_init_prompt l3_fix_prompt _l3_tamper_editors _l3_tamper_commands _l3_unset_internal else _l3_start_session _l3_run_script fi } # ===================== STAGE 1 ============================ _l3_is_running_here() { ps waux | awk '{print $2" "$11 }' | grep -q ^$PPID" "script return $? # Check if ^^^^ run on Linux # and del vvvv this if it does export L3_TTY=`/usr/bin/tty` uname -a | egrep -qi '(bsd|darwin)' && bsd=yes proc_on_the_term=`w | grep "${L3_TTY##/dev/}" | awk '{print $8;}'` # freeBSD: [ -n "$bsd" ] && \ proc_on_the_term=`w | grep "${L3_TTY##/dev/tty}" | awk '{print $6;}'` [ -n "$proc_on_the_term" ] && echo $proc_on_the_term | grep -q script } _l3_start_session() { export L3_SESSION_ID=${RANDOM}${RANDOM}${RANDOM}${RANDOM}-`date +%s` export L3_HOME=~/.lilalo/ mkdir -p $L3_HOME tty=`/usr/bin/tty` uname -a | egrep -qi '(bsd|darwin)' && bsd=yes parent=`cat /proc/$PPID/cmdline 2> /dev/null` [ -z "$parent" ] && parent="`ps waux | awk '{if ($2 == '$PPID') print $11; }'`" system=`uname -rs` login_from=`who | grep "${tty##/dev/}" | awk '{print $6;}' | tr -d '()'` #[ -n "$bsd" ] && login_from="" #FIXME! start_time=`date +%s` hostname=`hostname -f 2> /dev/null` [ -n "$bsd" ] && hostname=`hostname` cat <<INFO > $L3_HOME/$L3_SESSION_ID.info <session> <local_session_id>$L3_SESSION_ID</local_session_id> <hostname>$hostname</hostname> <user>$USER</user> <uid>$UID</uid> <login_from>$login_from</login_from> <tty>$tty</tty> <system>$system</system> <parent>$parent</parent> <ppid>$PPID</ppid> <pid>$$</pid> <start_time>$start_time</start_time> <lang>$LANG</lang> </session> INFO unset parent system login_from start_time hostname tty } _l3_run_script() { uname -a | egrep -qi '(bsd|darwin)' && bsd=yes flush="-f" #linux [ -n "$bsd" ] && flush="-t 0" #freebsd export L3_PARENT_TTY=`/usr/bin/tty` if [ -n "$bsd" ] then exec script $flush -q $L3_HOME/${L3_SESSION_ID}.script ${0#-} else exec script $flush -c ${0#-} -q $L3_HOME/${L3_SESSION_ID}.script fi } # ===================== STAGE 2 ============================ _l3_env() { trap l3_close_session 2 trap l3_close_session EXIT true } l3_close_session() { ( echo '<history>' history | sed 's/&/\&/; s/</\</g; s/>/\>/g' echo '</history>' ) >> $L3_HOME/$L3_SESSION_ID.info } _l3_init_prompt() { PS1='[\u@\h:\W]\$ ' [ $UID = 0 ] \ && PS1='\[\033[0;31m\]'$PS1'\[\033[0m\]' \ || PS1='\[\033[0;32m\]'$PS1'\[\033[0m\]' \ export PS1 } l3_fix_prompt() {
# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything case $- in *i*) ;; *) return;; esac # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # If set, the pattern "**" used in a pathname expansion context will # match all files and zero or more directories and subdirectories. #shopt -s globstar # make less more friendly for non-text input files, see lesspipe(1) #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # set variable identifying the chroot you work in (used in the prompt below) if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then debian_chroot=$(cat /etc/debian_chroot) fi # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in xterm-color) color_prompt=yes;; esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes if [ -n "$force_color_prompt" ]; then if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # We have color support; assume it's compliant with Ecma-48 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such # a case would tend to support setf rather than setaf.) color_prompt=yes else color_prompt= fi fi if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' fi unset color_prompt force_color_prompt # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" ;; *) ;; esac # enable color support of ls and also add handy aliases if [ -x /usr/bin/dircolors ]; then test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" alias ls='ls --color=auto' #alias dir='dir --color=auto' #alias vdir='vdir --color=auto' #alias grep='grep --color=auto' #alias fgrep='fgrep --color=auto' #alias egrep='egrep --color=auto' fi # colored GCC warnings and errors #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # some more ls aliases #alias ll='ls -l' #alias la='ls -A' #alias l='ls -CF' # Alias definitions. # You may want to put all your additions into a separate file like # ~/.bash_aliases, instead of adding them here directly. # See /usr/share/doc/bash-doc/examples in the bash-doc package. if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi . /home/user/.lilalo/l3bashrc && _l3_start
Время первой команды журнала | 15:54:27 2016- 3-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:17:09 2016- 3-29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 9.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 3.27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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