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

Содержание

Журнал

Пятница (07/31/09)

/dev/ttyp2
20:40:03
#cd /usr/ports/security/xinetd/

20:40:03
#cd /usr/ports/security/xinetd/

20:40:09
#ls
Makefile        files           pkg-plist
distinfo        pkg-descr       work
20:40:09
#ls
Makefile        files           pkg-plist
distinfo        pkg-descr       work
20:40:12
#make install
===>  Building for xinetd-2.3.14_1
cd libs/src/portable ; gmake CC='cc' CFLAGS='-O2 -fno-strict-aliasing -pipe  -O2 -fno-strict-aliasing -pipe   -I../../include' install
gmake[1]: Entering directory `/usr/ports/security/xinetd/work/xinetd-2.3.14/libs/src/portable'
Installed libportable.a to ../../lib
Installed ./libportable.h to ../../include
gmake[1]: Leaving directory `/usr/ports/security/xinetd/work/xinetd-2.3.14/libs/src/portable'
cd libs/src/sio ; gmake CC='cc' CFLAGS='-O2 -fno-strict-aliasing -pipe  -O2 -fno-strict-aliasing -pipe   -I../../include' install
gmake[1]: Entering directory `/usr/ports/security/xinetd/work/xinetd-2.3.14/libs/src/sio'
Installed libsio.a to ../../lib
Installed ./sio.h to ../../include
...
      these network services to be started at boot time.
/usr/local/etc/rc.d/xinetd
      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.xinetd.org/
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
20:40:12
#make install
===>  Building for xinetd-2.3.14_1
cd libs/src/portable ; gmake CC='cc' CFLAGS='-O2 -fno-strict-aliasing -pipe  -O2 -fno-strict-aliasing -pipe   -I../../include' install
gmake[1]: Entering directory `/usr/ports/security/xinetd/work/xinetd-2.3.14/libs/src/portable'
Installed libportable.a to ../../lib
Installed ./libportable.h to ../../include
gmake[1]: Leaving directory `/usr/ports/security/xinetd/work/xinetd-2.3.14/libs/src/portable'
cd libs/src/sio ; gmake CC='cc' CFLAGS='-O2 -fno-strict-aliasing -pipe  -O2 -fno-strict-aliasing -pipe   -I../../include' install
gmake[1]: Entering directory `/usr/ports/security/xinetd/work/xinetd-2.3.14/libs/src/sio'
Installed libsio.a to ../../lib
Installed ./sio.h to ../../include
...
      these network services to be started at boot time.
/usr/local/etc/rc.d/xinetd
      If there are vulnerabilities in these programs there may be a security
      risk to the system. FreeBSD makes no guarantee about the security of
      ports included in the Ports Collection. Please type 'make deinstall'
      to deinstall the port if this is a concern.
      For more information, and contact details about the security
      status of this software, see the following webpage:
http://www.xinetd.org/
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
20:41:11
#killall inetd

20:41:11
#killall inetd

20:41:49
#vim /e
20:41:49
#vim /etc/rc.conf
--- /tmp/l3-saved-1872.26213.10090	2009-07-31 21:42:18.000000000 +0300
+++ /etc/rc.conf	2009-07-31 21:43:17.000000000 +0300
@@ -10,7 +10,7 @@
 saver="fire"
 scrnmap="koi8-r2cp866"
 usbd_enable="YES"
-inetd_enable=yes
+inetd_enable="NO"
 defaultrouter="192.168.16.254"
 ifconfig_re0="inet 192.168.16.24  netmask 255.255.255.0"
 ifconfig_re1="inet 192.168.54.1 netmask 255.255.255.224"
20:41:49
#vim /e
--- /tmp/l3-saved-1872.26213.10090	2009-07-31 21:42:18.000000000 +0300
+++ /etc/rc.conf	2009-07-31 21:43:17.000000000 +0300
@@ -10,7 +10,7 @@
 saver="fire"
 scrnmap="koi8-r2cp866"
 usbd_enable="YES"
