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

Содержание

Журнал

Вторник (01/12/10)

/dev/ttyp8
15:33:48
#chmod +x case2

15:33:58
#./case2
[root@debian1:tmp]# ./case2
Press any key and then return
4
This is a digit
Press any key and then return
w45
This is a punct
15:34:08
#./case2
Press any key and then return
F
This is a latter
15:34:31
#vim case2
--- /tmp/l3-saved-2188.9684.9602	2010-01-12 16:34:52.000000000 +0200
+++ case2	2010-01-12 16:35:45.000000000 +0200
@@ -1,5 +1,7 @@
 #!/bin/bash
-echo "Press any key and then return"
+while [ "$Keypress" != "X" ]
+do
+echo "Press any key and then return, or X for Exit frem here"
 read Keypress
 case "$Keypress" in
 	[A-Z] ) echo "This is a latter";;
@@ -8,3 +10,4 @@
 	 *    ) echo "This is a punct";;
 
  esac
+ done
15:35:45
#./case2
Press any key and then return, or X for Exit frem here
15:36:02
#./case2
$
This is a punct
Press any key and then return, or X for Exit from here
.
This is a punct
Press any key and then return, or X for Exit from here
5
This is a digit
Press any key and then return, or X for Exit from here
X
This is a latter
15:36:14
#cat ./case2
#!/bin/bash
while [ "$Keypress" != "X" ]
do
echo "Press any key and then return, or X for Exit from here"
read Keypress
case "$Keypress" in
        [A-Z] ) echo "This is a latter";;
        [a-z] ) echo "This is a latter";;
        [0-9] ) echo "This is a digit";;
         *    ) echo "This is a punct";;
 esac
 done
15:36:53
#vim case2
--- /tmp/l3-saved-2188.21384.6865	2010-01-12 16:36:55.000000000 +0200
+++ case2	2010-01-12 16:37:09.000000000 +0200
@@ -2,7 +2,9 @@
 while [ "$Keypress" != "X" ]
 do
 echo "Press any key and then return, or X for Exit from here"
+echo off
 read Keypress
+echo on
 case "$Keypress" in
 	[A-Z] ) echo "This is a latter";;
 	[a-z] ) echo "This is a latter";;
15:37:17
#man bash
15:38:38
#abs guide
[root@debian1:tmp]# cat ./case2
#!/bin/bash
while [ "$Keypress" != "X" ]
do
echo "Press any key and then return, or X for Exit from here"
echo off
read Keypress
echo on
case "$Keypress" in
        [A-Z] ) echo "This is a latter";;
        [a-z] ) echo "This is a latter";;
        [0-9] ) echo "This is a digit";;
         *    ) echo "This is a punct";;
 esac
 done
15:40:34
#vim while1
15:40:44
#./while1
[root@debian1:tmp]# chmod +x while1
1
2
3
4
5
6
7
8
9
10
15:41:46
#vim while2
--- /tmp/l3-saved-2188.7488.10621	2010-01-12 16:41:47.000000000 +0200
+++ while2	2010-01-12 16:44:05.000000000 +0200
@@ -1 +1,9 @@
 #!/bin/bash
+while [ "$i" != end ]
+do
+echo "Please, give a value to variable or end to Exiting"
+read i
+echo "Variable #1 = $i"
+done
+exit 0
+
15:44:05
#chmod +x while2

