/l3/users/sergey-tymku-public/nt-voip-2014-apr/debian5/root :1 :2 :3 :4 :5 :6 |
|
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/
total 12 drwxr-x--- 2 asterisk asterisk 4096 Apr 24 10:20 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav |
#ls -al /var/spool/asterisk/monitor/berlin/
total 188 drwxrwx--- 2 asterisk asterisk 4096 Apr 24 10:50 . drwxr-x--- 4 asterisk asterisk 4096 Apr 24 10:50 .. -rw-rw---- 1 asterisk asterisk 19884 Apr 24 10:50 1101-2201-1398325826.wav -rw-rw---- 1 asterisk asterisk 162444 Apr 24 10:50 1201-2201-1398325836.wav |
#ls -al /var/spool/asterisk/monitor/
total 132 drwxr-x--- 4 asterisk asterisk 4096 Apr 24 10:50 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. drwxrwx--- 2 asterisk asterisk 4096 Apr 24 10:52 berlin drwxrwx--- 2 asterisk asterisk 4096 Apr 24 10:41 graz -rw-rw---- 1 asterisk asterisk 44 Apr 24 10:20 monitor.wav -rw-rw---- 1 asterisk asterisk 113484 Apr 24 10:39 s-2201-1398325185.wav |
#кÑrm /var/spool/asterisk/
dictate/ meetme/ monitor/ outgoing/ system/ tmp/ voicemail/ |
#rm /var/spool/asterisk/m
meetme/ monitor/ |
#rm /var/spool/asterisk/monitor/s-2201-1398325185.wav
|
#ifconfig /all
/all: error fetching interface information: Device not found |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:19:88 inet addr:192.168.12.5 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:1988/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:24504 errors:0 dropped:0 overruns:0 frame:0 TX packets:21275 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4662201 (4.4 MiB) TX bytes:4575654 (4.3 MiB) Interrupt:20 Memory:fe400000-fe420000 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:16436 Metric:1 RX packets:96 errors:0 dropped:0 overruns:0 frame:0 TX packets:96 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5760 (5.6 KiB) TX bytes:5760 (5.6 KiB) |
#ifconfig -a
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:19:88 inet addr:192.168.12.5 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:1988/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:24516 errors:0 dropped:0 overruns:0 frame:0 TX packets:21287 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4663283 (4.4 MiB) TX bytes:4580004 (4.3 MiB) Interrupt:20 Memory:fe400000-fe420000 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:16436 Metric:1 RX packets:96 errors:0 dropped:0 overruns:0 frame:0 TX packets:96 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:5760 (5.6 KiB) TX bytes:5760 (5.6 KiB) |
#apt-get install samba
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: samba-common samba-common-bin tdb-tools Suggested packages: openbsd-inetd inet-superserver smbldap-tools ldb-tools ctdb The following NEW packages will be installed: samba samba-common samba-common-bin tdb-tools 0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded. ... Adding group `sambashare' (GID 120) ... 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.6.6-6+deb7u2) ... 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 Setting up tdb-tools (1.2.10-2) ... update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode |
#vi /etc/samba/smb.conf
|
#smbpasswd -a smbuser
New SMB password: Retype new SMB password: Failed to add entry for user smbuser. |
#smbpasswd -a smbuser
New SMB password: Retype new SMB password: Failed to add entry for user smbuser. |
#/etc/init
init/ init.d/ initramfs-tools/ |
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd. Starting Samba daemons: nmbd smbd. |
#smbclient -U user
l3script: smbclient: command not found |
#smb
smbcontrol smbd smbpasswd smbstatus smbstatus.samba3 |
#smbstatus
smbstatus smbstatus.samba3 |
#smbstatus
Samba version 3.6.6 PID Username Group Machine ------------------------------------------------------------------- Service pid machine Connected at ------------------------------------------------------- No locked files |
#apt-cache search samba
libapache2-mod-auth-ntlm-winbind - apache2 module for NTLM authentication against Winbind auth2db-filters - Auth2db defaults filters pack cadaver - command-line WebDAV client ctdb - clustered database to store temporary data ctdb-dbg - clustered database to store temporary data -- debugging symbols and test suite libctdb-dev - clustered database to store temporary data -- development files dpsyco-samba - Automate administration of access to samba fusesmb - filesystem client based on the SMB file transfer protocol gadmin-samba - GTK+ configuration tool for samba gadmin-samba-dbg - GTK+ configuration tool for samba (debug) ... smb4k - Samba (SMB) share advanced browser for KDE smbc - samba-commander - curses based samba network browser smbldap-tools - Scripts to manage Unix and Samba accounts stored on LDAP snort - flexible Network Intrusion Detection System snort-common - flexible Network Intrusion Detection System [common files] snort-common-libraries - flexible Network Intrusion Detection System ruleset snort-doc - Documentation for the Snort IDS [documentation] snort-mysql - flexible Network Intrusion Detection System [MySQL] snort-pgsql - flexible Network Intrusion Detection System [PostgreSQL] yasat - simple stupid audit tool |
#smbpasswd
New SMB password: Interrupted by signal. |
#smbpasswd -?
smbpasswd: invalid option -- '?' When run by root: smbpasswd [options] [username] otherwise: smbpasswd [options] options: -L local mode (must be first option) -h print this usage message -s use stdin for password prompt -c smb.conf file Use the given path to the smb.conf file ... -a add user -d disable user -e enable user -i interdomain trust account -m machine trust account -n set no password -W use stdin ldap admin password -w PASSWORD ldap admin password -x delete user -R ORDER name resolve order |
#smbpasswd -a user
New SMB password: Retype new SMB password: Added user user. |
#smb
smbcontrol smbd smbpasswd smbstatus smbstatus.samba3 |
#smbstatus
Samba version 3.6.6 PID Username Group Machine ------------------------------------------------------------------- Service pid machine Connected at ------------------------------------------------------- No locked files |
#apt-cache search samba
libapache2-mod-auth-ntlm-winbind - apache2 module for NTLM authentication against Winbind auth2db-filters - Auth2db defaults filters pack cadaver - command-line WebDAV client ctdb - clustered database to store temporary data ctdb-dbg - clustered database to store temporary data -- debugging symbols and test suite libctdb-dev - clustered database to store temporary data -- development files dpsyco-samba - Automate administration of access to samba fusesmb - filesystem client based on the SMB file transfer protocol gadmin-samba - GTK+ configuration tool for samba gadmin-samba-dbg - GTK+ configuration tool for samba (debug) ... smb4k - Samba (SMB) share advanced browser for KDE smbc - samba-commander - curses based samba network browser smbldap-tools - Scripts to manage Unix and Samba accounts stored on LDAP snort - flexible Network Intrusion Detection System snort-common - flexible Network Intrusion Detection System [common files] snort-common-libraries - flexible Network Intrusion Detection System ruleset snort-doc - Documentation for the Snort IDS [documentation] snort-mysql - flexible Network Intrusion Detection System [MySQL] snort-pgsql - flexible Network Intrusion Detection System [PostgreSQL] yasat - simple stupid audit tool |
#apt-cache search samba | less
|
#apt-get install smbclient
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: cifs-utils The following NEW packages will be installed: smbclient 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 5,891 kB of archives. After this operation, 42.9 MB of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ wheezy/main smbclient amd64 2:3.6.6-6+deb7u2 [5,891 kB] Fetched 5,891 kB in 11s (499 kB/s) Selecting previously unselected package smbclient. (Reading database ... 135250 files and directories currently installed.) Unpacking smbclient (from .../smbclient_2%3a3.6.6-6+deb7u2_amd64.deb) ... Processing triggers for man-db ... Setting up smbclient (2:3.6.6-6+deb7u2) ... |
#smbclient -L
Usage: smbclient [-?EgBVNkPeC] [-?|--help] [--usage] [-R|--name-resolve=NAME-RESOLVE-ORDER] [-M|--message=HOST] [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST] [-m|--max-protocol=LEVEL] [-T|--tar=<c|x>IXFqgbNan] [-D|--directory=DIR] [-c|--command=STRING] [-b|--send-buffer=BYTES] [-p|--port=PORT] [-g|--grepable] [-B|--browse] [-d|--debuglevel=DEBUGLEVEL] [-s|--configfile=CONFIGFILE] [-l|--log-basename=LOGFILEBASE] [-V|--version] [--option=name=value] [-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME] [-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] [-U|--user=USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file=FILE] [-S|--signing=on|off|required] [-P|--machine-pass] [-e|--encrypt] [-C|--use-ccache] service <password> |
#smbclient
Usage: smbclient [-?EgBVNkPeC] [-?|--help] [--usage] [-R|--name-resolve=NAME-RESOLVE-ORDER] [-M|--message=HOST] [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST] [-m|--max-protocol=LEVEL] [-T|--tar=<c|x>IXFqgbNan] [-D|--directory=DIR] [-c|--command=STRING] [-b|--send-buffer=BYTES] [-p|--port=PORT] [-g|--grepable] [-B|--browse] [-d|--debuglevel=DEBUGLEVEL] [-s|--configfile=CONFIGFILE] [-l|--log-basename=LOGFILEBASE] [-V|--version] [--option=name=value] [-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME] [-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] [-U|--user=USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file=FILE] [-S|--signing=on|off|required] [-P|--machine-pass] [-e|--encrypt] [-C|--use-ccache] service <password> |
#smbclient -L
Usage: smbclient [-?EgBVNkPeC] [-?|--help] [--usage] [-R|--name-resolve=NAME-RESOLVE-ORDER] [-M|--message=HOST] [-I|--ip-address=IP] [-E|--stderr] [-L|--list=HOST] [-m|--max-protocol=LEVEL] [-T|--tar=<c|x>IXFqgbNan] [-D|--directory=DIR] [-c|--command=STRING] [-b|--send-buffer=BYTES] [-p|--port=PORT] [-g|--grepable] [-B|--browse] [-d|--debuglevel=DEBUGLEVEL] [-s|--configfile=CONFIGFILE] [-l|--log-basename=LOGFILEBASE] [-V|--version] [--option=name=value] [-O|--socket-options=SOCKETOPTIONS] [-n|--netbiosname=NETBIOSNAME] [-W|--workgroup=WORKGROUP] [-i|--scope=SCOPE] [-U|--user=USERNAME] [-N|--no-pass] [-k|--kerberos] [-A|--authentication-file=FILE] [-S|--signing=on|off|required] [-P|--machine-pass] [-e|--encrypt] [-C|--use-ccache] service <password> |
#smbclient -L 127.0.0.1
Enter root's password: Interrupted by signal. |
#smbclient -L 127.0.0.1 -U user
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers monitor Disk Asterisk Monitor IPC$ IPC IPC Service (debian5 server) user Disk Home Directories Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] Server Comment --------- ------- DEBIAN5 debian5 server TEACH teach server Workgroup Master --------- ------- WORKGROUP TEACH |
#vi /etc/g
|
#vi /etc/group
--- /tmp/l3-saved-5900.96.20603 2014-04-24 12:09:42.709397872 +0300 +++ /etc/group 2014-04-24 12:09:56.361397964 +0300 @@ -56,5 +56,5 @@ saned:x:117: Debian-gdm:x:118: user:x:1000: -asterisk:x:119: +asterisk:x:119:user sambashare:x:120: |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:19:88 inet addr:192.168.12.5 Bcast:192.168.12.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:1988/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:51730 errors:0 dropped:0 overruns:0 frame:0 TX packets:39379 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22193840 (21.1 MiB) TX bytes:9063848 (8.6 MiB) Interrupt:20 Memory:fe400000-fe420000 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:16436 Metric:1 RX packets:222 errors:0 dropped:0 overruns:0 frame:0 TX packets:222 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:17659 (17.2 KiB) TX bytes:17659 (17.2 KiB) |
#mc
|
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd. Starting Samba daemons: nmbd smbd. |
#mc
|
#smbclient -L 192.168.12.5 -U user -P user
ERROR: Unable to fetch machine password for DEBIAN5$@ in domain WORKGROUP |
#smbclient -L 192.168.12.5 -U user -Puser
ERROR: Unable to fetch machine password for DEBIAN5$@ in domain WORKGROUP |
#smbclient -L 192.168.12.5 -U user
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers monitor Disk Asterisk Monitor IPC$ IPC IPC Service (debian5 server) user Disk Home Directories Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] Server Comment --------- ------- DEBIAN5 debian5 server TEACH teach server Workgroup Master --------- ------- WORKGROUP TEACH |
#smbclient -U user //192.168.12.5/monitor
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] tree connect failed: NT_STATUS_BAD_NETWORK_NAME |
#smbclient -U user //127.0.0.1/monitor
Enter user's password: session setup failed: NT_STATUS_LOGON_FAILURE |
#smbclient -U user //127.0.0.1/monitor
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] tree connect failed: NT_STATUS_BAD_NETWORK_NAME |
#smbpasswd -h
When run by root: smbpasswd [options] [username] otherwise: smbpasswd [options] options: -L local mode (must be first option) -h print this usage message -s use stdin for password prompt -c smb.conf file Use the given path to the smb.conf file -D LEVEL debug level ... -a add user -d disable user -e enable user -i interdomain trust account -m machine trust account -n set no password -W use stdin ldap admin password -w PASSWORD ldap admin password -x delete user -R ORDER name resolve order |
#smb
smbcacls smbcquotas smbpasswd smbstatus.samba3 smbclient smbd smbspool smbtar smbcontrol smbget smbstatus smbtree |
#smbpasswd -a user
New SMB password: Retype new SMB password: |
#smbclient -U user //127.0.0.1/
Enter user's password: |
#smbclient -U user -L //127.0.0.1/
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] Sharename Type Comment --------- ---- ------- print$ Disk Printer Drivers monitor Disk Asterisk Monitor IPC$ IPC IPC Service (debian5 server) user Disk Home Directories Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] Server Comment --------- ------- DEBIAN5 debian5 server Workgroup Master --------- ------- WORKGROUP |
#smbclient -U user //127.0.0.1/monitor
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.6] tree connect failed: NT_STATUS_BAD_NETWORK_NAME |
#vi /etc/samba/smb.conf
--- /tmp/l3-saved-5900.23285.11771 2014-04-24 12:24:07.993404246 +0300 +++ /etc/samba/smb.conf 2014-04-24 12:24:35.873404454 +0300 @@ -322,7 +322,7 @@ comment = Asterisk Monitor read only = yes locking = no - path = /var/sppol/asterisk/monitor/ + path = /var/spool/asterisk/monitor/ guest ok = no # The next two parameters show how to auto-mount a CD-ROM when the |
#m
l3script: m: command not found |
#mc
|
#grep account /etc/samba/smb.conf
# "security = user" is always a good idea. This will require a Unix account # RPC pipe. The example command creates a user account with a disabled Unix # This allows machine accounts to be created on the domain controller via the ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u |
#grep user /etc/samba/smb.conf
# "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # security = user map to guest = bad user # Is this machine able to authenticate users. Both PDC and BDC # It specifies the location of the user's profile directory # Another common choice is storing the profile in the user's home directory # It specifies the location of a user's home directory (from the client # This allows Unix users to be created on the domain controller via the SAMR # RPC pipe. The example command creates a user account with a disabled Unix ... usershare allow guests = yes # By default, \\server\username shares can be connected to by anyone # The following parameter makes sure that only "username" can connect # to \\server\username valid users = %S # users profiles (see the "logon path" option above) # The path below should be writable by all users so that their # admin users are members of. # to the drivers directory for these users to have write rights in it # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0 |
#grep user /etc/samba/smb.conf |less
|
#/etc/init.d/samba restart
Stopping Samba daemons: nmbd smbd. Starting Samba daemons: nmbd smbd. |
#cd /var/lo
local/ lock/ log/ |
#cd /var/log/
alternatives.log dmesg.1.gz lastlog syslog apt/ dmesg.2.gz lpr.log syslog.1 aptitude dmesg.3.gz mail.err syslog.2.gz asterisk/ dpkg.log mail.info unattended-upgrades/ auth.log exim4/ mail.log user.log btmp faillog mail.warn wtmp ConsoleKit/ fontconfig.log messages Xorg.0.log daemon.log fsck/ news/ Xorg.0.log.old debug gdm3/ pm-powersave.log dmesg installer/ samba/ dmesg.0 kern.log speech-dispatcher/ |
#cd /var/log/samba/
|
#ls -al
total 40 drwxr-x--- 3 root adm 4096 Apr 24 12:32 . drwxr-xr-x 13 root root 4096 Apr 24 11:58 .. drwx------ 4 root root 4096 Apr 24 11:58 cores -rw-r--r-- 1 root root 0 Apr 24 12:09 log.127.0.0.1 -rw-r--r-- 1 root root 0 Apr 24 12:17 log.192.168.12.101 -rw-r--r-- 1 root root 0 Apr 24 12:32 log.192.168.12.104 -rw-r--r-- 1 root root 0 Apr 24 12:10 log.192.168.12.105 -rw-r--r-- 1 root root 0 Apr 24 12:16 log.192.168.12.254 -rw-r--r-- 1 root root 0 Apr 24 12:16 log.192.168.12.5 -rw-r--r-- 1 root root 6108 Apr 24 12:17 log.adk-73-11 -rw-r--r-- 1 root root 656 Apr 24 12:23 log.debian5 -rw-r--r-- 1 root root 0 Apr 24 12:32 log.lorapc -rw-r--r-- 1 root root 2839 Apr 24 13:10 log.nmbd -rw-r--r-- 1 root root 0 Apr 24 12:17 log.olesia-c49b8990 -rw-r--r-- 1 root root 8258 Apr 24 13:10 log.smbd -rw-r--r-- 1 root root 0 Apr 24 12:16 log.teach |
#mc
|
#vi /etc/asterisk/voicemail.conf
--- /tmp/l3-saved-5900.17418.8411 2014-04-24 13:18:50.857428450 +0300 +++ /etc/asterisk/voicemail.conf 2014-04-24 13:22:49.261430204 +0300 @@ -381,7 +381,10 @@ [default] -1234 => 4242,Example Mailbox,root@localhost +;1234 => 4242,Example Mailbox,root@localhost +2201 => 1234,Sergey Tymku,user@localhost +2202 => 1234,Sergey Tymku,user@localhost + ;4200 => 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10 ;4300 => 3456,Ben Rigas,ben@american-computer.net ;4310 => -5432,Sales,sales@marko.net |
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-5900.3554.8291 2014-04-24 13:23:07.837430340 +0300 +++ /etc/asterisk/extensions.conf 2014-04-24 13:33:09.025434776 +0300 @@ -10,7 +10,10 @@ exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) -exten => s-NOANSWER,1,Dial(SIP/2202) +;exten => s-NOANSWER,1,Dial(SIP/2202) +exten => s-NOANSWER,1,NoOp(No Answer) +exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) + exten => s-CONGESTION,1,Dial(SIP/2202) exten => s-CHANUNAVAIL,1,Playback(/var/tmp/asterisk/message) exten => s-ANSWER,1,Hangup @@ -55,6 +58,9 @@ exten => _70XX,n,Playback(/var/tmp/asterisk/message-${EXTEN:2}) exten => _70XX,n,Hangup +exten => 8100,1,VoiceMailMain() + + #include "/etc/asterisk/extensions.conf.local" ;[local] |
#ls -l /var/spool/mail/user
-rw-rw---- 1 user mail 23312 Apr 24 13:29 /var/spool/mail/user |
#ls -l /var/spool/mail/user
-rw-rw---- 1 user mail 23312 Apr 24 13:29 /var/spool/mail/user |
#ls -l /var/spool/mail/
total 24 -rw-rw---- 1 user mail 23312 Apr 24 13:29 user |
#ls -l /var/spool/mail/
total 24 -rw-rw---- 1 user mail 23312 Apr 24 13:29 user |
#vi /etc/asterisk/sip.conf
--- /tmp/l3-saved-12526.14575.271 2014-04-24 14:02:17.741447667 +0300 +++ /etc/asterisk/sip.conf 2014-04-24 14:03:58.797448412 +0300 @@ -4,6 +4,8 @@ ;canreinvite=no directmedia=no +language=ru + register => vienna:1234@192.168.12.4/graz register => vienna:1234@192.168.12.3/berlin register => vienna:1234@192.168.12.9/vaduz |
#apt-cache search asterisk sounds
asterisk-core-sounds-en - asterisk PBX sound files - US English asterisk-core-sounds-en-g722 - asterisk PBX sound files - en-us/g722 asterisk-core-sounds-en-gsm - asterisk PBX sound files - en-us/gsm asterisk-core-sounds-en-wav - asterisk PBX sound files - en-us/wav asterisk-core-sounds-es - asterisk PBX sound files - Spanish asterisk-core-sounds-es-g722 - asterisk PBX sound files - es-mx/g722 asterisk-core-sounds-es-gsm - asterisk PBX sound files - es-mx/gsm asterisk-core-sounds-es-wav - asterisk PBX sound files - es-mx/wav asterisk-core-sounds-fr - asterisk PBX sound files - Canadian French asterisk-core-sounds-fr-g722 - asterisk PBX sound files - fr-ca/g722 asterisk-core-sounds-fr-gsm - asterisk PBX sound files - fr-ca/gsm asterisk-core-sounds-fr-wav - asterisk PBX sound files - fr-ca/wav asterisk-core-sounds-ru - asterisk PBX sound files - Russian asterisk-core-sounds-ru-g722 - asterisk PBX sound files - ru-ru/g722 asterisk-core-sounds-ru-gsm - asterisk PBX sound files - ru-ru/gsm asterisk-core-sounds-ru-wav - asterisk PBX sound files - ru-ru/wav asterisk-prompt-it-menardi - asterisk PBX Italian sound files |
#apt-get install asterisk-core-sounds-ru-gsm
Reading package lists... Done Building dependency tree Reading state information... Done asterisk-core-sounds-ru-gsm is already the newest version. asterisk-core-sounds-ru-gsm set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. |
#apt-get install asterisk-core-sounds-ru
Reading package lists... Done Building dependency tree Reading state information... Done asterisk-core-sounds-ru is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. |
#apt-get install asterisk-core-sounds-ru-wav
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: asterisk-core-sounds-ru-wav 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. Need to get 16.6 MB of archives. After this operation, 20.3 MB of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ wheezy/main asterisk-core-sounds-ru-wav all 1.4.22-1 [16.6 MB] Fetched 16.6 MB in 34s (484 kB/s) Selecting previously unselected package asterisk-core-sounds-ru-wav. (Reading database ... 136255 files and directories currently installed.) Unpacking asterisk-core-sounds-ru-wav (from .../asterisk-core-sounds-ru-wav_1.4.22-1_all.deb) ... Setting up asterisk-core-sounds-ru-wav (1.4.22-1) ... |
#ls-al
l3script: ls-al: command not found |
#ls -al
total 16264 drwx------ 10 root root 4096 Apr 24 14:13 . drwxr-xr-x 24 root root 4096 Apr 22 13:34 .. -rwxr--r-- 1 root root 143 Apr 22 15:07 all drwx------ 2 root root 4096 Apr 22 13:12 .aptitude -rw-r--r-- 1 root root 16543475 Apr 24 14:13 asterisk-core-sounds-ru-wav-current.tar.gz -rw------- 1 root root 1368 Apr 24 13:54 .asterisk_history -rw------- 1 root root 8340 Apr 24 13:54 .bash_history -rw-r--r-- 1 root root 10 Apr 22 13:55 .bash_profile -rw-r--r-- 1 root root 630 Apr 22 13:55 .bashrc ... drwx------ 2 root root 4096 Apr 22 13:31 .gconf -rw-r--r-- 1 root root 5286 Apr 22 13:54 install -rw-r--r-- 1 root root 62 Apr 22 13:55 .l3rc drwxr-xr-x 2 root root 12288 Apr 24 14:06 .lilalo drwx------ 3 root root 4096 Apr 22 14:03 .local -rw-r--r-- 1 root root 140 Nov 19 2007 .profile drwx------ 2 root root 4096 Apr 24 13:45 .pulse -rw------- 1 root root 256 Apr 24 13:45 .pulse-cookie drwx------ 2 root root 4096 Apr 22 14:09 .ssh -rw------- 1 root root 6111 Apr 24 14:06 .viminfo |
#mc
|
#tar -xf a
all asterisk-core-sounds-ru-wav-current.tar.gz |
#tar -xf asterisk-core-sounds-ru-wav-current.tar.gz -C /usr/share/as
aspell/ asterisk/ |
#tar -xf asterisk-core-sounds-ru-wav-current.tar.gz -C /usr/share/asterisk/sounds/ru/
|
#ls -al /usr/share/asterisk/sounds/ru/
total 18048 drwxr-xr-x 8 root root 24576 Apr 24 14:14 . drwxr-xr-x 5 root root 4096 Apr 24 13:59 .. -rw-r--r-- 1 root root 10197 Jan 23 2012 agent-alreadyon.gsm -rw-r--r-- 1 root root 98682 Oct 24 03:24 agent-alreadyon.wav -rw-r--r-- 1 root root 8547 Jan 23 2012 agent-incorrect.gsm -rw-r--r-- 1 root root 82800 Oct 24 03:24 agent-incorrect.wav -rw-r--r-- 1 root root 3927 Jan 23 2012 agent-loggedoff.gsm -rw-r--r-- 1 root root 38078 Oct 24 03:24 agent-loggedoff.wav -rw-r--r-- 1 root root 3300 Jan 23 2012 agent-loginok.gsm ... -rw-r--r-- 1 root root 2937 Jan 23 2012 vm-unknown-caller.gsm -rw-r--r-- 1 root root 28466 Oct 24 03:24 vm-unknown-caller.wav -rw-r--r-- 1 root root 2277 Jan 23 2012 vm-Urgent.gsm -rw-r--r-- 1 root root 22006 Oct 24 03:24 vm-Urgent.wav -rw-r--r-- 1 root root 5412 Jan 23 2012 vm-whichbox.gsm -rw-r--r-- 1 root root 52288 Oct 24 03:24 vm-whichbox.wav -rw-r--r-- 1 root root 1386 Jan 23 2012 vm-Work.gsm -rw-r--r-- 1 root root 13418 Oct 24 03:24 vm-Work.wav -rw-r--r-- 1 root root 1122 Jan 23 2012 vm-youhave.gsm -rw-r--r-- 1 root root 10910 Oct 24 03:24 vm-youhave.wav |
#ls -al /usr/share/asterisk/sounds/ru/ | less
|
#vi /etc/asterisk/extensions.conf
--- /tmp/l3-saved-9297.28186.4545 2014-04-25 09:46:12.239557559 +0300 +++ /etc/asterisk/extensions.conf 2014-04-25 09:50:39.611559530 +0300 @@ -29,7 +29,10 @@ ;${ARG2} exten => s,1,Answer -exten => s,n,Set(CALLFILENAME=${ARG1}/${ARG2}-${CALLERID(num)}-${EPOCH}) +;exten => s,n,Set(CALLFILENAME=${ARG1}/${ARG2}-${CALLERID(num)}-${EPOCH}) +exten => s,n,Set(CALLFILENAME=${ARG1}/${ARG2}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,"%Y-%m-%d-%H:%M:%S") +exten => s,n,NoOp(Dial Status: ${CALLFILENAME}) + exten => s,n,Monitor(wav,${CALLFILENAME},m) exten => s,n,Dial(SIP/${ARG1}/${ARG2},5) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) |
#ls /var/spool/asterisk/monitor/
berlin graz monitor.wav vaduz |
#ls -al /var/spool/asterisk/monitor/
total 184 drwxr-x--- 5 asterisk asterisk 4096 Apr 25 09:51 . drwxr-x--- 9 asterisk asterisk 4096 Apr 22 14:33 .. drwxrwx--- 2 asterisk asterisk 4096 Apr 25 10:00 berlin drwxrwx--- 2 asterisk asterisk 4096 Apr 24 14:06 graz -rw-rw---- 1 asterisk asterisk 167724 Apr 25 09:51 monitor.wav drwxrwx--- 2 asterisk asterisk 4096 Apr 25 10:02 vaduz |
#[2202]
exten => s-NOANSWER,n(fr),Set(CHANNEL(language)=fr) exten => s-NOANSWER,n,Goto(vm) exten => s-NOANSWER,n(es),Set(CHANNEL(language)=es) exten => s-NOANSWER,n,Goto(vm) exten => s-NOANSWER,n(vm),VoiceMail() exten => s-CONGESTION,1,Dial(SIP/2202) exten => s-CHANUNAVAIL,1,Playback(/var/tmp/asterisk/message) exten => s-ANSWER,1,Hangup exten => s-BUSY,1,Busy ; Goto(x) переход а пределах экстеншена ... exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) ;exten => s-NOANSWER,1,Dial(SIP/2202) exten => s-NOANSWER,1,NoOp(No Answer) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) exten => s-CONGESTION,1,Dial(SIP/2202) exten => s-CHANUNAVAIL,1,Playback(/var/tmp/asterisk/message) exten => s-ANSWER,1,Hangup exten => s-BUSY,1,Busy ; Goto(x) переход а пределах экстеншена |
#; Goto(x,y) переход на другой экстеншен x на шаг y
[local] exten => _22XX,1,Macro(localcall,${EXTEN}) ; ;exten => _22XX,1,Macro(localcall,${EXTEN}) ; ; ; "/etc/asterisk/extensions.conf.local" 9L, 109C |
#[local]
exten => s,1,Dial(SIP/${ARG1},10) ,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,NoOp(Dial Status: ${DIALSTATUS}) exten => s,n,Goto(s-${DIALSTATUS},1) ;exten => s-NOANSWER,1,Dial(SIP/2202) ;exten => s-NOANSWER,1,Dial(SIP/2202) ) exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) exten => s-CONGESTION,1,Dial(SIP/2202) exten => s-CHANUNAVAIL,1,Playback(/var/tmp/asterisk/message) -ANSWER,1,Hangup ... exten => s-NOANSWER,n,VoiceMail(${MACRO_EXTEN}@default) exten => s-CONGESTION,1,Dial(SIP/2202) exten => s,1,NoOp(SIP/${ARG1})ack(/var/tmp/asterisk/message) exten => s-ANSWER,1,Hangup -BUSY,1,Busy ; Goto(x) пеÑÐµÑ Ð¾Ð´ а пÑÐµÐ´ÐµÐ»Ð°Ñ ÑкÑÑенÑена ; Goto(x,y) пеÑÐµÑ Ð¾Ð´ на дÑÑгой ÑкÑÑенÑен x на Ñаг y ; Goto(x,y,z) пеÑÐµÑ Ð¾Ð´ на дÑÑгой конÑекÑÑ x в дÑÑгой екÑÑенÑн y на Ñаг z [macro-national] 36,67 6% |
#{ARG1}-${CALLERID(num)}-${STRFTIME(${EPOCH},Europe/Kiev,%Y-%m-%d-%H:%M:%S))
sudoers sudoers.d/ |
Время первой команды журнала | 09:27:20 2014- 4-24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 09:18:35 2014- 4-25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.82 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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