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

Содержание

Журнал

Четверг (05/20/10)

/dev/pts/0
15:48:08
$ssh 192.168.16.211 -l root
root@192.168.16.211's password:
Last login: Thu May 20 17:48:35 2010
Linux debian1 2.6.18-6-686 #1 SMP Sat Dec 27 09:31:05 UTC 2008 i686
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian1:~# ls -l /usr/src/
итого 66124
...
debian1:/usr/src/linux-2.6.34# Write failed: Broken pipe
title           Debian GNU/Linux, kernel 2.6.18-6-686
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro vga=792
initrd          /boot/initrd.img-2.6.18-6-686
savedefault
title           Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode)
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro single
initrd          /boot/initrd.img-2.6.18-6-686

Пятница (05/21/10)

08:48:33
$ls -l /lib/modules/
итого 4
drwxr-xr-x 3 root root 4096 Апр 12 21:56 2.6.26-2-xen-686
08:48:43
$modinfo 3c59x
l3script: modinfo: команда не найдена
08:48:56
$sudo modinfo 3c59x
[sudo] password for user:
filename:       /lib/modules/2.6.26-2-xen-686/kernel/drivers/net/3c59x.ko
license:        GPL
description:    3Com 3c59x/3c9xx ethernet driver
author:         Donald Becker <becker@scyld.com>
alias:          pci:v000010B7d00009210sv*sd*bc*sc*i*
alias:          pci:v000010B7d00009056sv*sd*bc*sc*i*
alias:          pci:v000010B7d00001202sv*sd*bc*sc*i*
alias:          pci:v000010B7d00001201sv*sd*bc*sc*i*
alias:          pci:v000010B7d00009201sv*sd*bc*sc*i*
...
parm:           enable_wol:3c59x: Turn on Wake-on-LAN for adapter(s) (0-1) (array of int)
parm:           global_enable_wol:3c59x: same as enable_wol, but applies to all NICs if enable_wol is unset (int)
parm:           rx_copybreak:3c59x copy breakpoint for copy-only-tiny-frames (int)
parm:           max_interrupt_work:3c59x maximum events handled per interrupt (int)
parm:           compaq_ioaddr:3c59x PCI I/O base address (Compaq BIOS problem workaround) (int)
parm:           compaq_irq:3c59x PCI IRQ number (Compaq BIOS problem workaround) (int)
parm:           compaq_device_id:3c59x PCI device ID (Compaq BIOS problem workaround) (int)
parm:           watchdog:3c59x transmit timeout in milliseconds (int)
parm:           global_use_mmio:3c59x: same as use_mmio, but applies to all NICs if options is unset (int)
parm:           use_mmio:3c59x: use memory-mapped PCI I/O resource (0-1) (array of int)
08:49:07
$sudo modinfo 3c59x | less
/dev/pts/11
08:49:26
$screen -x
/dev/pts/0
08:53:02
$sudo modinfo 3c59x | less
08:55:51
$lsmod
Module                  Size  Used by
ipv6                  236644  14
fuse                   44860  1
ext3                  106664  1
jbd                    43092  1 ext3
mbcache                 8260  1 ext3
thermal_sys            11624  0
08:56:00
$sudo modinfo jbd | less
08:56:28
$sudo modinfo jbd | less
08:56:33
$sudo modinfo mbcache | less
09:00:06
$sudo modinfo 3c59x | head -1 | awk '{print $2}'
/lib/modules/2.6.26-2-xen-686/kernel/drivers/net/3c59x.ko
09:01:16
$dmesg | tail
[247902.482945] evince[6211]: segfault at 10 ip 08061c30 sp bfffde70 error 4 in evince[8048000+4f000]
[247927.802881] evince[6226]: segfault at 10 ip 08061c30 sp bfffe6a0 error 4 in evince[8048000+4f000]
[247940.639214] evince[6228]: segfault at 10 ip 08061c30 sp bfffd160 error 4 in evince[8048000+4f000]
[335250.938466] evince[12621]: segfault at 10 ip 08061c30 sp bfffd650 error 4 in evince[8048000+4f000]
[505555.093749] clocksource/0: Time went backwards: ret=9cf68a12e860c delta=-18379638 shadow=9cf689d208ede offset=5267d8b
[567472.871979] 3c59x: Unknown symbol mii_ethtool_sset
[567472.872189] 3c59x: Unknown symbol mii_check_media
[567472.872387] 3c59x: Unknown symbol mii_nway_restart
[567472.872573] 3c59x: Unknown symbol generic_mii_ioctl
[567472.872643] 3c59x: Unknown symbol mii_ethtool_gset
09:01:24
$lsmod
Module                  Size  Used by
ipv6                  236644  14
fuse                   44860  1
ext3                  106664  1
jbd                    43092  1 ext3
mbcache                 8260  1 ext3
thermal_sys            11624  0
09:02:03
$modinfo mii | head -1
                  sudo insmod `sudo modinfo 3c59x | head -1 | awk '{print $2}'`