15:44:17
#cat while2
[root@debian1:tmp]# ./while2
Please, give a value to variable or end to Exiting
weefrr
Variable #1 = weefrr
Please, give a value to variable or end to Exiting
sdf
Variable #1 = sdf
Please, give a value to variable or end to Exiting
end
Variable #1 = end
#!/bin/bash
while [ "$i" != end ]
do
echo "Please, give a value to variable or end to Exiting"
read i
echo "Variable #1 = $i"
done
exit 0
15:44:52
#cat while1
#!/bin/bash
A=0
while [ $A -lt 10 ]
do
A=$((A+1))
echo $A
done
15:45:45
#df -h
[root@debian1:tmp]# hostname
debian1
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             4.0G  1.2G  2.9G  29% /
tmpfs                 291M     0  291M   0% /lib/init/rw
udev                   10M   20K   10M   1% /dev
15:46:39
#kill -9 1255 5453
[root@debian1:tmp]# ps aux | grep l3
root      1255  0.5  1.5  13828  9164 ?        Ss   Jan09  21:10 l3-agent
user      5453  0.0  1.0  11064  6240 ?        Ss   Jan11   0:00 l3-agent
root     15068  0.0  0.0   1656   508 ttyp9    R+   16:46   0:00 grep l3
15:46:50
#ping xgu.ru
[root@debian1:tmp]# l3-agent
Removing stale pidfile
PING xgu.ru (212.26.146.51) 56(84) bytes of data.
64 bytes from chub.in (212.26.146.51): icmp_seq=5 ttl=56 time=51.7 ms
64 bytes from chub.in (212.26.146.51): icmp_seq=6 ttl=56 time=52.8 ms
--- xgu.ru ping statistics ---
6 packets transmitted, 2 received, 66% packet loss, time 5008ms
rtt min/avg/max/mdev = 51.790/52.342/52.894/0.552 ms
15:48:34
#l3pwd
[root@debian1:tmp]# date
Tue Jan 12 16:48:34 EET 2010
/users/11-01-2010/nt-ladm/debian1.net.nt/root
/dev/ttyp0
15:49:50
#last
user555  ttypb        localhost.locald Tue Jan 12 16:07 - 16:07  (00:00)
user     ttypb        localhost.locald Tue Jan 12 12:24 - 12:24  (00:00)
root     ttyp6        host219.net.nt   Tue Jan 12 10:55   still logged in
root     ttyp6        host219.net.nt   Tue Jan 12 10:18 - 10:54  (00:36)
root     ttype        debian.net.nt    Mon Jan 11 14:01   still logged in
root     ttypb        host203.net.nt   Mon Jan 11 13:59 - 17:59  (03:59)
user     ttypb        host203.net.nt   Mon Jan 11 12:32 - 12:32  (00:00)
root     ttypb        host203.net.nt   Mon Jan 11 10:18 - 12:31  (02:13)
root     ttyp6        debian.net.nt    Mon Jan 11 09:53 - 14:19  (04:25)
root     ttyp3        host150.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp2        host207.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp0        host150.net.nt   Mon Jan 11 08:19   still logged in
wtmp begins Mon Jan 11 08:19:48 2010
/dev/ttyp8
15:50:27
#l3
[root@debian1:tmp]# ps aux | grep l3
root     15084  0.2  1.4  10116  8376 ?        Ss   16:46   0:00 l3-agent
root     15126  0.0  0.0   1652   508 ttyp9    R+   16:50   0:00 grep l3
l3                 l3_fix_prompt      l3shot
l3-agent           l3_save_last_line  l3upload
l3-config          l3cd
l3_close_session   l3pwd
15:50:39
#l3upload ~/.lilalo/
[root@debian1:tmp]# l3upload
Usage:
l3upload <filename>
<filename> - name of the file to upload
Display all 134 possibilities? (y or n)
.report.dat
10051136943226131377-1263284292.info
10051136943226131377-1263284292.script
1022892042090028683-1243160474.info
1022892042090028683-1243160474.script
...
115222705270348897-1263190788_1263211788_bin_file.diff
115222705270348897-1263190788_1263212509_bin_file.diff
115222705270348897-1263190788_1263212520_tmp_file.diff
115222705270348897-1263190788_1263219092_root_.vimrc.diff
115222705270348897-1263190788_1263283826_etc_hosts.diff
115222705270348897-1263190788_1263287462_tmp_newfile.diff
115222705270348897-1263190788_1263298749_etc_squid_squid.conf.diff
115222705270348897-1263190788_1263302714_tmp_.diff
1243119821729523394-1263197461.info
1243119821729523394-1263197461.script
15:50:58
#curl
[root@debian1:tmp]# l3upload ~/.lilalo/*diff
Uploaded file name is 677112213284906291-1263196412_1263307858_115222705270348897-1263190788_1263202446_etc_passwd.diff
bash: curl: command not found
bash: curl: command not found
15:51:24
#apt-cache search curl | less
15:52:22
#apt-get update
[root@debian1:tmp]# sudo apt-get install curl
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  ca-certificates libcurl3 libidn11 openssl
The following NEW packages will be installed:
  ca-certificates curl libcurl3 libidn11 openssl
0 upgraded, 5 newly installed, 0 to remove and 55 not upgraded.
Need to get 1545kB of archives.
After unpacking 3690kB of additional disk space will be used.
...
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Get:1 http://debian.org.ua etch Release.gpg [1032B]
Get:2 http://debian.org.ua etch Release [67.8kB]
Ign http://debian.org.ua etch Release
Ign http://debian.org.ua etch/main Packages/DiffIndex
Get:3 http://debian.org.ua etch/main Packages [4282kB]
Fetched 4351kB in 1m37s (44.7kB/s)
Reading package lists... Done
W: GPG error: http://debian.org.ua etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
прошло 10 минут
16:03:18
#apt-get update
[root@debian1:tmp]# apt-get install debian-keyring
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  debian-keyring
0 upgraded, 1 newly installed, 0 to remove and 63 not upgraded.
Need to get 11.5MB of archives.
After unpacking 14.9MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  debian-keyring
...
Hit http://debian.org.ua etch Release
Err http://debian.org.ua etch Release
Get:2 http://debian.org.ua etch Release [67.8kB]
Ign http://debian.org.ua etch Release
Ign http://debian.org.ua etch/main Packages/DiffIndex
Hit http://debian.org.ua etch/main Packages
Fetched 68.8kB in 2s (29.4kB/s)
Reading package lists... Done
W: GPG error: http://debian.org.ua etch Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9AA38DCD55BE302B
W: You may want to run apt-get update to correct these problems
16:03:36
#apt-get update
[root@debian1:tmp]# apt-get install debian-archive-keyring
Reading package lists... Done
Building dependency tree... Done
The following packages will be upgraded:
  debian-archive-keyring
1 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
Need to get 12.8kB of archives.
After unpacking 4096B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  debian-archive-keyring
...
gpg: Total number processed: 6
gpg:               imported: 3  (RSA: 2)
gpg:              unchanged: 3
gpg: no ultimately trusted keys found
Get:1 http://debian.org.ua etch Release.gpg [1032B]
Hit http://debian.org.ua etch Release
Ign http://debian.org.ua etch/main Packages/DiffIndex
Hit http://debian.org.ua etch/main Packages
Fetched 1032B in 0s (1559B/s)
Reading package lists... Done
16:04:27
#l3upload ~/.lilalo/*diff
[root@debian1:tmp]# sudo apt-get install curl\
>
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  ca-certificates libcurl3 libidn11 openssl
The following NEW packages will be installed:
  ca-certificates curl libcurl3 libidn11 openssl