-inetd_enable=yes
+inetd_enable="NO"
 defaultrouter="192.168.16.254"
 ifconfig_re0="inet 192.168.16.24  netmask 255.255.255.0"
 ifconfig_re1="inet 192.168.54.1 netmask 255.255.255.224"
20:41:49
#vim /etc/rc.conf
20:43:17
#ls /usr/local/etc/rc.d/xinetd.sh
ls: /usr/local/etc/rc.d/xinetd.sh: No such file or directory
20:43:17
#ls /usr/local/etc/rc.d/xinetd.sh
ls: /usr/local/etc/rc.d/xinetd.sh: No such file or directory
20:44:00
#ls /usr/local/etc/rc.d/
avahi-daemon.sh         gdm                     xfs
avahi-dnsconfd.sh       hald                    xinetd
dbus                    polkitd
ffserver                system-tools-backends
20:44:00
#ls /usr/local/etc/rc.d/
avahi-daemon.sh         gdm                     xfs
avahi-dnsconfd.sh       hald                    xinetd
dbus                    polkitd
ffserver                system-tools-backends
20:44:05
#ls /usr/local/etc/rc.d/xinetd
/usr/local/etc/rc.d/xinetd
20:44:05
#ls /usr/local/etc/rc.d/xinetd
/usr/local/etc/rc.d/xinetd
20:44:11
#ls
Makefile        files           pkg-plist
distinfo        pkg-descr       work
20:44:11
#ls
Makefile        files           pkg-plist
distinfo        pkg-descr       work
20:44:12
#ping ya.ru
PING ya.ru (213.180.204.8): 56 data bytes
64 bytes from 213.180.204.8: icmp_seq=0 ttl=50 time=51.032 ms
64 bytes from 213.180.204.8: icmp_seq=1 ttl=51 time=59.202 ms
64 bytes from 213.180.204.8: icmp_seq=2 ttl=51 time=59.358 ms
64 bytes from 213.180.204.8: icmp_seq=3 ttl=51 time=60.292 ms
64 bytes from 213.180.204.8: icmp_seq=4 ttl=50 time=61.352 ms
^C
--- ya.ru ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 51.032/58.247/61.352/3.689 ms
20:44:12
#ping ya.ru
PING ya.ru (213.180.204.8): 56 data bytes
64 bytes from 213.180.204.8: icmp_seq=0 ttl=50 time=51.032 ms
64 bytes from 213.180.204.8: icmp_seq=1 ttl=51 time=59.202 ms
64 bytes from 213.180.204.8: icmp_seq=2 ttl=51 time=59.358 ms
64 bytes from 213.180.204.8: icmp_seq=3 ttl=51 time=60.292 ms
64 bytes from 213.180.204.8: icmp_seq=4 ttl=50 time=61.352 ms
^C
--- ya.ru ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 51.032/58.247/61.352/3.689 ms
20:45:14
#cd /usr/local/etc/rc.d/xinetd
bash: cd: /usr/local/etc/rc.d/xinetd: Not a directory
20:45:14
#cd /usr/local/etc/rc.d/xinetd
bash: cd: /usr/local/etc/rc.d/xinetd: Not a directory
20:45:33
#cd /usr/local/etc/rc.d/

20:45:33
#cd /usr/local/etc/rc.d/