09:02:07
$ls mod
ls: невозможно получить доступ к mod: Нет такого файла или каталога
09:02:11
$lsmod
Module                  Size  Used by
3c59x                  36840  0
mii                     5664  1 3c59x
ipv6                  236644  14
fuse                   44860  1
ext3                  106664  1
jbd                    43092  1 ext3
mbcache                 8260  1 ext3
thermal_sys            11624  0
09:02:13
$lsmod -h
Usage: lsmod
09:02:45
$sudo modprobe -r 3c59x

прошло 63 минуты
10:06:34
$sudo /etc/crontab
[sudo] password for user:
sudo: /etc/crontab: command not found
10:06:48
$sudo vim /etc/crontab
10:07:54
$ 18

10:09:34
$~

10:09:36
$sudo vim /etc/crontab
10:10:27
$date
Fri May 21 11:10:29 EEST 2010
10:11:03
$sudo vim /etc/crontab
10:12:50
$crontab -e
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"crontab.kdQuuG/crontab" 2L, 68C written
crontab: installing new crontab
10:15:02
$su -
Password:
l3-agent is already running: pid=1155; pidfile=/root/.lilalo/l3-agent.pid
root@debian4:~# l3script
10:15:18
#grep -r logger /var/spool/cron/
/var/spool/cron/crontabs/user:* * * * * logger -p emerg USER_CRONTAB
10:15:28
#vim /var/spool/cron/crontabs/user
10:16:11
#~

10:16:26
#vim /etc/cron
10:16:26
#vim /etc/cron.deny
10:17:18
#~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/cron.deny" [Новый] 0L, 0C записано
10:17:23
#vim /etc/cron.deny
10:17:28
#~

10:17:32
#vim /etc/cron.deny
10:17:45
#exit
exit
root@debian4:~# exit
logout
10:17:52
$crontab -e
You (user) are not allowed to use this program (crontab)
See crontab(1) for more information
10:17:56
$sudo vim /etc/cron.allow
10:18:15
$crontab -e
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
No modification made
10:18:30
$apropos syslog
logger (1)           - a shell command interface to the syslog(3) system log ...
rsyslog.conf (5)     - rsyslogd(8) configuration file
rsyslogd (8)         - reliable and extended syslogd
syslog (2)           - read and/or clear kernel message ring buffer; set cons...
syslog (3)           - send messages to the system logger
vsyslog (3)          - send messages to the system logger
прошло 25 минут
10:44:06
$vim /etc/rsyslog.conf
10:51:40
$less /var/log/auth.log
10:51:49
$sudo less /var/log/auth.log
10:52:08
$vim /etc/ssh/sshd_config
10:53:04
$ 61 lpr.* -/var/log/lpr.log
 11 HostKey /etc/ssh/ssh_host_rsa_key
 12 HostKey /etc/ssh/ssh_host_dsa_key
 13 #Privilege Separation is turned on for security
 14 UsePrivilegeSeparation yes
 15 c/ssh/sshd_config" [readonly] 86L, 2453C
 16 # Lifetime and size of ephemeral version 1 server key
 17 KeyRegenerationInterval 3600
 18 ServerKeyBits 768
 19
 20 # Logging
 21 SyslogFacility AUTH