0 upgraded, 5 newly installed, 0 to remove and 62 not upgraded.
Need to get 1348kB/1560kB of archives.
...
Uploaded file name is 677112213284906291-1263196412_1263308673_115222705270348897-1263190788_1263202446_etc_passwd.diff
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /l3-upload was not found on this server.</p>
<hr>
<address>Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny2 with Suhosin-Patch proxy_html/3.0.0 mod_python/3.3.1 Python/2.5.2 Server at xgu.ru Port 80</address>
</body></html>
/dev/ttyp0
16:06:40
#lastlog
user154                                    **Никогда не входил в систему**
user155                                    **Никогда не входил в систему**
user156                                    **Никогда не входил в систему**
user157                                    **Никогда не входил в систему**
user158                                    **Никогда не входил в систему**
user159                                    **Никогда не входил в систему**
user160                                    **Никогда не входил в систему**
user161                                    **Никогда не входил в систему**
user162                                    **Никогда не входил в систему**
user163                                    **Никогда не входил в систему**
...
user591                                    **Никогда не входил в систему**
user592                                    **Никогда не входил в систему**
user593                                    **Никогда не входил в систему**
user594                                    **Никогда не входил в систему**
user595                                    **Никогда не входил в систему**
user596                                    **Никогда не входил в систему**
user597                                    **Никогда не входил в систему**
user598                                    **Никогда не входил в систему**
user599                                    **Никогда не входил в систему**
user600                                    **Никогда не входил в систему**
16:06:47
#logname
logname: регистрационное имя отсутствует
/dev/ttyp8
16:12:18
#ps aux | grep l3
[root@debian1:tmp]# ping xgu.ru
PING xgu.ru (212.26.146.51) 56(84) bytes of data.
64 bytes from chub.in (212.26.146.51): icmp_seq=1 ttl=56 time=8.41 ms
64 bytes from chub.in (212.26.146.51): icmp_seq=2 ttl=56 time=14.7 ms
64 bytes from chub.in (212.26.146.51): icmp_seq=3 ttl=56 time=41.5 ms
--- xgu.ru ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 8.415/21.554/41.547/14.368 ms
root     15084  0.1  1.4  10148  8408 ?        Ss   16:46   0:03 l3-agent
root     16341  0.0  0.0   1656   512 ttyp9    R+   17:18   0:00 grep l3
16:18:54
#l3-
[root@debian1:tmp]# kill -9 15084
l3-agent   l3-config
16:19:00
#date
[root@debian1:tmp]# l3-agent
Removing stale pidfile
Tue Jan 12 18:42:16 EET 2010

Среда (01/13/10)

07:56:04
#ping xgu.ru

07:56:17
#pinf 10.0.34
bash: pinf: command not found
07:56:22
#pinf 10.0.3.4
bash: pinf: command not found
07:56:24
#ping 10.0.3.4
PING 10.0.3.4 (10.0.3.4) 56(84) bytes of data.
64 bytes from 10.0.3.4: icmp_seq=1 ttl=63 time=0.806 ms
64 bytes from 10.0.3.4: icmp_seq=2 ttl=63 time=0.822 ms
--- 10.0.3.4 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.806/0.814/0.822/0.008 ms
прошло 53 минуты
08:50:06
#lynx
08:50:36
#lynx -dump nt.ua/doc/ip | grep MY
[root@debian1:tmp]# lynx -dump nt.ua/doc/ip
MY IP:77.123.184.14
Wed Jan 13 09:45:02 EET 2010
MY IP:77.123.184.14
08:52:49
#my_ip
77.123.184.14
08:53:44
#my_ip
[root@debian1:tmp]# unset -f my_ip
bash: my_ip: command not found
прошло 16 минут
/dev/ttyp0
09:10:09
#w
 10:54:33 up 3 days, 15:32,  7 users,  load average: 0,00, 0,00, 0,00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     ttyp0    host150.net.nt   Mon08    0.00s  2.05s  0.01s script -f -q /r
root     ttyp2    host207.net.nt   Mon09   25:13   1.30s  0.01s script -f -q /r
root     ttyp3    host150.net.nt   Mon09   44:29m  1.14s  0.02s script -f -q /r
root     ttyp6    host219.net.nt   Tue10   16:12   0.58s  0.01s script -f -q /r
root     ttyp8    :ttyp7:S.0       Mon09    3.00s  1.21s  0.06s script -f -q /r
root     ttypa    :ttyp7:S.1       Mon11   46:54   0.02s  0.02s script -f -q /r
root     ttype    debian.net.nt    Mon14    3.00s  0.77s  0.00s script -f -q /r
прошло 19 минут
/dev/ttyp8
09:29:32
#ls -l /etc/shadow
[root@debian1:tmp]# date
Wed Jan 13 10:29:32 EET 2010
-rw-r----- 1 root shadow 12966 Jan 12 16:07 /etc/shadow
09:34:02
#[root@fbsd3:~]# ls -ld /etc
[root@debian1:tmp]# ssh 192.168.16.23
Password:
Last login: Tue Jan 12 16:08:19 2010 from 192.168.16.1
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
...
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=16277; pidfile=/root/.lilalo/l3-agent.pid
drwxr-xr-x  19 root  wheel  2048 12 ÑÎ× 16:12 /etc
09:34:24
#[root@fbsd3:~]# ls -l
[root@fbsd3:~]# id
uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
total 420
-rw-------  1 root  wheel     467 24 ÉÀÌ 16:12 .ICEauthority
drwx------  2 root  wheel     512 24 ÉÀÌ 16:12 .Trash
-rw-------  1 root  wheel       0 24 ÉÀÌ 16:10 .Xauthority-n
-rw-------  1 root  wheel    3333 12 ÑÎ× 16:12 .bash_history
-rw-r--r--  1 root  wheel      19 24 ÉÀÌ 19:40 .bash_profile
-rw-r--r--  1 root  wheel     130 11 ÑÎ× 17:09 .bashrc
drwx------  3 root  wheel     512 24 ÉÀÌ 16:10 .config
...
drwxr-xr-x  2 root  wheel     512 28 ÍÁÒ  2008 .vnc
-rw-r--r--  1 root  wheel      26 24 ÉÀÌ 15:58 .xsession
-rw-------  1 root  wheel    3017 24 ÉÀÌ 16:12 .xsession-errors
-rw-------  1 root  wheel     599 24 ÉÀÌ 15:57 .xsmIk2fG7
drwxr-xr-x  2 root  wheel     512 24 ÉÀÌ 16:11 Desktop
-rw-r--r--  1 root  wheel    5160 28 ÍÁÒ  2008 install
-rw-------  1 root  wheel  312579 11 ÑÎ× 11:31 mbox
-rw-r--r--  1 root  wheel       0 24 ÉÀÌ 16:12 nautilus-debug-log.txt
-rwxr-xr-x  1 root  wheel     727  9 ÑÎ× 17:17 prepare-freebsd.sh
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
прошло 19 минут
09:53:58
#[root@fbsd3:~]# LANG=C
[root@fbsd3:~]# who
root             ttyp1    13 ÑÎ× 10:33 (192.168.16.1)
õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × /var/mail/root
09:54:03
#[root@fbsd3:~]# who
root             ttyp1    Jan 13 10:33 (192.168.16.1)
09:54:16
#[root@fbsd3:~]#
[root@fbsd3:~]# w
10:54AM  up 3 days, 15:35, 1 user, load averages: 0.00, 0.00, 0.00
USER             TTY      FROM              LOGIN@  IDLE WHAT
root             p1       192.168.16.1     10:33AM     - script -t 0 -q /ro
09:54:16
#[root@fbsd3:~]#