20:45:37
#ls
avahi-daemon.sh         gdm                     xfs
avahi-dnsconfd.sh       hald                    xinetd
dbus                    polkitd
ffserver                system-tools-backends
20:45:37
#ls
avahi-daemon.sh         gdm                     xfs
avahi-dnsconfd.sh       hald                    xinetd
dbus                    polkitd
ffserver                system-tools-backends
20:45:39
#ls -l
total 20
-r-xr-xr-x  1 root  wheel   873  1 ÄÅË  2007 avahi-daemon.sh
-r-xr-xr-x  1 root  wheel  1119  1 ÄÅË  2007 avahi-dnsconfd.sh
-r-xr-xr-x  1 root  wheel   664  1 ÄÅË  2007 dbus
-r-xr-xr-x  1 root  wheel   469  1 ÄÅË  2007 ffserver
-r-xr-xr-x  1 root  wheel   563 17 ÄÅË  2007 gdm
-r-xr-xr-x  1 root  wheel  1126  1 ÄÅË  2007 hald
-r-xr-xr-x  1 root  wheel  1036  1 ÄÅË  2007 polkitd
-r-xr-xr-x  1 root  wheel   765  1 ÄÅË  2007 system-tools-backends
-r-xr-xr-x  1 root  wheel   935  1 ÄÅË  2007 xfs
-r-xr-xr-x  1 root  wheel   461 31 ÉÀÌ 21:41 xinetd
20:45:39
#ls -l
total 20
-r-xr-xr-x  1 root  wheel   873  1 ÄÅË  2007 avahi-daemon.sh
-r-xr-xr-x  1 root  wheel  1119  1 ÄÅË  2007 avahi-dnsconfd.sh
-r-xr-xr-x  1 root  wheel   664  1 ÄÅË  2007 dbus
-r-xr-xr-x  1 root  wheel   469  1 ÄÅË  2007 ffserver
-r-xr-xr-x  1 root  wheel   563 17 ÄÅË  2007 gdm
-r-xr-xr-x  1 root  wheel  1126  1 ÄÅË  2007 hald
-r-xr-xr-x  1 root  wheel  1036  1 ÄÅË  2007 polkitd
-r-xr-xr-x  1 root  wheel   765  1 ÄÅË  2007 system-tools-backends
-r-xr-xr-x  1 root  wheel   935  1 ÄÅË  2007 xfs
-r-xr-xr-x  1 root  wheel   461 31 ÉÀÌ 21:41 xinetd
20:47:03
#ping ya.ru
PING ya.ru (93.158.134.8): 56 data bytes
64 bytes from 93.158.134.8: icmp_seq=0 ttl=50 time=61.732 ms
64 bytes from 93.158.134.8: icmp_seq=1 ttl=50 time=61.521 ms
64 bytes from 93.158.134.8: icmp_seq=2 ttl=49 time=51.979 ms
64 bytes from 93.158.134.8: icmp_seq=3 ttl=49 time=52.226 ms
64 bytes from 93.158.134.8: icmp_seq=4 ttl=49 time=52.794 ms
64 bytes from 93.158.134.8: icmp_seq=5 ttl=49 time=52.912 ms
64 bytes from 93.158.134.8: icmp_seq=6 ttl=50 time=60.837 ms
64 bytes from 93.158.134.8: icmp_seq=7 ttl=49 time=52.395 ms
64 bytes from 93.158.134.8: icmp_seq=8 ttl=49 time=52.686 ms
64 bytes from 93.158.134.8: icmp_seq=9 ttl=49 time=53.072 ms
64 bytes from 93.158.134.8: icmp_seq=10 ttl=50 time=61.016 ms
64 bytes from 93.158.134.8: icmp_seq=11 ttl=49 time=51.774 ms
64 bytes from 93.158.134.8: icmp_seq=12 ttl=49 time=52.641 ms
64 bytes from 93.158.134.8: icmp_seq=13 ttl=50 time=61.400 ms
^C
--- ya.ru ping statistics ---
14 packets transmitted, 14 packets received, 0% packet loss
round-trip min/avg/max/stddev = 51.774/55.642/61.732/4.236 ms
20:47:03
#ping ya.ru
PING ya.ru (93.158.134.8): 56 data bytes
64 bytes from 93.158.134.8: icmp_seq=0 ttl=50 time=61.732 ms
64 bytes from 93.158.134.8: icmp_seq=1 ttl=50 time=61.521 ms
64 bytes from 93.158.134.8: icmp_seq=2 ttl=49 time=51.979 ms
64 bytes from 93.158.134.8: icmp_seq=3 ttl=49 time=52.226 ms
64 bytes from 93.158.134.8: icmp_seq=4 ttl=49 time=52.794 ms
64 bytes from 93.158.134.8: icmp_seq=5 ttl=49 time=52.912 ms
64 bytes from 93.158.134.8: icmp_seq=6 ttl=50 time=60.837 ms
64 bytes from 93.158.134.8: icmp_seq=7 ttl=49 time=52.395 ms
64 bytes from 93.158.134.8: icmp_seq=8 ttl=49 time=52.686 ms
64 bytes from 93.158.134.8: icmp_seq=9 ttl=49 time=53.072 ms
64 bytes from 93.158.134.8: icmp_seq=10 ttl=50 time=61.016 ms
64 bytes from 93.158.134.8: icmp_seq=11 ttl=49 time=51.774 ms
64 bytes from 93.158.134.8: icmp_seq=12 ttl=49 time=52.641 ms
64 bytes from 93.158.134.8: icmp_seq=13 ttl=50 time=61.400 ms
^C
--- ya.ru ping statistics ---
14 packets transmitted, 14 packets received, 0% packet loss
round-trip min/avg/max/stddev = 51.774/55.642/61.732/4.236 ms
20:47:34
#ls -l
total 20
-r-xr-xr-x  1 root  wheel   873  1 ÄÅË  2007 avahi-daemon.sh
-r-xr-xr-x  1 root  wheel  1119  1 ÄÅË  2007 avahi-dnsconfd.sh
-r-xr-xr-x  1 root  wheel   664  1 ÄÅË  2007 dbus
-r-xr-xr-x  1 root  wheel   469  1 ÄÅË  2007 ffserver
-r-xr-xr-x  1 root  wheel   563 17 ÄÅË  2007 gdm
-r-xr-xr-x  1 root  wheel  1126  1 ÄÅË  2007 hald
-r-xr-xr-x  1 root  wheel  1036  1 ÄÅË  2007 polkitd
-r-xr-xr-x  1 root  wheel   765  1 ÄÅË  2007 system-tools-backends
-r-xr-xr-x  1 root  wheel   935  1 ÄÅË  2007 xfs
-r-xr-xr-x  1 root  wheel   461 31 ÉÀÌ 21:41 xinetd
20:47:34
#ls -l
total 20
-r-xr-xr-x  1 root  wheel   873  1 ÄÅË  2007 avahi-daemon.sh
-r-xr-xr-x  1 root  wheel  1119  1 ÄÅË  2007 avahi-dnsconfd.sh
-r-xr-xr-x  1 root  wheel   664  1 ÄÅË  2007 dbus
-r-xr-xr-x  1 root  wheel   469  1 ÄÅË  2007 ffserver
-r-xr-xr-x  1 root  wheel   563 17 ÄÅË  2007 gdm
-r-xr-xr-x  1 root  wheel  1126  1 ÄÅË  2007 hald
-r-xr-xr-x  1 root  wheel  1036  1 ÄÅË  2007 polkitd
-r-xr-xr-x  1 root  wheel   765  1 ÄÅË  2007 system-tools-backends
-r-xr-xr-x  1 root  wheel   935  1 ÄÅË  2007 xfs
-r-xr-xr-x  1 root  wheel   461 31 ÉÀÌ 21:41 xinetd
20:47:48
#cp /etc/inetd.conf > /tmp/xinetd.conf
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
20:47:48
#cp /etc/inetd.conf > /tmp/xinetd.conf
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
20:51:27
#ls /etc/
X11                     login.conf              profile
aliases                 login.conf.db           protocols
amd.map                 mac.conf                pwd.db
apmd.conf               mail                    rc
auth.conf               mail.rc                 rc.bsdextended
bluetooth               make.conf               rc.conf
crontab                 manpath.config          rc.d
csh.cshrc               manpath.config.bak      rc.firewall
csh.login               manpath.config.bak.xorg rc.firewall6
csh.logout              master.passwd           rc.initdiskless
...
hosts                   passwd                  snmpd.config
hosts.allow             pccard_ether            spwd.db
hosts.equiv             periodic                ssh
hosts.lpd               periodic.conf           ssl
inetd.conf              pf.conf                 sysctl.conf
isdn                    pf.os                   syslog.conf
lilalo                  phones                  termcap
localtime               portsnap.conf           ttys
locate.rc               ppp                     usbd.conf
login.access            printcap                wall_cmos_clock
20:51:27
#ls /etc/
X11                     login.conf              profile
aliases                 login.conf.db           protocols
amd.map                 mac.conf                pwd.db
apmd.conf               mail                    rc
auth.conf               mail.rc                 rc.bsdextended
bluetooth               make.conf               rc.conf
crontab                 manpath.config          rc.d
csh.cshrc               manpath.config.bak      rc.firewall
csh.login               manpath.config.bak.xorg rc.firewall6
csh.logout              master.passwd           rc.initdiskless
...
hosts                   passwd                  snmpd.config
hosts.allow             pccard_ether            spwd.db
hosts.equiv             periodic                ssh
hosts.lpd               periodic.conf           ssl
inetd.conf              pf.conf                 sysctl.conf
isdn                    pf.os                   syslog.conf
lilalo                  phones                  termcap
localtime               portsnap.conf           ttys
locate.rc               ppp                     usbd.conf
login.access            printcap                wall_cmos_clock
20:52:05
#vimtc/inetd.conf
# deadly security hole.
#
#cvspserver     stream  tcp     nowait  root    /usr/bin/cvs    cvs --allow-roott
=/your/cvsroot/here pserver
#cvspserver     stream  tcp     nowait  root    /usr/bin/cvs    cvs --allow-roott
=/your/cvsroot/here kserver
#
# RPC based services (you MUST have rpcbind running to use these)
#
#rstatd/1-3     dgram rpc/udp wait root /usr/libexec/rpc.rstatd  rpc.rstatd
#rusersd/1-2    dgram rpc/udp wait root /usr/libexec/rpc.rusersd rpc.rusersd
#walld/1        dgram rpc/udp wait root /usr/libexec/rpc.rwalld  rpc.rwalld
#pcnfsd/1-2     dgram rpc/udp wait root /usr/local/libexec/rpc.pcnfsd    rpc.pcnn
fsd
#chargen stream tcp     nowait  root    internal
20:52:05
#vimtc/inetd.conf
# deadly security hole.
#
#cvspserver     stream  tcp     nowait  root    /usr/bin/cvs    cvs --allow-roott
=/your/cvsroot/here pserver
#cvspserver     stream  tcp     nowait  root    /usr/bin/cvs    cvs --allow-roott
=/your/cvsroot/here kserver
#
# RPC based services (you MUST have rpcbind running to use these)
#
#rstatd/1-3     dgram rpc/udp wait root /usr/libexec/rpc.rstatd  rpc.rstatd
#rusersd/1-2    dgram rpc/udp wait root /usr/libexec/rpc.rusersd rpc.rusersd
#walld/1        dgram rpc/udp wait root /usr/libexec/rpc.rwalld  rpc.rwalld
#pcnfsd/1-2     dgram rpc/udp wait root /usr/local/libexec/rpc.pcnfsd    rpc.pcnn
fsd
#chargen stream tcp     nowait  root    internal
20:52:35
#:q
X11                     login.conf              profile
aliases                 login.conf.db           protocols
amd.map                 mac.conf                pwd.db
apmd.conf               mail                    rc
auth.conf               mail.rc                 rc.bsdextended
bluetooth               make.conf               rc.conf
crontab                 manpath.config          rc.d
csh.cshrc               manpath.config.bak      rc.firewall
csh.login               manpath.config.bak.xorg rc.firewall6
csh.logout              master.passwd           rc.initdiskless
...
hosts                   passwd                  snmpd.config
hosts.allow             pccard_ether            spwd.db
hosts.equiv             periodic                ssh
hosts.lpd               periodic.conf           ssl
inetd.conf              pf.conf                 sysctl.conf
isdn                    pf.os                   syslog.conf
lilalo                  phones                  termcap
localtime               portsnap.conf           ttys
locate.rc               ppp                     usbd.conf
login.access            printcap                wall_cmos_clock
20:52:35
#:q
X11                     login.conf              profile
aliases                 login.conf.db           protocols
amd.map                 mac.conf                pwd.db
apmd.conf               mail                    rc
auth.conf               mail.rc                 rc.bsdextended
bluetooth               make.conf               rc.conf
crontab                 manpath.config          rc.d
csh.cshrc               manpath.config.bak      rc.firewall
csh.login               manpath.config.bak.xorg rc.firewall6
csh.logout              master.passwd           rc.initdiskless
...
hosts                   passwd                  snmpd.config
hosts.allow             pccard_ether            spwd.db
hosts.equiv             periodic                ssh
hosts.lpd               periodic.conf           ssl
inetd.conf              pf.conf                 sysctl.conf
isdn                    pf.os                   syslog.conf
lilalo                  phones                  termcap
localtime               portsnap.conf           ttys
locate.rc               ppp                     usbd.conf
login.access            printcap                wall_cmos_clock
20:52:38
#cd /