10:55:33
$ 22 LogLevel INFO
logcheck/       login.defs      logrotate.conf  logrotate.d/
10:55:33
$vim /etc/logrotate.conf
10:57:20
$vim /etc/logrotate.d/dpkg
10:57:58
$~ {
logrotate 3.7.8 - Copyright (C) 1995-2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License
Usage: logrotate [-dfv?] [-d|--debug] [-f|--force] [-m|--mail=command]
        [-s|--state=statefile] [-v|--verbose] [-?|--help] [--usage]
        [OPTION...] <configfile>
10:58:12
$sudo logrotate -f /etc/logrotate.conf

10:58:20
$ls -l /var/log/
total 1148
drwxr-xr-x 2 root root   4096 May 21 11:58 ConsoleKit
drwxr-xr-x 2 root root   4096 May 21 11:58 apt
-rw-r----- 1 root adm       0 May 21 11:58 auth.log
-rw-r----- 1 root adm  106380 May 21 11:58 auth.log.1
-rw-r----- 1 root adm    1639 May 16 09:25 auth.log.2.gz
-rw-r----- 1 root adm      31 Apr 13 00:43 boot
-rw-r--r-- 1 root root 290990 Apr 13 00:43 bootstrap.log
-rw-rw---- 1 root utmp      0 May 21 11:58 btmp
-rw-rw---- 1 root utmp   1536 May 18 12:59 btmp.1
...
-rw-r----- 1 root adm     452 May 20 09:25 syslog.3.gz
-rw-r----- 1 root adm     635 May 19 09:25 syslog.4.gz
-rw-r----- 1 root adm     598 May 18 09:25 syslog.5.gz
-rw-r----- 1 root adm     442 May 17 09:25 syslog.6.gz
-rw-r----- 1 root adm    8372 May 16 09:25 syslog.7.gz
-rw-r----- 1 root adm       0 May 21 11:58 user.log
-rw-r----- 1 root adm     207 May 21 11:16 user.log.1
-rw-r----- 1 root adm      84 Apr 13 01:18 user.log.2.gz
-rw-rw-r-- 1 root utmp      0 May 21 11:58 wtmp
-rw-rw-r-- 1 root utmp  86400 May 21 10:53 wtmp.1
прошло >2 часов
13:22:36
$sudo dpkg -l
[sudo] password for user:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  adduser        3.112          add and remove users and groups
ii  alacarte       0.12.4-2       easy GNOME menu editing tool
ii  app-install-da 2010.01.31     Application Installer Data Files
ii  apt            0.7.25.3       Advanced front-end for dpkg
...
ii  xserver-xorg-v 1:0.2.0-4      X.Org X server -- Video 4 Linux display driv
ii  xserver-xorg-v 1:2.3.0-1      X.Org X server -- VESA display driver
ii  xserver-xorg-v 1:10.16.9-1    X.Org X server -- VMware display driver
ii  xserver-xorg-v 1:1.2.3-1      X.Org X server -- Voodoo display driver
ii  xsltproc       1.1.26-2       XSLT command line processor
ii  xterm          256-1          X terminal emulator
ii  xulrunner-1.9. 1.9.1.9-7      XUL + XPCOM application runner
ii  yelp           2.28.0+webkit- Help browser for GNOME
ii  zenity         2.28.0-2       Display graphical dialog boxes from shell sc
ii  zlib1g         1:1.2.3.4.dfsg compression library - runtime
13:22:51
$sudo dpkg -l | grep xorg
ii  xserver-xorg                         1:7.5+5                    the X.Org X server
ii  xserver-xorg-core                    2:1.7.6-1                  Xorg X server - core server
ii  xserver-xorg-input-all               1:7.5+5                    the X.Org X server -- input driver metapacka
ii  xserver-xorg-input-evdev             1:2.3.2-4                  X.Org X server -- evdev input driver
ii  xserver-xorg-input-synaptics         1.2.1-1                    Synaptics TouchPad driver for X.Org server
ii  xserver-xorg-input-wacom             0.10.3+20100109-1          X.Org X server -- Wacom input driver
ii  xserver-xorg-video-all               1:7.5+5                    the X.Org X server -- output driver metapack
ii  xserver-xorg-video-apm               1:1.2.2-1                  X.Org X server -- APM display driver
ii  xserver-xorg-video-ark               1:0.7.2-1                  X.Org X server -- ark display driver
ii  xserver-xorg-video-ati               1:6.12.6-1                 X.Org X server -- ATI display driver wrapper
...
ii  xserver-xorg-video-siliconmotion     1:1.7.3-1                  X.Org X server -- SiliconMotion display driv
ii  xserver-xorg-video-sis               1:0.10.2-2                 X.Org X server -- SiS display driver
ii  xserver-xorg-video-sisusb            1:0.9.3-1                  X.Org X server -- SiS USB display driver
ii  xserver-xorg-video-tdfx              1:1.4.3-1                  X.Org X server -- tdfx display driver
ii  xserver-xorg-video-trident           1:1.3.3-1                  X.Org X server -- Trident display driver
ii  xserver-xorg-video-tseng             1:1.2.3-1                  X.Org X server -- Tseng display driver
ii  xserver-xorg-video-v4l               1:0.2.0-4                  X.Org X server -- Video 4 Linux display driv
ii  xserver-xorg-video-vesa              1:2.3.0-1                  X.Org X server -- VESA display driver
ii  xserver-xorg-video-vmware            1:10.16.9-1                X.Org X server -- VMware display driver
ii  xserver-xorg-video-voodoo            1:1.2.3-1                  X.Org X server -- Voodoo display driver
13:23:06
$dpkg -L console-cyrillyc
Package `console-cyrillyc' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
13:23:29
$dpkg -L console-cyrilyc
Package `console-cyrilyc' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
13:23:35
$dpkg -L console-cyrilic
Package `console-cyrilic' is not installed.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
13:23:37
$. /etc/bash_completion

13:23:43
$sudo dpkg -L console-common
/.
/etc
/etc/console
/etc/init.d
/etc/init.d/keymap.sh
/usr
/usr/sbin
/usr/sbin/install-keymap
/usr/bin
/usr/bin/kbd-config
...
/usr/share/doc/console-common/TODO
/usr/share/console
/usr/share/console/ps2-to-riscpc
/usr/share/console/lists
/usr/share/console/lists/keymaps
/usr/share/console/getkmapchoice.pl
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/kbd-config.8.gz
/usr/share/man/man8/install-keymap.8.gz
13:23:52
$dokg -S /etc/fstab
l3script: dokg: command not found
13:24:34
$dpkg -S /etc/fstab
dpkg: /etc/fstab not found.
13:24:44
$dpkg -S /etc/
Display all 161 possibilities? (y or n)
13:24:44
$dpkg -S /bin/
Display all 112 possibilities? (y or n)
bash            dumpkeys        mktemp          sh
bunzip2         echo            more            sh.distrib
bzcat           ed              mount           sleep
bzcmp           egrep           mountpoint      stty
bzdiff          false           mt              su
bzegrep         fgconsole       mt-gnu          sync
bzexe           fgrep           mv              tailf
bzfgrep         fuser           nano            tar
bzgrep          grep            nc              tempfile
...
cp              lessfile        ps              zcat
cpio            lesskey         pwd             zcmp
dash            lesspipe        rbash           zdiff
date            ln              readlink        zegrep
dd              loadkeys        rm              zfgrep
df              login           rmdir           zforce
dir             ls              rnano           zgrep
dmesg           lsmod           run-parts       zless
dnsdomainname   mkdir           sed             zmore
domainname      mknod           setfont         znew
13:24:44
$dpkg -S /bin/ip
iproute: /bin/ip
13:25:09
$dpkg -S /sbin/iptables
iptables: /sbin/iptables
13:25:17
$cat /etc/apt/sources.list
deb http://10.0.35.1:9999/debian squeeze main contrib non-free
#deb http://debian.org.ua/debian squeeze main contrib non-free
deb http://security.debian.org/ testing/updates main
13:25:42
$sudo apt-get update
Get:1 http://10.0.35.1 squeeze Release.gpg [835B]
Hit http://security.debian.org testing/updates Release.gpg
Hit http://security.debian.org testing/updates Release
Get:2 http://10.0.35.1 squeeze Release [89.5kB]
Ign http://security.debian.org testing/updates/main Packages/DiffIndex
Hit http://security.debian.org testing/updates/main Packages
Get:3 http://10.0.35.1 squeeze/main Packages/DiffIndex [2038B]
Get:4 http://10.0.35.1 squeeze/contrib Packages/DiffIndex [2023B]
Get:5 http://10.0.35.1 squeeze/non-free Packages/DiffIndex [2023B]
Get:6 http://10.0.35.1 squeeze/main 2010-05-18-1548.42.pdiff [1420B]
...
Get:28 http://10.0.35.1 squeeze/main 2010-05-20-0306.43.pdiff [16.7kB]
Get:29 http://10.0.35.1 squeeze/main 2010-05-20-0306.43.pdiff [16.7kB]
Get:30 http://10.0.35.1 squeeze/main 2010-05-20-1524.13.pdiff [3455B]
Get:31 http://10.0.35.1 squeeze/main 2010-05-20-1524.13.pdiff [3455B]
Get:32 http://10.0.35.1 squeeze/main 2010-05-20-1524.13.pdiff [3455B]
Get:33 http://10.0.35.1 squeeze/main 2010-05-21-0309.15.pdiff [17.6kB]
Get:34 http://10.0.35.1 squeeze/main 2010-05-21-0309.15.pdiff [17.6kB]
Get:35 http://10.0.35.1 squeeze/main 2010-05-21-0309.15.pdiff [17.6kB]
Fetched 159kB in 21s (7330B/s)
Reading package lists... Done
13:27:22
$apt-cache search popa3d
popa3d - A tiny POP3 daemon, designed with security as the primary goal
13:27:33
$apt-cache show popa3d
Package: popa3d
Priority: extra
Section: mail
Installed-Size: 152
Maintainer: Krzysztof Krzyżaniak (eloy) <eloy@debian.org>
Architecture: i386
Version: 1.0.2-6
Provides: pop3-server
Depends: libc6 (>= 2.0), libpam0g (>= 0.99.7.1)
Pre-Depends: debconf (>= 1.2.9) | debconf-2.0, adduser, update-inetd
...
SHA1: ac3e9362736f699df51fbbc2d8644aad8bc470b6
SHA256: 7a082af671975a9fd1783e5ce208426a02ed7a789475a45b3d69b9ab87d2e5e5
Description: A tiny POP3 daemon, designed with security as the primary goal
 popa3d is fast, small and secure pop3 daemon. It's written from scratch by
 Solar Designer for Owl (Openwall GNU/*/Linux).
 .
 Popa3d can work both in standalone or inetd mode.
 .
 For more information see DESIGN file.
Tag: interface::daemon, mail::pop, network::server, protocol::pop3, role::program, security::authentication, works-with::mail
13:28:37
$apt-cache show popa3d
Package: popa3d
Priority: extra
Section: mail
Installed-Size: 152
Maintainer: Krzysztof Krzyżaniak (eloy) <eloy@debian.org>
Architecture: i386
Version: 1.0.2-6
Provides: pop3-server
Depends: libc6 (>= 2.0), libpam0g (>= 0.99.7.1)
Pre-Depends: debconf (>= 1.2.9) | debconf-2.0, adduser, update-inetd
...
SHA1: ac3e9362736f699df51fbbc2d8644aad8bc470b6
SHA256: 7a082af671975a9fd1783e5ce208426a02ed7a789475a45b3d69b9ab87d2e5e5
Description: A tiny POP3 daemon, designed with security as the primary goal
 popa3d is fast, small and secure pop3 daemon. It's written from scratch by
 Solar Designer for Owl (Openwall GNU/*/Linux).
 .
 Popa3d can work both in standalone or inetd mode.
 .
 For more information see DESIGN file.
Tag: interface::daemon, mail::pop, network::server, protocol::pop3, role::program, security::authentication, works-with::mail
13:28:41
$apt-cache show popa3d | less
13:29:39
$sudo apt-get install popa3d
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  exim4 exim4-base exim4-config exim4-daemon-light heirloom-mailx
  libfile-copy-recursive-perl update-inetd
Suggested packages:
  mail-reader eximon4 exim4-doc-html exim4-doc-info gnutls-bin openssl
  libmail-spf-query-perl swaks
Recommended packages:
...
Setting up exim4-config (4.71-4) ...
Adding system-user for exim (v4)
Setting up exim4-base (4.71-4) ...
Setting up exim4-daemon-light (4.71-4) ...
Starting MTA: exim4.
Setting up exim4 (4.71-4) ...
Setting up heirloom-mailx (12.4-1.1+b1) ...
update-alternatives: error: no alternatives for mailx.
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode.
Processing triggers for menu ...
13:30:18
$nc
Cmd line: ^C
13:30:28
$nc 127.0.0.1 110
+OK
USER user
+OK
PASS password
+OK
LIST
+OK
.
QUIT
+OK
13:30:59
$dpkg -L popa3d
/.
/usr
/usr/sbin
/usr/sbin/popa3d
/usr/share
/usr/share/doc
/usr/share/doc/popa3d
/usr/share/doc/popa3d/changelog.gz
/usr/share/doc/popa3d/CONTACT
/usr/share/doc/popa3d/README.Debian
...
/usr/share/man/man8
/usr/share/man/man8/popa3d.8.gz
/etc
/etc/pam.d
/etc/pam.d/popa3d
/etc/init.d
/etc/init.d/popa3d
/var
/var/lib
/var/lib/popa3d
13:31:22
$dpkg -L popa3d > /tmp/popa3d_files

13:31:40
$apt-get remove popa3d
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
13:31:50
$sudo apt-get remove popa3d
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfile-copy-recursive-perl update-inetd
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  popa3d
0 upgraded, 0 newly installed, 1 to remove and 297 not upgraded.
After this operation, 156kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 56995 files and directories currently installed.)
Removing popa3d ...
Stopping pop daemon: popa3d.
Processing triggers for man-db ...
13:32:01
$cat /tmp/popa3d_files
/.
/usr
/usr/sbin
/usr/sbin/popa3d
/usr/share
/usr/share/doc
/usr/share/doc/popa3d
/usr/share/doc/popa3d/changelog.gz
/usr/share/doc/popa3d/CONTACT
/usr/share/doc/popa3d/README.Debian
...
/usr/share/man/man8
/usr/share/man/man8/popa3d.8.gz
/etc
/etc/pam.d
/etc/pam.d/popa3d
/etc/init.d
/etc/init.d/popa3d
/var
/var/lib
/var/lib/popa3d
13:32:06
$ls /etc/pam.d/po
polkit-1  popa3d
13:32:06
$ls /etc/pam.d/popa3d
/etc/pam.d/popa3d
13:32:19
$sudo apt-get install popa3d
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  popa3d
0 upgraded, 1 newly installed, 0 to remove and 297 not upgraded.
Need to get 0B/32.9kB of archives.
After this operation, 156kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package popa3d.
(Reading database ... 56984 files and directories currently installed.)
Unpacking popa3d (from .../popa3d_1.0.2-6_i386.deb) ...
Processing triggers for man-db ...
Setting up popa3d (1.0.2-6) ...
Starting pop daemon: popa3d.
13:33:00
$sudo apt-get --purge remove popa3d
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfile-copy-recursive-perl update-inetd
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  popa3d*
0 upgraded, 0 newly installed, 1 to remove and 297 not upgraded.
After this operation, 156kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 56995 files and directories currently installed.)
Removing popa3d ...
Stopping pop daemon: popa3d.
Purging configuration files for popa3d ...
Processing triggers for man-db ...
13:33:23
$ls /etc/pam.d/popa3d
ls: cannot access /etc/pam.d/popa3d: No such file or directory
13:33:26
$sudo apt-get --purge remove popa3d ^C

13:34:39
$gft
l3script: gft: command not found
13:37:05
$gtf
usage: gtf x y refresh [-v|--verbose] [-f|--fbmode] [-x|--xorgmode]
            x : the desired horizontal resolution (required)
            y : the desired vertical resolution (required)
      refresh : the desired refresh rate (required)
 -v|--verbose : enable verbose printouts (traces each step of the computation)
  -f|--fbmode : output an fbset(8)-style mode description
 -x|--xorgmode : output an Xorg-style mode description (this is the default
                if no mode description is requested)
13:37:11
$sudo apt-get install apt-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfile-copy-recursive-perl update-inetd
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  ca-certificates curl libapt-pkg-perl libconfig-file-perl libcurl3 libidn11
  liblist-moreutils-perl libssh2-1 openssl
The following NEW packages will be installed:
...
Running hooks in /etc/ca-certificates/update.d....done.
Setting up libcurl3 (7.20.1-2) ...
Setting up curl (7.20.1-2) ...
Setting up libconfig-file-perl (1.50-2) ...
Setting up libapt-pkg-perl (0.1.24) ...
Setting up liblist-moreutils-perl (0.25~02-1) ...
Setting up apt-file (2.3.3) ...
The system-wide cache is empty. You may want to run 'apt-file update'
as root to update the cache. You can also run 'apt-file update' as
normal user to use a cache in the user's home directory.
13:38:33
$sudo apt-file update
Downloading complete file http://10.0.35.1:9999/debian/dists/squeeze/Contents-i386.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 16.4M  100 16.4M    0     0   356k      0  0:00:47  0:00:47 --:--:--  400k
Ignoring source without Contents File:
  http://security.debian.org/dists/testing/updates/Contents-i386.gz
13:39:32
$apt-file /etc/squid3/squid.conf
apt-file version 2.3.3
(c) 2002 Sebastien J. Gross <sjg@debian.org>
apt-file [options] action [pattern]
Configuration options:
    --sources-list     -s  <file>       sources.list location
    --cache            -c  <dir>        Cache directory
    --architecture     -a  <arch>       Use specific architecture
    --cdrom-mount      -d  <cdrom>      Use specific cdrom mountpoint
    --non-interactive  -N               Skip schemes requiring user input
                                        (useful in cron jobs)
...
    --regexp           -x               pattern is a regular expression
    --verbose          -v               run in verbose mode
    --dummy            -y               run in dummy mode (no action)
    --help             -h               Show this help.
    --version          -V               Show version number
Action:
    update                              Fetch Contents files from apt-sources.
    search|find        <pattern>        Search files in packages
    list|show          <pattern>        List files in packages
    purge                               Remove cache files
13:39:51
$apt-file search /etc/squid3/squid.conf
squid3: /etc/squid3/squid.conf
13:40:07
$dpkg -l | grep squid

13:40:41
$apt-
apt-cache             apt-file              apt-mark
apt-cdrom             apt-ftparchive        apt-sortpkgs
apt-config            apt-get
apt-extracttemplates  apt-key
13:40:41
$apt-get
autoclean        clean            purge            upgrade
autoremove       dist-upgrade     remove
build-dep        dselect-upgrade  source
check            install          update
13:40:41
$apt-get install apt-
apt-build                 apt-howto-uk              apt-spy
apt-cacher                apt-index-watcher         apt-src
apt-cacher-ng             apt-listbugs              apt-transport-debtorrent
apt-cross                 apt-listchanges           apt-transport-https
apt-dater                 apt-mirror                apt-utils
apt-dater-dbg             apt-move                  apt-watch
apt-dater-host            apt-offline               apt-watch-backend
apt-doc                   apt-p2p                   apt-watch-gnome
apt-dpkg-ref              apt-rdepends              apt-watch-interface
apt-file                  apt-rpm-client            apt-xapian-index
apt-forktracer            apt-show-source           apt-zip
apt-howto-fr              apt-show-versions
13:40:41
$sudo apt-get install apt-mirror
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfile-copy-recursive-perl update-inetd
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
  apt-mirror
0 upgraded, 1 newly installed, 0 to remove and 297 not upgraded.
Need to get 15.1kB of archives.
After this operation, 127kB of additional disk space will be used.
Get:1 http://10.0.35.1 squeeze/main apt-mirror 0.4.8-1 [15.1kB]
Fetched 15.1kB in 0s (60.3kB/s)
Selecting previously deselected package apt-mirror.
(Reading database ... 57636 files and directories currently installed.)
Unpacking apt-mirror (from .../apt-mirror_0.4.8-1_all.deb) ...
Processing triggers for man-db ...
Setting up apt-mirror (0.4.8-1) ...
13:42:43
$man apt-mirror
13:43:20
$sudo apt-mirror --help
apt-mirror: invalid config file specified at /usr/bin/apt-mirror line 122.
13:43:26
$vim /etc/apt/
13:43:26
$vim /etc/apt/mirror.list

Файлы

  • /etc/apt/sources.list
  • /tmp/popa3d_files
  • /etc/apt/sources.list
    >
    deb http://10.0.35.1:9999/debian squeeze main contrib non-free
    #deb http://debian.org.ua/debian squeeze main contrib non-free
    deb http://security.debian.org/ testing/updates main
    
    /tmp/popa3d_files
    >
    /.
    /usr
    /usr/sbin
    /usr/sbin/popa3d
    /usr/share
    /usr/share/doc
    /usr/share/doc/popa3d
    /usr/share/doc/popa3d/changelog.gz
    /usr/share/doc/popa3d/CONTACT
    /usr/share/doc/popa3d/README.Debian
    /usr/share/doc/popa3d/VIRTUAL
    /usr/share/doc/popa3d/copyright
    /usr/share/doc/popa3d/changelog.Debian.gz
    /usr/share/doc/popa3d/DESIGN.gz
    /usr/share/man
    /usr/share/man/man8
    /usr/share/man/man8/popa3d.8.gz
    /etc
    /etc/pam.d
    /etc/pam.d/popa3d
    /etc/init.d
    /etc/init.d/popa3d
    /var
    /var/lib
    /var/lib/popa3d
    

    Статистика

    Время первой команды журнала15:48:08 2010- 5-20
    Время последней команды журнала13:43:26 2010- 5-21
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %26.73
    Процент синтаксически неверно набранных команд, % 2.97
    Суммарное время работы с терминалом *, час 1.45
    Количество командных строк в единицу времени, команда/мин 1.16
    Частота использования команд
    sudo28|===================| 19.72%
    vim15|==========| 10.56%
    dpkg14|=========| 9.86%
    apt-get11|=======| 7.75%
    modinfo9|======| 6.34%
    less8|=====| 5.63%
    ls6|====| 4.23%
    ~5|===| 3.52%
    lsmod4|==| 2.82%
    apt-cache4|==| 2.82%
    crontab3|==| 2.11%
    apt-file3|==| 2.11%
    grep3|==| 2.11%
    cat2|=| 1.41%
    head2|=| 1.41%
    nc2|=| 1.41%
    screen1|| 0.70%
    gtf1|| 0.70%
    apt-mirror1|| 0.70%
    man1|| 0.70%
    awk1|| 0.70%
    logrotate1|| 0.70%
    gft1|| 0.70%
    apt-1|| 0.70%
    dmesg1|| 0.70%
    .1|| 0.70%
    221|| 0.70%
    popa3d_files1|| 0.70%
    /etc/crontab1|| 0.70%
    611|| 0.70%
    dokg1|| 0.70%
    apropos1|| 0.70%
    tail1|| 0.70%
    modprobe1|| 0.70%
    181|| 0.70%
    ssh1|| 0.70%
    exit1|| 0.70%
    date1|| 0.70%
    su1|| 0.70%
    ____
    *) Интервалы неактивности длительностью 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$