09:54:16
#[root@fbsd3:~]# lastb
bash: lastb: command not found
09:54:22
#[root@fbsd3:~]# ls -l /var/log/auth.log
[root@fbsd3:~]# ls -l /var/log/
Xorg.0.log        lpd-errs          messages.2.bz2    sendmail.st.4
Xorg.0.log.old    maillog           messages.3.bz2    sendmail.st.5
auth.log          maillog.0.bz2     mount.today       sendmail.st.6
cron              maillog.1.bz2     pf.today          setuid.today
cron.0.bz2        maillog.2.bz2     ppp.log           setuid.yesterday
cron.1.bz2        maillog.3.bz2     security          slip.log
debug.log         maillog.4.bz2     sendmail.st       userlog
dmesg.today       maillog.5.bz2     sendmail.st.0     wtmp
dmesg.yesterday   messages          sendmail.st.1     xdm.log
gdm/              messages.0.bz2    sendmail.st.2     xferlog
lastlog           messages.1.bz2    sendmail.st.3
-rw-------  1 root  wheel  9815 Jan 13 10:34 /var/log/auth.log
/dev/ttyp0
09:54:33
#lastb
btmp begins Sun Jan 10 06:25:22 2010
09:54:42
#last
user555  ttypb        localhost.locald Tue Jan 12 16:07 - 16:07  (00:00)
user     ttypb        localhost.locald Tue Jan 12 12:24 - 12:24  (00:00)
root     ttyp6        host219.net.nt   Tue Jan 12 10:55   still logged in
root     ttyp6        host219.net.nt   Tue Jan 12 10:18 - 10:54  (00:36)
root     ttype        debian.net.nt    Mon Jan 11 14:01   still logged in
root     ttypb        host203.net.nt   Mon Jan 11 13:59 - 17:59  (03:59)
user     ttypb        host203.net.nt   Mon Jan 11 12:32 - 12:32  (00:00)
root     ttypb        host203.net.nt   Mon Jan 11 10:18 - 12:31  (02:13)
root     ttyp6        debian.net.nt    Mon Jan 11 09:53 - 14:19  (04:25)
root     ttyp3        host150.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp2        host207.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp0        host150.net.nt   Mon Jan 11 08:19   still logged in
wtmp begins Mon Jan 11 08:19:48 2010
/dev/ttyp8
09:55:26
#[root@fbsd3:~]#
 sleeping 30 secs
Jul 24 11:24:43 fbsdvm sshd[847]: Accepted publickey for root from 192.168.1
6.254 port 37059 ssh2
Jul 24 11:28:32 fbsdvm sshd[741]: Server listening on :: port 22.
Jul 24 11:28:32 fbsdvm sshd[741]: Server listening on 0.0.0.0 port 22.
Jul 24 11:31:02 fbsdvm sshd[820]: Accepted publickey for root from 192.168.1
6.254 port 44253 ssh2
Jul 24 11:39:09 fbsdvm sshd[744]: Server listening on :: port 22.
Jul 24 11:39:09 fbsdvm sshd[744]: Server listening on 0.0.0.0 port 22.
Jul 24 11:39:26 fbsdvm sshd[821]: Accepted publickey for root from 192.168.1
...
Jan 11 17:04:41 fbsd3 sshd[17899]: Accepted keyboard-interactive/pam for root from 192.168.16.1 port 48495 ssh2
Jan 12 10:59:57 fbsd3 sshd[29936]: reverse mapping checking getaddrinfo for debian1.aes.net.nt [192.168.16.1] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 12 11:00:00 fbsd3 sshd[29936]: Accepted keyboard-interactive/pam for root from 192.168.16.1 port 47327 ssh2
Jan 12 14:28:59 fbsd3 sshd[31024]: reverse mapping checking getaddrinfo for debian1.aes.net.nt [192.168.16.1] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 12 14:29:02 fbsd3 sshd[31024]: Accepted keyboard-interactive/pam for root from 192.168.16.1 port 38436 ssh2
Jan 12 16:08:16 fbsd3 sshd[32135]: reverse mapping checking getaddrinfo for debian1.aes.net.nt [192.168.16.1] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 12 16:08:18 fbsd3 sshd[32135]: Accepted keyboard-interactive/pam for root from 192.168.16.1 port 37922 ssh2
Jan 12 16:12:18 fbsd3 sshd[33095]: Accepted keyboard-interactive/pam for user555 from 127.0.0.1 port 59371 ssh2
Jan 13 10:33:38 fbsd3 sshd[36396]: reverse mapping checking getaddrinfo for debian1.aes.net.nt [192.168.16.1] failed - POSSIBLE BREAK-IN ATTEMPT!
Jan 13 10:33:58 fbsd3 sshd[36396]: Accepted keyboard-interactive/pam for root from 192.168.16.1 port 40676 ssh2
09:55:26
#[root@fbsd3:~]#