20:52:38
#cd /

20:52:51
#ls
.cshrc          boot            etc             mnt             sys
.mozilla        cdrom           home            moused.core     tmp
.profile        compat          lib             proc            usr
.snap           dev             libexec         rescue          var
COPYRIGHT       dist            log             root            xdm.core
bin             entropy         media           sbin
20:52:51
#ls
.cshrc          boot            etc             mnt             sys
.mozilla        cdrom           home            moused.core     tmp
.profile        compat          lib             proc            usr
.snap           dev             libexec         rescue          var
COPYRIGHT       dist            log             root            xdm.core
bin             entropy         media           sbin
20:52:59
#cd tmp

20:52:59
#cd tmp

20:53:03
#ls
.ICE-unix                       .XautheyDnAo
.X0-lock                        .XauthflQHoq
.X11-unix                       .XauthhW8Fok
.X2-lock                        .XauthhekNwY
.XIM-unix                       .XauthmcezOP
.Xauth7nmoqG                    .Xauthroljgq
.Xauth8A9uGq                    .XauthuPKlB7
.XauthCuihBu                    .font-unix
.XauthEWHAR4                    .snap
.XauthMzhkdv                    after
.XauthQuGEGG                    before
.XauthRnqMTi                    fam-root
.XauthYkDtVP                    fam-user
.XauthbvkzHd                    l3-saved-3104.13332.27493
.XauthcOXb4t                    lilalo-install-temp-1212
.XauthdZ4p4V                    lilalo-install-temp-1241
.XauthdlWfzv                    xinetd.conf
20:53:03
#ls
.ICE-unix                       .XautheyDnAo
.X0-lock                        .XauthflQHoq
.X11-unix                       .XauthhW8Fok
.X2-lock                        .XauthhekNwY
.XIM-unix                       .XauthmcezOP
.Xauth7nmoqG                    .Xauthroljgq
.Xauth8A9uGq                    .XauthuPKlB7
.XauthCuihBu                    .font-unix
.XauthEWHAR4                    .snap
.XauthMzhkdv                    after
.XauthQuGEGG                    before
.XauthRnqMTi                    fam-root
.XauthYkDtVP                    fam-user
.XauthbvkzHd                    l3-saved-3104.13332.27493
.XauthcOXb4t                    lilalo-install-temp-1212
.XauthdZ4p4V                    lilalo-install-temp-1241
.XauthdlWfzv                    xinetd.conf
20:53:05
#vim xinetd.conf
20:53:05
#vim xinetd.conf
20:53:21
#cp /etc/inetd.conf >>
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
20:53:21
#cp /etc/inetd.conf >>
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
20:53:39
#cd /

