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

Содержание

Журнал

Среда (06/20/07)

/dev/tty3
14:34:34
#ping google.com
[user@linux3:~]$ ls -l /tmp/mypipe
prw-r--r-- 1 user user 0 2007-06-20 09:52 /tmp/mypipe
[user@linux3:~]$ grep /tmp/mypipe
PING google.com (192.168.15.254) 56(84) bytes of data.
64 bytes from 192.168.15.254: icmp_seq=1 ttl=64 time=0.304 ms
64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.270 ms
64 bytes from 192.168.15.254: icmp_seq=3 ttl=64 time=0.264 ms
64 bytes from 192.168.15.254: icmp_seq=4 ttl=64 time=0.275 ms
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3000ms
rtt min/avg/max/mdev = 0.264/0.278/0.304/0.019 ms
прошло 59 минут
15:33:48
#cat /etc/sys
[user@linux3:~]$
[user@linux3:~]$ #linux2 connec
[user@linux3:~]$
[user@linux3:~]$
[user@linux3:~]$ cat /etc/passwd | grep ^user:
user:x:1000:1000:XG-IDS Student #3,,,:/home/user:/bin/bash
[user@linux3:~]$ mkfifo /tmp/mypipe
[user@linux3:~]$ ls -l /tmp/mypipe
prw-r--r-- 1 user user 0 2007-06-20 09:52 /tmp/mypipe
[user@linux3:~]$ grep /tmp/mypipe
sysctl.conf  syslog.conf  syslog-ng/
15:33:48
#cat /etc/sys
sysctl.conf  syslog.conf  syslog-ng/
15:33:48
#cat /etc/syslog-ng/syslog-ng.conf | grep pipe
[user@linux3:~]$ #linux2 connec
[user@linux3:~]$
[user@linux3:~]$
[user@linux3:~]$ cat /etc/passwd | grep ^user:
user:x:1000:1000:XG-IDS Student #3,,,:/home/user:/bin/bash
[user@linux3:~]$ mkfifo /tmp/mypipe
[user@linux3:~]$ ls -l /tmp/mypipe
prw-r--r-- 1 user user 0 2007-06-20 09:52 /tmp/mypipe
[user@linux3:~]$ grep /tmp/mypipe
# pipes
destination dp_xconsole { pipe("/dev/xconsole"); };
destination d_mysql { pipe("/var/log/mysql.pipe"
прошло 32 минуты
16:06:19
#logger test
[user@linux3:~]$
[user@linux3:~]$
[user@linux3:~]$ #linux2 connec
[user@linux3:~]$
[user@linux3:~]$
[user@linux3:~]$ cat /etc/passwd | grep ^user:
user:x:1000:1000:XG-IDS Student #3,,,:/home/user:/bin/bash
[user@linux3:~]$ mkfifo /tmp/mypipe
[user@linux3:~]$ ls -l /tmp/mypipe
prw-r--r-- 1 user user 0 2007-06-20 09:52 /tmp/mypipe
[user@linux3:~]$ grep /tmp/mypipe
16:08:01
#ps -ef |grep syslog
[user@linux3:~]$
[user@linux3:~]$ cat /etc/passwd | grep ^user:
user:x:1000:1000:XG-IDS Student #3,,,:/home/user:/bin/bash
[user@linux3:~]$ mkfifo /tmp/mypipe
[user@linux3:~]$ ls -l /tmp/mypipe
prw-r--r-- 1 user user 0 2007-06-20 09:52 /tmp/mypipe
[user@linux3:~]$ grep /tmp/mypipe
root      3484     1  0 06:20 ?        00:00:00 /sbin/syslog-ng -p /var/run/syslog-ng.pid
root      4868     1  0 06:37 ?        00:00:00 /usr/bin/mysql -u syslogadmin --password=x xxxx syslog
root      4956     1  0 06:48 ?        00:00:00 /bin/sh /usr/local/sbin/syslog_mysql.sh
root      5009  4956  0 06:48 ?        00:00:00 /usr/bin/mysql -u syslogadmin --password=x xxxx syslog
root      9101  3955  0 09:08 pts/6    00:00:00 grep syslog
16:08:45
#cat /etc/rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
nohup /usr/local/sbin/syslog_mysql.sh
exit 0
16:09:13
#cat /usr/local/sbin/syslog_mysql.sh
#!/bin/sh
if [ -e /var/log/mysql.pipe ]; then
    while [ -e /var/log/mysql.pipe ]
    do
        /usr/bin/mysql -u syslogadmin --password=kilgur syslog < /var/log/mysql.pipe
    done
else
    mkfifo /var/log/mysql.pipe
fi
16:10:17
#ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 04:40 ?        00:00:01 init [2]
root         2     1  0 04:40 ?        00:00:00 [migration/0]
root         3     1  0 04:40 ?        00:00:00 [ksoftirqd/0]
root         4     1  0 04:40 ?        00:00:00 [events/0]
root         5     1  0 04:40 ?        00:00:00 [khelper]
root         6     1  0 04:40 ?        00:00:00 [kthread]
root         9     6  0 04:40 ?        00:00:00 [kblockd/0]
root        10     6  0 04:40 ?        00:00:00 [kacpid]
root        85     6  0 04:40 ?        00:00:00 [kseriod]
...
www-data  8817  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
www-data  8818  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
www-data  8819  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
www-data  8820  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
www-data  8824  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
www-data  8825  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
www-data  8826  8582  0 07:32 ?        00:00:00 /usr/sbin/apache
root      8869     1  0 07:39 tty4     00:00:00 /sbin/getty 38400 tty4
www-data  9163  8582  0 09:20 ?        00:00:00 /usr/sbin/apache
root      9232  3955  0 09:43 pts/6    00:00:00 ps -ef
прошло 33 минуты
16:43:48
#ps -ef tty3
ERROR: TTY could not be found.
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
...
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  ZLO.ZLO.ZLOl memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy
16:44:02
#ps -ef tty3 | grep tty3
ERROR: TTY could not be found.
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
...
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  ZLO.ZLO.ZLOl memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context
                    ********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy
16:44:12
#ps -ef | grep tty
root      2234     1  0 04:41 tty3     00:00:00 /bin/login --
root      2242     1  0 04:41 tty5     00:00:00 /sbin/getty 38400 tty5
root      2245     1  0 04:41 tty6     00:00:00 /sbin/getty 38400 tty6
user      2253  2232  0 05:35 tty1     00:00:00 script -f -q /home/user/.lilalo//2219020021451826793-1182332142.script
user      2298  2253  0 05:35 tty1     00:00:00 script -f -q /home/user/.lilalo//2219020021451826793-1182332142.script
root      2836  2835  1 05:45 tty7     00:03:17 /usr/bin/X11/X -dpi 100 -nolisten tcp
user      2868  2233  0 05:46 tty2     00:00:00 script -f -q /home/user/.lilalo//2847419309659222560-1182332767.script
user      2915  2868  0 05:46 tty2     00:00:01 script -f -q /home/user/.lilalo//2847419309659222560-1182332767.script
root      3917  2234  0 06:21 tty3     00:00:00 script -f -q /root/.lilalo//1181213521123403749-1182334890.script
root      3954  3917  0 06:21 tty3     00:00:00 script -f -q /root/.lilalo//1181213521123403749-1182334890.script
root      8869     1  0 07:39 tty4     00:00:00 /sbin/getty 38400 tty4
root      9252  3955  0 09:44 pts/6    00:00:00 grep tty
16:44:46
#ps -ef | grep tty2
root      2233     1  0 04:41 tty2     00:00:00 /bin/login --
user      2868  2233  0 05:46 tty2     00:00:00 script -f -q /home/user/.lilalo//2847419309659222560-1182332767.script
user      2915  2868  0 05:46 tty2     00:00:01 script -f -q /home/user/.lilalo//2847419309659222560-1182332767.script
root      9259  3955  0 09:45 pts/6    00:00:00 grep tty2
16:45:12
#pkill tty3

16:45:52
#pkill tty2

16:46:18
#kill -9 2233

прошло 15 минут
/dev/pts/4
17:02:03
#ssh linux3 -l user
user@linux3's password:
Linux linux3 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
indZLO.ZLO.ZLOl 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: Wed Jun 20 13:50:41 2007 from linux1.local
l3-agent is already running: pid=15820; pidfile=/home/user/.lilalo/l3-agent.pid
прошло 109 минут
/dev/pts/3
18:51:39
#apt-get intsall aide
E: Invalid operation intsall
18:51:54
#apt-get install aide
Creating config file /etc/aide/aide.conf.d/31_aide_inetd with new version
Creating config file /etc/aide/aide.conf.d/99_aide_root with new version
Creating config file /etc/aide/aide.conf.d/30_aide_apache2 with new version
Creating config file /etc/aide/aide.conf.d/31_aide_aide with new version
Creating config file /etc/aide/aide.conf.d/31_aide_gpg with new version
Creating config file /etc/aide/aide.conf.d/31_aide_dhcp3-client with new version
Creating config file /etc/aide/aide.conf.d/31_aide_amanda-server with new version
Creating config file /etc/aide/aide.conf.d/31_aide_lastlog with new version
Creating config file /etc/aide/aide.conf.d/31_aide_munin with new version
Creating config file /etc/aide/aide.conf.d/31_aide_cron-apt with new version
...
Creating config file /etc/aide/aide.conf.d/31_aide_apt-listchanges with new version
Creating config file /etc/aide/aide.conf.d/31_aide_debconf with new version
Creating config file /etc/aide/aide.conf.d/31_aide_screen with new version
Creating config file /etc/aide/aide.conf.d/31_aide_ntp-server with new version
Creating config file /etc/aide/aide.conf.d/10_aide_hostname with new version
Creating config file /etc/aide/aide.conf.d/31_aide_exim4 with new version
Creating config file /etc/aide/aide.conf.d/31_aide_webalizer with new version
Creating config file /etc/aide/aide.conf.d/70_aide_etc with new version
Creating config file /etc/aide/aide.conf.d/31_aide_exim4_logs with new version
Creating config file /etc/cron.daily/aide with new version
18:52:55
#/etc/
bash: /etc/: is a directory
18:54:45
#cd /etc/a
acpi/         adjtime       aliases       apache/
adduser.conf  aide/         alternatives/ apt/
18:54:45
#cd /etc/aide/

18:55:01
#ls
aide.conf  aide.conf.d
18:55:03
#vi aide.conf
18:56:03
#cd /var/db]
bash: cd: /var/db]: No such file or directory
18:56:28
#vi aide.conf
18:56:51
#cat aide.conf | gerp db
bash: gerp: command not found
18:57:04
#cat aide.conf | grep db
database=file:/var/lib/aide/aide.db
database_out=file:/var/lib/aide/aide.db.new
18:57:18
#aide --init
Couldn't open file /tmp/empty/aide.db.new for writing
18:57:28
#aide --init
Couldn't open file /tmp/empty/aide.db.new for writing
18:57:50
#aide --init
Couldn't open file /tmp/empty/aide.db.new for writing
18:57:51
#aide --init
Couldn't open file /tmp/empty/aide.db.new for writing
18:57:52
#aide --init
Couldn't open file /tmp/empty/aide.db.new for writing
18:57:54
#cat aide.conf | grep db
database=file:/var/lib/aide/aide.db
database_out=file:/var/lib/aide/aide.db.new
18:58:20
#cd /var/l
lib/        local/      lock/       log/        lost+found/
18:58:20
#cd /var/l
lib/        local/      lock/       log/        lost+found/
18:58:20
#cd /var/lib/a
aide/     apache/   apt/      aptitude/
18:58:20
#cd /var/lib/aide/

18:58:51
#ls

18:58:54
#ls

18:58:57
#cat aide.conf | grep db
cat: aide.conf: No such file or directory
18:59:10
#cat /etc/aide.conf | grep db
cat: /etc/aide.conf: No such file or directory
18:59:22
#cat /etc/aide.conf | grep db
cat: /etc/aide.conf: No such file or directory
18:59:25
#cat /etc/aida/aide.conf | grep db
cat: /etc/aida/aide.conf: No such file or directory
19:00:46
#cat /etc/aida/aide.conf | grep db
cat: /etc/aida/aide.conf: No such file or directory
19:00:55
#cd /etc/aide

19:01:08
#ls
aide.conf  aide.conf.d
19:01:10
#cat aide.conf.d
cat: aide.conf.d: Is a directory
19:01:25
#cd aide.conf.d

19:01:37
#ls
10_aide_hostname         31_aide_clamav        31_aide_ippl          31_aide_spamassassin
30_aide_apache2          31_aide_clamav-data   31_aide_lastlog       31_aide_squid
30_inn2_vars             31_aide_console-log   31_aide_logrotate     31_aide_ssh-agent
31_aide_acpid            31_aide_cron          31_aide_lvm2          31_aide_ssh-server
31_aide_adjtime          31_aide_cron-apt      31_aide_man           31_aide_sudo
31_aide_aide             31_aide_debconf       31_aide_modules       31_aide_syslog
31_aide_amanda-client    31_aide_debsecan      31_aide_mtab          31_aide_torrus
31_aide_amanda-server    31_aide_dhcp3-client  31_aide_munin         31_aide_utmp
31_aide_anacron          31_aide_dhcp3-server  31_aide_mysql-server  31_aide_webalizer
31_aide_apache           31_aide_dovecot       31_aide_nagios2       31_aide_wtmp
31_aide_apache2          31_aide_dpkg          31_aide_ntp-server    31_aide_xfree86-common
31_aide_apt_frqchg       31_aide_exim4         31_aide_openvpn       31_aide_xinetd
31_aide_aptitude         31_aide_exim4_logs    31_aide_php4          70_aide_dev
31_aide_aptitude_frqchg  31_aide_findutils     31_aide_proftpd       70_aide_etc
31_aide_apt-listbugs     31_aide_gpg           31_aide_resolvconf    70_aide_proc_sys
31_aide_apt-listchanges  31_aide_ifupdown      31_aide_rngd          70_aide_var
31_aide_apt_stable       31_aide_inetd         31_aide_screen        99_aide_root
31_aide_apt_unstable     31_aide_initscripts   31_aide_slrn
31_aide_bind9            31_aide_inn2          31_aide_snmpd
19:01:39
#cd ..

19:01:49
#ls
aide.conf  aide.conf.d
19:01:50
#cat aide.conf
# AIDE conf
database=file:/var/lib/aide/aide.db
database_out=file:/var/lib/aide/aide.db.new
Checksums     = md5+sha1+rmd160+haval+gost+crc32+tiger+whirlpool
OwnerMode     = p+u+g
Size          = s+b
InodeData     = OwnerMode+n+i+Size
RamdiskData   = InodeData-i
StaticFile    = m+c+Checksums
Full          = InodeData+StaticFile
VarFile       = OwnerMode+n
VarDir        = OwnerMode+n+i
RotatedLogs   = Full+I
Logs          = OwnerMode+n+S
LowLogs       = Logs-S
LinkedLogs    = Logs-n
19:01:58
#aide --init
Couldn't open file /tmp/empty/aide.db.new for writing
19:02:32
#string aide
bash: string: command not found
19:03:00
#strings aide
strings: 'aide': No such file
19:03:06
#strings /etc/aide/

19:03:16
#strings /etc/aide

19:03:19
#strings /etc/aide

19:03:38
#aide
Couldn't open file /tmp/empty/aide.db for reading
19:03:46
#string /etc/init.d/a
acpid   apache
19:03:46
#string /etc/a
acpi/         adjtime       aliases       apache/
adduser.conf  aide/         alternatives/ apt/
19:03:46
#string /etc/aide/aide.conf.d/
10_aide_hostname         31_aide_clamav           31_aide_ippl             31_aide_spamassassin
30_aide_apache2          31_aide_clamav-data      31_aide_lastlog          31_aide_squid
30_inn2_vars             31_aide_console-log      31_aide_logrotate        31_aide_ssh-agent
31_aide_acpid            31_aide_cron             31_aide_lvm2             31_aide_ssh-server
31_aide_adjtime          31_aide_cron-apt         31_aide_man              31_aide_sudo
31_aide_aide             31_aide_debconf          31_aide_modules          31_aide_syslog
31_aide_amanda-client    31_aide_debsecan         31_aide_mtab             31_aide_torrus
31_aide_amanda-server    31_aide_dhcp3-client     31_aide_munin            31_aide_utmp
31_aide_anacron          31_aide_dhcp3-server     31_aide_mysql-server     31_aide_webalizer
31_aide_apache           31_aide_dovecot          31_aide_nagios2          31_aide_wtmp
31_aide_apache2          31_aide_dpkg             31_aide_ntp-server       31_aide_xfree86-common
31_aide_apt_frqchg       31_aide_exim4            31_aide_openvpn          31_aide_xinetd
31_aide_aptitude         31_aide_exim4_logs       31_aide_php4             70_aide_dev
31_aide_aptitude_frqchg  31_aide_findutils        31_aide_proftpd          70_aide_etc
31_aide_apt-listbugs     31_aide_gpg              31_aide_resolvconf       70_aide_proc_sys
31_aide_apt-listchanges  31_aide_ifupdown         31_aide_rngd             70_aide_var
31_aide_apt_stable       31_aide_inetd            31_aide_screen           99_aide_root
31_aide_apt_unstable     31_aide_initscripts      31_aide_slrn
31_aide_bind9            31_aide_inn2             31_aide_snmpd
19:03:46
#man aide
19:05:20
#aide --init -c /etc/aide/aide.conf
AIDE, version 0.13.1
### AIDE database at /var/lib/aide/aide.db.new initialized.
19:05:54
#aide --check
Couldn't open file /tmp/empty/aide.db for reading
19:06:33
#aide --check -c /etc/a
acpi/         adjtime       aliases       apache/
adduser.conf  aide/         alternatives/ apt/
19:06:33
#aide --check -c /etc/aide/aide.conf
Couldn't open file /var/lib/aide/aide.db for reading
19:07:06
#aide --upadate -c /etc/aide/aide.conf
aide: unrecognized option `--upadate'
Unknown option given. Exiting
19:08:53
#aide --update -c /etc/aide/aide.conf
Couldn't open file /var/lib/aide/aide.db for reading
19:09:13
#cp /var/lib/aide/aide.db.new /var/lib/aide/aide.db

19:10:04
#aide --update -c /etc/aide/aide.conf
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!
### New AIDE database written to /var/lib/aide/aide.db.new
19:10:10
#aide --compare -c /etc/aide/aide.conf
Must have both input databases defined for database compare.
19:12:00
#aide --compare -c /etc/aide/aide.conf
Must have both input databases defined for database compare.
19:12:18
#aide --compare -c /etc/aide/aide.conf
Must have both input databases defined for database compare.
19:12:58
#aide --check -c /etc/aide/aide.conf
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!
19:13:12
#ls
aide.conf  aide.conf.d
19:14:02
#vi aide.conf
19:14:43
#man aida
19:14:47
#man aida --compare
19:15:12
#aide --compare
Must have both input databases defined for database compare.
19:15:33
#aide --compare -c /etc/aide/aide.conf
Must have both input databases defined for database compare.
19:15:52
#aide --update -c /etc/aide/aide.conf
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!
### New AIDE database written to /var/lib/aide/aide.db.new
19:16:31
#aide --compare -c /etc/aide/aide.conf
Must have both input databases defined for database compare.
19:16:37
#aide ?
Extra parameters given
19:16:49
#aide /?
Extra parameters given
19:16:53
#aide help
Extra parameters given
19:16:57
#aide
Couldn't open file /tmp/empty/aide.db for reading
19:16:59
#aide
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!
19:17:21
#aide -c /etc/aide/aide.conf
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!
19:17:28
#aide -c /etc/aide/aide.conf
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE, version 0.13.1
### All files match AIDE database. Looks okay!
19:17:46
#aide --compare -c /etc/aide/aide.conf
Must have both input databases defined for database compare.
19:21:34
#vi aide.conf
19a20
> /tmp R
19:23:11
#cd /tmp

19:23:25
#aide --update -c /etc/aide/aide.conf
Database does not have attr field.
Comparation may be incorrect
Generating attr-field from dbspec
It might be a good Idea to regenerate databases. Sorry.
AIDE found differences between database and filesystem!!
Start timestamp: 2007-06-20 12:23:36
Summary:
  Total number of files:        17
  Added files:                  16
  Removed files:                0
...
added: /tmp/ssh-TWpwED2840
added: /tmp/ssh-TWpwED2840/agent.2840
added: /tmp/0c8pfamp-1.phtml
added: /tmp/l3-saved-3144.19989.12708
added: /tmp/1kbub5m3-1.phtml
added: /tmp/.X0-lock
added: /tmp/phpsyslogng-2.6.tar.gz
added: /tmp/lost+found
added: /tmp/index-1.php
added: /tmp/index.php
19:23:36
#cd /tmp

19:23:49
#ls
0c8pfamp-1.phtml  du52dm4u-1.phtml  index.php                  lost+found  phpsyslogng-2.6.tar.gz
1kbub5m3-1.phtml  index-1.php       l3-saved-3144.19989.12708  mc-root     ssh-TWpwED2840
19:23:51
#cat >> test.fil.txt
tteteteetet
19:24:15
#cat test.fil.txt

19:24:22
#cat >> test.fil.txt
dkjjdjd;
:
q
19:24:38
#cat test.fil.txt
dkjjdjd;
:
q

Файлы

  • /etc/rc.local
  • /etc/sys
  • /usr/local/sbin/syslog_mysql.sh
  • aide.conf
  • test.fil.txt
  • /etc/rc.local
    >
    #
    # This script is executed at the end of each multiuser runlevel.
    # Make sure that the script will "exit 0" on success or any other
    # value on error.
    #
    # In order to enable or disable this script just change the execution
    # bits.
    #
    # By default this script does nothing.
    nohup /usr/local/sbin/syslog_mysql.sh
    exit 0
    
    /etc/sys
    >
    sysctl.conf  syslog.conf  syslog-ng/
    
    /usr/local/sbin/syslog_mysql.sh
    >
    #!/bin/sh
    if [ -e /var/log/mysql.pipe ]; then
        while [ -e /var/log/mysql.pipe ]
        do
            /usr/bin/mysql -u syslogadmin --password=kilgur syslog < /var/log/mysql.pipe
        done
    else
        mkfifo /var/log/mysql.pipe
    fi
    
    aide.conf
    >
    # AIDE conf
    database=file:/var/lib/aide/aide.db
    database_out=file:/var/lib/aide/aide.db.new
    Checksums     = md5+sha1+rmd160+haval+gost+crc32+tiger+whirlpool
    OwnerMode     = p+u+g
    Size          = s+b
    InodeData     = OwnerMode+n+i+Size
    RamdiskData   = InodeData-i
    StaticFile    = m+c+Checksums
    Full          = InodeData+StaticFile
    VarFile       = OwnerMode+n
    VarDir        = OwnerMode+n+i
    RotatedLogs   = Full+I
    Logs          = OwnerMode+n+S
    LowLogs       = Logs-S
    LinkedLogs    = Logs-n
    
    test.fil.txt
    >
    dkjjdjd;
    :
    q
    

    Статистика

    Время первой команды журнала14:34:34 2007- 6-20
    Время последней команды журнала19:24:38 2007- 6-20
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %43.56
    Процент синтаксически неверно набранных команд, % 1.98
    Суммарное время работы с терминалом *, час 0.92
    Количество командных строк в единицу времени, команда/мин 1.83
    Частота использования команд
    aide31|==========================| 26.27%
    cat19|================| 16.10%
    cd12|==========| 10.17%
    grep12|==========| 10.17%
    ls8|======| 6.78%
    ps6|=====| 5.08%
    strings4|===| 3.39%
    vi4|===| 3.39%
    string4|===| 3.39%
    man3|==| 2.54%
    test.fil.txt2|=| 1.69%
    >2|=| 1.69%
    pkill2|=| 1.69%
    apt-get2|=| 1.69%
    ping1|| 0.85%
    /etc/1|| 0.85%
    cp1|| 0.85%
    logger1|| 0.85%
    kill1|| 0.85%
    ssh1|| 0.85%
    gerp1|| 0.85%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$