09:55:27
#[root@fbsd3:~]#

09:55:43
#lastb
[root@fbsd3:~]# exit
exit
Connection to 192.168.16.23 closed.
btmp begins Sun Jan 10 06:25:22 2010
09:55:53
#[root@fbsd3:~]# last
[root@debian1:tmp]# ssh 192.168.16.23
Password:
last    Last login: Wed Jan 13 10:33:58 2010 from 192.168.16.1
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
...
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=16277; pidfile=/root/.lilalo/l3-agent.pid
last       lastcomm   lastlogin
09:55:53
#[root@fbsd3:~]# last
root             ttyp1    192.168.16.1     ÓÒ 13 ÑÎ× 10:55   still logged in
root             ttyp1    192.168.16.1     ÓÒ 13 ÑÎ× 10:33 - 10:55  (00:21)
user555          ttyp3    localhost        ×Ô 12 ÑÎ× 16:12 - 16:12  (00:00)
root             ttyp1    192.168.16.1     ×Ô 12 ÑÎ× 16:08 - 16:12  (00:04)
root             ttyp1    192.168.16.1     ×Ô 12 ÑÎ× 14:29 - 15:29  (01:00)
root             ttyp1    192.168.16.1     ×Ô 12 ÑÎ× 11:00 - 12:04  (01:04)
root             ttyp1    192.168.16.1     ÐÎ 11 ÑÎ× 17:04 - 17:10  (00:05)
root             ttyp1    192.168.16.1     ÐÎ 11 ÑÎ× 17:01 - 17:01  (00:00)
root             ttyp1    192.168.16.1     ÐÎ 11 ÑÎ× 17:00 - 17:00  (00:00)
root             ttyp1    192.168.16.1     ÐÎ 11 ÑÎ× 16:59 - 17:00  (00:01)
...
root             ttyv0                     ÓÂ 15 ÍÁÒ 18:09 - shutdown  (00:11)
reboot           ~                         ÓÂ 15 ÍÁÒ 18:09
root             ttyv0                     ÓÂ 15 ÍÁÒ 17:54 - 18:07  (00:12)
root             ttyv0                     ÓÂ 15 ÍÁÒ 17:53 - 17:54  (00:00)
reboot           ~                         ÓÂ 15 ÍÁÒ 17:53
shutdown         ~                         ÓÂ 15 ÍÁÒ 17:52
user             ttyv8    :0               ÓÂ 15 ÍÁÒ 17:06 - 17:07  (00:00)
root             ttyv0                     ÓÂ 15 ÍÁÒ 17:06 - shutdown  (00:46)
reboot           ~                         ÓÂ 15 ÍÁÒ 17:05
wtmp begins ÓÕÂÂÏÔÁ, 15 ÍÁÒÔÁ 2008 Ç. 17:05:55 (EET)
09:56:01
#[root@fbsd3:~]# last
[root@fbsd3:~]# LANG=C
root             ttyp1    192.168.16.1     Wed Jan 13 10:55   still logged in
root             ttyp1    192.168.16.1     Wed Jan 13 10:33 - 10:55  (00:21)
user555          ttyp3    localhost        Tue Jan 12 16:12 - 16:12  (00:00)
root             ttyp1    192.168.16.1     Tue Jan 12 16:08 - 16:12  (00:04)
root             ttyp1    192.168.16.1     Tue Jan 12 14:29 - 15:29  (01:00)
root             ttyp1    192.168.16.1     Tue Jan 12 11:00 - 12:04  (01:04)
root             ttyp1    192.168.16.1     Mon Jan 11 17:04 - 17:10  (00:05)
root             ttyp1    192.168.16.1     Mon Jan 11 17:01 - 17:01  (00:00)
root             ttyp1    192.168.16.1     Mon Jan 11 17:00 - 17:00  (00:00)
...
root             ttyv0                     Sat Mar 15 18:09 - shutdown  (00:11)
reboot           ~                         Sat Mar 15 18:09
root             ttyv0                     Sat Mar 15 17:54 - 18:07  (00:12)
root             ttyv0                     Sat Mar 15 17:53 - 17:54  (00:00)
reboot           ~                         Sat Mar 15 17:53
shutdown         ~                         Sat Mar 15 17:52
user             ttyv8    :0               Sat Mar 15 17:06 - 17:07  (00:00)
root             ttyv0                     Sat Mar 15 17:06 - shutdown  (00:46)
reboot           ~                         Sat Mar 15 17:05
wtmp begins Sat Mar 15 17:05:55 EET 2008
/dev/ttyp0
09:56:13
#lastlog
user154                                    **Никогда не входил в систему**
user155                                    **Никогда не входил в систему**
user156                                    **Никогда не входил в систему**
user157                                    **Никогда не входил в систему**
user158                                    **Никогда не входил в систему**
user159                                    **Никогда не входил в систему**
user160                                    **Никогда не входил в систему**
user161                                    **Никогда не входил в систему**
user162                                    **Никогда не входил в систему**
user163                                    **Никогда не входил в систему**
...
user591                                    **Никогда не входил в систему**
user592                                    **Никогда не входил в систему**
user593                                    **Никогда не входил в систему**
user594                                    **Никогда не входил в систему**
user595                                    **Никогда не входил в систему**
user596                                    **Никогда не входил в систему**
user597                                    **Никогда не входил в систему**
user598                                    **Никогда не входил в систему**
user599                                    **Никогда не входил в систему**
user600                                    **Никогда не входил в систему**
09:56:19
#last
user555  ttypb        localhost.locald Tue Jan 12 16:07 - 16:07  (00:00)
user     ttypb        localhost.locald Tue Jan 12 12:24 - 12:24  (00:00)
root     ttyp6        host219.net.nt   Tue Jan 12 10:55   still logged in
root     ttyp6        host219.net.nt   Tue Jan 12 10:18 - 10:54  (00:36)
root     ttype        debian.net.nt    Mon Jan 11 14:01   still logged in
root     ttypb        host203.net.nt   Mon Jan 11 13:59 - 17:59  (03:59)
user     ttypb        host203.net.nt   Mon Jan 11 12:32 - 12:32  (00:00)
root     ttypb        host203.net.nt   Mon Jan 11 10:18 - 12:31  (02:13)
root     ttyp6        debian.net.nt    Mon Jan 11 09:53 - 14:19  (04:25)
root     ttyp3        host150.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp2        host207.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp0        host150.net.nt   Mon Jan 11 08:19   still logged in
wtmp begins Mon Jan 11 08:19:48 2010
09:56:25
#lastlogin
bash: lastlogin: command not found
/dev/ttyp8
09:56:37
#[root@fbsd3:~]# lastlogin
    68  root             ttyv0                     Fri Mar 28 18:37 - 18:52
 (00:14)
    69  reboot           ~                         Fri Mar 28 18:37
    70  root             ttyp0    debian           Fri Mar 28 01:44 - crash
 (16:53)
    71  root             ttyv0                     Fri Mar 28 01:38 - crash
 (16:59)
    72  reboot           ~                         Fri Mar 28 01:38
 (16:59)
    72  reboot           ~                         Fri Mar 28 01:38