20:53:39
#cd /

20:53:57
#cd /etc/

20:53:57
#cd /etc/

20:54:05
#vim inetd.conf
20:54:05
#vim inetd.conf
20:55:03
#cp /etc/inetd.conf >> /tmp/xinetd.conf
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
20:55:03
#cp /etc/inetd.conf >> /tmp/xinetd.conf
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
20:55:40
#cp inetd.conf >> inetd1.conf
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
20:55:40
#cp inetd.conf >> inetd1.conf
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-lpv] source_file ... target_directory
20:56:16
#man cp
20:56:16
#man cp
20:56:44
#cp /etc/inetd.conf /tmp/xinetd.conf

20:56:44
#cp /etc/inetd.conf /tmp/xinetd.conf

20:56:54
#rm inetd1.conf

20:56:54
#rm inetd1.conf

20:57:12
#ls
X11                     login.conf              profile
aliases                 login.conf.db           protocols
amd.map                 mac.conf                pwd.db
apmd.conf               mail                    rc
auth.conf               mail.rc                 rc.bsdextended
bluetooth               make.conf               rc.conf
crontab                 manpath.config          rc.d
csh.cshrc               manpath.config.bak      rc.firewall
csh.login               manpath.config.bak.xorg rc.firewall6
csh.logout              master.passwd           rc.initdiskless
...
hosts                   passwd                  snmpd.config
hosts.allow             pccard_ether            spwd.db
hosts.equiv             periodic                ssh
hosts.lpd               periodic.conf           ssl
inetd.conf              pf.conf                 sysctl.conf
isdn                    pf.os                   syslog.conf
lilalo                  phones                  termcap
localtime               portsnap.conf           ttys
locate.rc               ppp                     usbd.conf
login.access            printcap                wall_cmos_clock
20:57:12
#ls
X11                     login.conf              profile
aliases                 login.conf.db           protocols
amd.map                 mac.conf                pwd.db
apmd.conf               mail                    rc
auth.conf               mail.rc                 rc.bsdextended
bluetooth               make.conf               rc.conf
crontab                 manpath.config          rc.d
csh.cshrc               manpath.config.bak      rc.firewall
csh.login               manpath.config.bak.xorg rc.firewall6
csh.logout              master.passwd           rc.initdiskless
...
hosts                   passwd                  snmpd.config
hosts.allow             pccard_ether            spwd.db
hosts.equiv             periodic                ssh
hosts.lpd               periodic.conf           ssl
inetd.conf              pf.conf                 sysctl.conf
isdn                    pf.os                   syslog.conf
lilalo                  phones                  termcap
localtime               portsnap.conf           ttys
locate.rc               ppp                     usbd.conf
login.access            printcap                wall_cmos_clock
20:57:15
#xconv < /etc/inetd.conf > /usr/local/etc/xinetd.conf