...
    79  reboot           ~                         Sat Mar 15 18:09
 (00:12)
 (00:00)
    82  reboot           ~                         Sat Mar 15 17:53
    83  shutdown         ~                         Sat Mar 15 17:52
 (00:00)
wn  (00:46)
    86  reboot           ~                         Sat Mar 15 17:05
    87
    88  wtmp begins Sat Mar 15 17:05:55 EET 2008
/dev/ttyp0
09:57:09
#vim \etc\passwd
/dev/ttyp8
09:57:17
#last
[root@fbsd3:~]# exit
exit
Connection to 192.168.16.23 closed.
user555  ttypb        localhost.locald Tue Jan 12 16:07 - 16:07  (00:00)
user     ttypb        localhost.locald Tue Jan 12 12:24 - 12:24  (00:00)
root     ttyp6        host219.net.nt   Tue Jan 12 10:55   still logged in
root     ttyp6        host219.net.nt   Tue Jan 12 10:18 - 10:54  (00:36)
root     ttype        debian.net.nt    Mon Jan 11 14:01   still logged in
root     ttypb        host203.net.nt   Mon Jan 11 13:59 - 17:59  (03:59)
user     ttypb        host203.net.nt   Mon Jan 11 12:32 - 12:32  (00:00)
root     ttypb        host203.net.nt   Mon Jan 11 10:18 - 12:31  (02:13)
root     ttyp6        debian.net.nt    Mon Jan 11 09:53 - 14:19  (04:25)
root     ttyp3        host150.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp2        host207.net.nt   Mon Jan 11 09:53   still logged in
root     ttyp0        host150.net.nt   Mon Jan 11 08:19   still logged in
wtmp begins Mon Jan 11 08:19:48 2010
09:57:19
#lastlog
user154                                    **Never logged in**
user155                                    **Never logged in**
user156                                    **Never logged in**
user157                                    **Never logged in**
user158                                    **Never logged in**
user159                                    **Never logged in**
user160                                    **Never logged in**
user161                                    **Never logged in**
user162                                    **Never logged in**
user163                                    **Never logged in**
...
user591                                    **Never logged in**
user592                                    **Never logged in**
user593                                    **Never logged in**
user594                                    **Never logged in**
user595                                    **Never logged in**
user596                                    **Never logged in**
user597                                    **Never logged in**
user598                                    **Never logged in**
user599                                    **Never logged in**
user600                                    **Never logged in**
09:57:44
#lastb
man                                        **Never logged in**
lp                                         **Never logged in**
mail                                       **Never logged in**
news                                       **Never logged in**
uucp                                       **Never logged in**
proxy                                      **Never logged in**
www-data                                   **Never logged in**
backup                                     **Never logged in**
list                                       **Never logged in**
irc                                        **Never logged in**
...
www-data                                   **Never logged in**
backup                                     **Never logged in**
list                                       **Never logged in**
irc                                        **Never logged in**
gnats                                      **Never logged in**
sshd                                       **Never logged in**
gdm                                        **Never logged in**
user             ttypb    localhost.locald Tue Jan 12 12:24:37 +0200 2010
test                                       **Never logged in**
user1                                      **Never logged in**
09:58:11
#lastb
[root@debian1:tmp]# ssh 127.0.0.1 -l user
user@127.0.0.1's password:
Permission denied, please try again.
user@127.0.0.1's password:
Permission denied, please try again.
user@127.0.0.1's password:
Permission denied (publickey,password).
btmp begins Sun Jan 10 06:25:22 2010
09:59:43
#less /var/log/auth.log
/dev/ttyp0
10:04:30
#cd /
[root@debian1:tmp]# cd \etc
bash: cd: etc: No such file or directory
10:04:34
#vim pa
/dev/ttyp8
10:05:55
#vim /etc/
10:05:58
#ls -l
total 1922
-rw-r--r--  1 root root       0 Jan 12 10:23 -1
drwxr-xr-x  2 root root      48 Jan 11 16:32 123
drwxr-xr-x  2 root root     272 Jan 12 15:36 2
drwxr-xr-x 14 root root     336 Jan 12 10:21 2004
drwxr-xr-x 14 root root     336 Jan 12 10:21 2005
drwxr-xr-x 14 root root     336 Jan 12 10:21 2006
drwxr-xr-x 14 root root     336 Jan 11 12:06 2007
drwxr-xr-x 14 root root     336 Jan 11 12:06 2008
drwxr-xr-x 14 root root     336 Jan 11 12:06 2009
...
-rw-r--r--  1 root root    9347 Jan 12 11:10 newfile
-rw-r--r--  1 root root    9347 Jan 11 17:02 passwd
-rwxr-xr-x  1 root root     139 Jan 12 16:24 select1
drwxr-xr-x  2 root root      48 Jan 12 15:10 soft
drwx------  2 root root      48 Jan 11 14:15 v218742
-rwxr-xr-x  1 root root      63 Jan 12 16:40 while1
-rwxr-xr-x  1 root root     139 Jan 12 16:44 while2
-rw-r--r--  1 root root     355 Jan 12 12:25 who
-rw-r--r--  1 root root     355 Jan 12 12:25 who
-rw-------  1 root root    1493 Jan 12 09:42 zmanDW1PTG
10:06:00
#su - user
Removing stale pidfile
10:06:06
$ls -l
итого 4
drwxr-xr-x 2 root root 120 2010-01-11 12:44 bin
-rwxr-xr-x 1 root root  13 2008-03-11 12:42 hello
drwxr-xr-x 4 root root 104 2010-01-11 12:46 proj
drwxr-xr-x 2 root root  48 2010-01-11 12:28 source
-rw-r--r-- 1 root root   0 2010-01-11 12:40 x
-rw-r--r-- 1 root root   0 2010-01-11 12:40 y
-rw-r--r-- 1 root root   0 2010-01-11 12:40 z
/dev/ttyp0
10:06:06
#vim /etc/gro
10:06:06
#vim /etc/gro
/dev/ttyp8
10:06:07
$exit
exit
10:06:19
#chmod o-r /etc/passwd
[root@debian1:tmp]# ls -l /etc/passwd
-rw-r--r-- 1 root root 13892 Jan 12 16:07 /etc/passwd
10:06:33
#ls -l /etc/passwd
-rw-r----- 1 root root 13892 Jan 12 16:07 /etc/passwd
10:06:44
$ls -l
[root@debian1:tmp]# su - user
l3-agent is already running: pid=17154; pidfile=/home/user/.lilalo/l3-agent.pid
итого 4
drwxr-xr-x 2 0 root 120 2010-01-11 12:44 bin
-rwxr-xr-x 1 0 root  13 2008-03-11 12:42 hello
drwxr-xr-x 4 0 root 104 2010-01-11 12:46 proj
drwxr-xr-x 2 0 root  48 2010-01-11 12:28 source
-rw-r--r-- 1 0 root   0 2010-01-11 12:40 x
-rw-r--r-- 1 0 root   0 2010-01-11 12:40 y
-rw-r--r-- 1 0 root   0 2010-01-11 12:40 z
10:06:56
$exit
exit
10:07:09
#chmod o+r /etc/passwd

10:07:13
#su - user
l3-agent is already running: pid=17154; pidfile=/home/user/.lilalo/l3-agent.pid
10:07:17
$exit
[user@debian1:~]$ ls -l
итого 4
drwxr-xr-x 2 root root 120 2010-01-11 12:44 bin
-rwxr-xr-x 1 root root  13 2008-03-11 12:42 hello
drwxr-xr-x 4 root root 104 2010-01-11 12:46 proj
drwxr-xr-x 2 root root  48 2010-01-11 12:28 source
-rw-r--r-- 1 root root   0 2010-01-11 12:40 x
-rw-r--r-- 1 root root   0 2010-01-11 12:40 y
-rw-r--r-- 1 root root   0 2010-01-11 12:40 z
exit
10:14:37
#ls -l /etc/passwd
       o  days before password is to expire that user is warned
       o  days after password expires that account is disabled
       o  days since Jan 1, 1970 that account is disabled
       o  a reserved field
-rw-r--r-- 1 root root 13892 Jan 12 16:07 /etc/passwd
10:15:46
#vim /etc/passwd
10:16:41
#vim /etc/gro
10:16:41
#vim /etc/gro
10:17:41
#id user
  9 mail:x:8:
 10 news:x:9:
 11 uucp:x:10:
 12 man:x:12:
 13 proxy:x:13:
 14 kmem:x:15:
 15 dialout:x:20:
 16 fax:x:21:
 17 voice:x:22:
 18 cdrom:x:24:
 19 floppy:x:25:
 20 tape:x:26:
 21 sudo:x:27:
 22 audio:x:29:mega
 23 dip:x:30:
                   ,user                                  22,15         Top
-- INSERT --                                              22,21         Top
"/etc/group" 346L, 5239C written
uid=1000(user) gid=1000(user) groups=1000(user),29(audio)
10:18:26
#adduser adduser
[root@debian1:tmp]# adduser
adduser: Only one or two names allowed.
Adding user `adduser' ...
Adding new group `adduser' (1304) ...
Adding new user `adduser' (1304) with group `adduser' ...
Creating home directory `/home/adduser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for adduser
Enter the new value, or press ENTER for the default
        Full Name []: Add User Userovich
        Room Number []: C
        Work Phone []: 02
        Home Phone []: 03
        Other []: Wery good men
Is the information correct? [y/N] y
10:19:57
#vim /etc/shadow
10:21:17
#adduser adduser2
[root@debian1:tmp]# adduser adduser
adduser: The user `adduser' already exists.
Adding user `adduser2' ...
Adding new group `adduser2' (1305) ...
Adding new user `adduser2' (1305) with group `adduser2' ...
Creating home directory `/home/adduser2' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
No password supplied
...
No password supplied
Enter new UNIX password:
Retype new UNIX password:
No password supplied
passwd: Authentication token manipulation error
passwd: password unchanged
Try again? [Y/n] n
Changing the user information for adduser2
Enter the new value, or press ENTER for the default
        Full Name []: adduser: `/usr/bin/chfn adduser2' exited from signal 2. Exiting.