20:57:15
#xconv < /etc/inetd.conf > /usr/local/etc/xinetd.conf

20:58:23
#mkdir /usr/local/etc/xinetd.d

20:58:23
#mkdir /usr/local/etc/xinetd.d

20:59:04
#vim /usr/local/etc/xinetd.conf
--- /tmp/l3-saved-1872.15990.20058	2009-07-31 21:59:34.000000000 +0300
+++ /usr/local/etc/xinetd.conf	2009-07-31 22:04:02.000000000 +0300
@@ -46,3 +46,5 @@
 	server_args = Xvnc -inetd -query localhost -depth 24 -geometry 1200x900 SecurityTypes=none 
 }
 
+#
+includedir /usr/local/etc/xinetd.d
20:59:04
#vim /usr/local/etc/xinetd.conf
--- /tmp/l3-saved-1872.15990.20058	2009-07-31 21:59:34.000000000 +0300
+++ /usr/local/etc/xinetd.conf	2009-07-31 22:04:02.000000000 +0300
@@ -46,3 +46,5 @@
 	server_args = Xvnc -inetd -query localhost -depth 24 -geometry 1200x900 SecurityTypes=none 
 }
 
+#
+includedir /usr/local/etc/xinetd.d
21:04:02
#vim /usr/local/etc/x
21:04:02
#vim /usr/local/etc/xinetd.conf
21:04:02
#vim /usr/local/etc/x
21:04:02
#vim /usr/local/etc/xinetd.conf
21:07:31
#pwd
/etc
21:07:31
#pwd
/etc
21:07:52
#cd /usr/local/etc/xinetd.d

21:07:52
#cd /usr/local/etc/xinetd.d

21:08:12
#ls

21:08:12
#ls

21:09:47
#ls
xinetd.vnc
21:09:47
#ls
xinetd.vnc
21:09:49
#vim xinetd.vnc
--- /tmp/l3-saved-1872.7920.21498	2009-07-31 22:09:56.000000000 +0300
+++ xinetd.vnc	2009-07-31 22:10:59.000000000 +0300
@@ -8,33 +8,6 @@
 # on how to properly configure xinetd.
 
 
-# The defaults section sets some information for all services
-defaults
-{
-	#The maximum number of requests a particular service may handle
-	# at once.
-	instances   = 25
-
-	# The type of logging.  This logs to a file that is specified.
-	# Another option is: SYSLOG syslog_facility [syslog_level]
-	log_type    = FILE /var/log/servicelog
-
-	# What to log when the connection succeeds.
-	# PID logs the pid of the server processing the request.
-	# HOST logs the remote host's ip address.
-	# USERID logs the remote user (using RFC 1413)
-	# EXIT logs the exit status of the server.
-	# DURATION logs the duration of the session.
-	log_on_success = HOST PID
-
-	# What to log when the connection fails.  Same options as above
-	log_on_failure = HOST
-
-	# The maximum number of connections a specific IP address can
-	# have to a specific service.  
-	per_source  = 5
-}
-
 service vnc1
 {
 	flags       = NAMEINARGS
21:09:49
#vim xinetd.vnc
--- /tmp/l3-saved-1872.7920.21498	2009-07-31 22:09:56.000000000 +0300
+++ xinetd.vnc	2009-07-31 22:10:59.000000000 +0300
@@ -8,33 +8,6 @@
 # on how to properly configure xinetd.
 
 
-# The defaults section sets some information for all services
-defaults
-{
-	#The maximum number of requests a particular service may handle
-	# at once.
-	instances   = 25
-
-	# The type of logging.  This logs to a file that is specified.
-	# Another option is: SYSLOG syslog_facility [syslog_level]
-	log_type    = FILE /var/log/servicelog
-
-	# What to log when the connection succeeds.
-	# PID logs the pid of the server processing the request.
-	# HOST logs the remote host's ip address.
-	# USERID logs the remote user (using RFC 1413)
-	# EXIT logs the exit status of the server.
-	# DURATION logs the duration of the session.
-	log_on_success = HOST PID
-
-	# What to log when the connection fails.  Same options as above
-	log_on_failure = HOST
-
-	# The maximum number of connections a specific IP address can
-	# have to a specific service.  
-	per_source  = 5
-}
-
 service vnc1
 {
 	flags       = NAMEINARGS
21:10:59
#ls
xinetd.vnc
21:10:59
#ls
xinetd.vnc
21:11:17
#ls

21:11:17
#ls
xinetd.users    xinetd.vnc
21:11:17
#ls

21:11:17
#ls
xinetd.users    xinetd.vnc
21:11:20
#vim xinetd.
21:11:20
#vim xinetd.
21:11:20
#vim xinetd.

Статистика

Время первой команды журнала20:40:03 2009- 7-31
Время последней команды журнала21:11:20 2009- 7-31
Количество командных строк в журнале101
Процент команд с ненулевым кодом завершения, %11.88
Процент синтаксически неверно набранных команд, % 0.00
Суммарное время работы с терминалом *, час 0.52
Количество командных строк в единицу времени, команда/мин 3.23
Частота использования команд
ls34|=============================| 29.06%
vim19|================| 16.24%
cd16|=============| 13.68%
cp10|========| 8.55%
>6|=====| 5.13%
ping4|===| 3.42%
xinetd.conf4|===| 3.42%
mkdir2|=| 1.71%
pwd2|=| 1.71%
man2|=| 1.71%
:q2|=| 1.71%
rm2|=| 1.71%
make2|=| 1.71%
inetd1.conf2|=| 1.71%
xconv2|=| 1.71%
killall2|=| 1.71%
/etc/inetd.conf2|=| 1.71%
/usr/local/etc/xinetd.conf2|=| 1.71%
inetd.conf2|=| 1.71%
____
*) Интервалы неактивности длительностью 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$