10:21:51
#strings /usr/sbin/add
[root@debian1:tmp]# whereis adduser
adduser: /usr/sbin/adduser /etc/adduser.conf /usr/share/adduser /usr/share/man/man8/adduser.8.gz
add-shell  addgroup   adduser
10:22:14
#grep \*conf\* /usr/sbin/adduser
[root@debian1:tmp]# strings /usr/sbin/adduser  | less
        print STDERR "$0: ";
        printf STDERR (gtx("The group `%s' already exists and is not a syste
m group. Exiting.\n"), $new_name) if $verbose;o the system.\n")) if ($> != 0
        exit 1;               - the name of the new user
    }$make_group_also | $ingroup_name | $new_gid | 0  - which group
    if ($ret == 2) {$new_uid, $new_gecos - optional overridesu>
        print STDERR "$0: ";" ? "addgroup" : "adduser";it.edu>
        printf STDERR (gtx("The group `%s' already exists, but has a differe
nt GID. Exiting.\n"), $new_name) if $verbose;add her toilebian 'adduser'
...
        if (defined getgrnam($new_name));tion equals one of the following,
    dief (gtx("The GID `%s' is already in use.\n"),$new_gid)t safely
        if (defined($new_gid) && defined(getgrgid($new_gid)));sts.\n")
    if (!defined($new_gid)) { - the name of the new user.  See the
        $new_gid = &first_avail_gid($config{"first_system_gid"},t.\n")
                                   $config{"last_system_gid"});system group.
        if ($new_gid == -1) {$verbose;n this mode.\n")) Software
            print STDERR "$0: ";the name of the new groupn, MA  02110-1301
            printf STDERR gtx("No GID is available in the range %d-%d (FIRST
_SYS_GID - LAST_SYS_GID).\n"),$config{"first_system_gid"},$config{"last_syst
10:22:37
#grep conf /usr/sbin/adduser | less
10:24:56
#id adduser
 65 SKEL_IGNORE_REGEX="dpkg-(old|new|dist)"
 66
 67 # Set this if you want the --add_extra_groups option to adduser to add
                            (            )
 68 # new users to other groups.
 69 # This is the list of groups that new non-system users will be added to
 70 # Default:
 71 #EXTRA_GROUPS="dialout cdrom floppy audio src video lp src users"
 72
 73 # If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS
 74 # option above will be default behavior for adding new, non-system users
uid=1304(adduser) gid=1304(adduser) groups=1304(adduser)
 34 # allocated user accounts/groups.                     74,37         98%
10:25:19
#delgroup adduser ; echo $?
[root@debian1:tmp]# delgroup adduser
/usr/sbin/delgroup: `adduser' still has `adduser' as their primary group!
/usr/sbin/delgroup: `adduser' still has `adduser' as their primary group!
7
10:25:54
#vim /etc/passwd

Файлы

  • ./case2
  • while1
  • while2
  • ./case2
    >
    #!/bin/bash
    while [ "$Keypress" != "X" ]
    do
    echo "Press any key and then return, or X for Exit from here"
    read Keypress
    case "$Keypress" in
            [A-Z] ) echo "This is a latter";;
            [a-z] ) echo "This is a latter";;
            [0-9] ) echo "This is a digit";;
             *    ) echo "This is a punct";;
     esac
     done
    
    while1
    >
    #!/bin/bash
    A=0
    while [ $A -lt 10 ]
    do
    A=$((A+1))
    echo $A
    done
    
    while2
    >
    [root@debian1:tmp]# ./while2
    Please, give a value to variable or end to Exiting
    weefrr
    Variable #1 = weefrr
    Please, give a value to variable or end to Exiting
    sdf
    Variable #1 = sdf
    Please, give a value to variable or end to Exiting
    end
    Variable #1 = end
    #!/bin/bash
    while [ "$i" != end ]
    do
    echo "Please, give a value to variable or end to Exiting"
    read i
    echo "Variable #1 = $i"
    done
    exit 0
    

    Статистика

    Время первой команды журнала15:33:48 2010- 1-12
    Время последней команды журнала10:25:54 2010- 1-13
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, % 8.91
    Процент синтаксически неверно набранных команд, % 5.94
    Суммарное время работы с терминалом *, час 2.36
    Количество командных строк в единицу времени, команда/мин 0.71
    Частота использования команд
    [root@fbsd3:~]#15|==============| 14.15%
    vim14|=============| 13.21%
    ls6|=====| 5.66%
    case24|===| 3.77%
    chmod4|===| 3.77%
    last4|===| 3.77%
    lastb4|===| 3.77%
    grep4|===| 3.77%
    lastlog3|==| 2.83%
    apt-get3|==| 2.83%
    cat3|==| 2.83%
    ping3|==| 2.83%
    less3|==| 2.83%
    exit3|==| 2.83%
    pinf2|=| 1.89%
    my_ip2|=| 1.89%
    id2|=| 1.89%
    lynx2|=| 1.89%
    l3upload2|=| 1.89%
    adduser2|=| 1.89%
    su2|=| 1.89%
    man1|| 0.94%
    strings1|| 0.94%
    cd1|| 0.94%
    delgroup1|| 0.94%
    echo1|| 0.94%
    w1|| 0.94%
    ps1|| 0.94%
    while11|| 0.94%
    logname1|| 0.94%
    l31|| 0.94%
    abs1|| 0.94%
    l3-1|| 0.94%
    lastlogin1|| 0.94%
    curl1|| 0.94%
    df1|| 0.94%
    l3pwd1|| 0.94%
    kill1|| 0.94%
    date1|| 0.94%
    apt-cache1|| 0.94%
    ____
    *) Интервалы неактивности длительностью 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$