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

Содержание

Журнал

Воскресенье (04/02/06)

/dev/ttyv0
22:53:07
$su-
bash: su-: command not found
22:53:44
$ su -
Password:
22:53:54
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1
        inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255
        ether 00:07:e9:3c:2c:15
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        options=9<RXCSUM,VLAN_MTU>
        ether 00:04:76:a1:f2:1e
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
22:54:16
#mc
22:56:15
#cd /usr/ports/

22:56:25
#whereis sudo
sudo: /usr/ports/security/sudo
22:56:42
#cd /security/sudo
bash: cd: /security/sudo: No such file or directory
22:56:59
#cd security/

22:57:11
#cd sudo

22:57:16
#make install
checking for sys/bsdtypes.h... no
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking POSIX termios... yes
checking login_cap.h usability... yes
checking login_cap.h presence... yes
...
      increased privileges.
/usr/local/bin/sudo
/usr/local/bin/sudoedit
      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.courtesan.com/sudo/
22:58:31
#man sudo
23:00:29
#visudo
# sudoers file.
#
# See the sudoers man page for the details on how to write a sudoers file.
# sudoers file.
#
# See the sudoers man page for the details on how to write a sudoers file.
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
...
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
visudo: sudoers file unchanged
 A# Samples
A# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
A# %users  localhost=/sbin/shutdown -h now
23:04:02
#visudo
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
root    ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL
# Same thing without a password
visudo: sudoers file unchanged
23:04:48
#man sudoers
23:06:19
#man sudoers
23:06:28
#cd /usr/local/etc/sudoers
bash: cd: /usr/local/etc/sudoers: Not a directory
23:06:41
#cd /usr/local/etc/sudoers
bash: cd: /usr/local/etc/sudoers: Not a directory
23:06:48
#ls -l
total 12
-rw-r--r--  1 root  wheel  1598 Jun 21  2005 Makefile
-rw-r--r--  1 root  wheel    97 Jun 21  2005 distinfo
-rw-r--r--  1 root  wheel   706 Dec 22  1999 pkg-descr
-rwxr-xr-x  1 root  wheel   280 Jul 20  2004 pkg-install
-rw-r--r--  1 root  wheel   162 Aug 20  2004 pkg-plist
drwxr-xr-x  3 root  wheel   512 Apr  2 22:58 work
23:06:55
#cd ..

23:07:01
#cd ..\
>
23:07:06
#cd ..

23:07:10
#cd ..

23:07:13
#cd ..

23:07:17
#cd /usr/local/

23:07:27
#pkg_info -Lx sudo | grep /etc
/usr/local/etc/sudoers.sample
23:08:04
#cd ..

23:08:10
#cd ..

23:08:12
#cd /usr/local/etc/

23:08:32
#ls -l -A
total 74
drwxr-xr-x  2 root  wheel    512 Mar 31 12:16 bonobo-activation
-r--r--r--  1 root  wheel   1107 Mar 31 12:17 cdrecord
-r--r--r--  1 root  wheel   1107 Oct 12 10:48 cdrecord.sample
drwxr-xr-x  5 root  wheel    512 Mar 31 12:07 cups
-r--r--r--  1 root  wheel    153 Mar 31 12:16 esd.conf
-r--r--r--  1 root  wheel    153 Oct 12 13:44 esd.conf.default
-r--r--r--  1 root  wheel   1480 Oct 12 15:59 fam.conf
-r--r--r--  1 root  wheel    848 May 23  2005 ksysguarddrc
drwxr-xr-x  2 root  wheel    512 Mar 31 12:10 openldap
...
-r--r--r--  1 root  wheel  13744 Mar 31 12:07 pkgtools.conf
-r--r--r--  1 root  wheel  13744 Oct 12 09:00 pkgtools.conf.sample
-r-xr-xr-x  1 root  wheel    704 Oct 12 09:00 pkgtools.status-pkg.sh
drwxr-xr-x  2 root  wheel    512 Mar 31 12:16 rc.d
drwxr-xr-x  2 root  wheel    512 Mar 31 12:13 snmp
-r--r-----  1 root  wheel    608 Apr  2 22:58 sudoers
-r--r--r--  1 root  wheel   4127 Apr  2 22:58 sudoers.sample
drwxr-xr-x  3 root  wheel    512 Mar 31 12:10 xdg
-r--r--r--  1 root  wheel    340 Oct 12 12:38 xml2Conf.sh
-r--r--r--  1 root  wheel    232 Oct 12 14:16 xsltConf.sh
23:08:39
#vi sudoers
23:09:12
#pkg_info -Lx sudo | grep /etc
/usr/local/etc/sudoers.sample
23:09:18
#visudo
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
# Runas alias specification
# User privilege specification
root    ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL
# Same thing without a password
visudo: sudoers file unchanged
23:10:33
#cp /etc/lo
localtime      locate.rc      login.access   login.conf     login.conf.db
23:10:33
#cp /etc/lo
localtime      locate.rc      login.access   login.conf     login.conf.db
23:10:33
#cp /usr/local/etc/sudoers{.sample,}

23:12:00
#vi /usr/local/etc/sudoers
23:13:01
#vi /usr/local/etc/sudoers
23:15:41
#vim /usr/local/etc/sudoers
23:15:49
#touch ~/.vimrc

23:15:57
#vim /usr/local/etc/sudoers
23:16:45
#exit
exit
23:17:51
$cat /etc/master.passwd
cat: /etc/master.passwd: Permission denied
23:18:05
$sudo
usage: sudo -K | -L | -V | -h | -k | -l | -v
usage: sudo [-HPSb] [-c class|-] [-p prompt] [-u username|#uid]
            { -e file [...] | -i | -s | <command> }
23:18:13
$sudo cat /etc/master.passwd
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Sorry, try again.
sudo: 3 incorrect password attempts
23:19:10
$su -
Password:
23:19:27
#exit
exit
23:19:32
$sudo cat /etc/master.passwd
Password:
Sorry, try again.
Password:
sudo: 1 incorrect password attempt
23:19:44
$su -
Password:
23:19:59
#traceroute 80.91.162.154
traceroute to 80.91.162.154 (80.91.162.154), 64 hops max, 40 byte packets
 1  linux.nt (192.168.15.254)  0.311 ms  0.249 ms  0.221 ms
 2  10.0.1.1 (10.0.1.1)  0.531 ms  0.429 ms  0.459 ms
 3  * * *
 4  tekexpert-lgw.sovam.net.ua (62.64.113.245)  40.352 ms  40.239 ms  40.684 ms
 5  srp-2-1-cr0-co11.kv.sovam.net.ua (212.109.37.9)  40.926 ms  41.133 ms  40.545 ms
 6  gi-0-1-55-br1-co11.kv.sovam.net.ua (85.223.224.101)  42.431 ms  41.365 ms  41.053 ms
 7  datacom-gw.ix.net.ua (195.35.65.32)  46.426 ms  42.490 ms  42.300 ms
 8  KE1-KTU.rtr.newline.net.ua (80.91.160.70)  43.050 ms  43.374 ms  42.803 ms
 9  ll-datasat-r.newline.net.ua (80.91.160.222)  44.048 ms  44.378 ms  43.312 ms
10  * * *
11  * * *
12  gw.megabit.com.ua (80.91.160.214)  1844.892 ms  1720.702 ms  2025.306 ms
13  ns.zarja.com.ua (80.91.162.154)  2316.606 ms  3500.209 ms  2487.506 ms
23:26:07
#apropos copy | grep file
cp(1)                    - copy files
cpio(1)                  - copy files to and from archives
dd(1)                    - convert and copy a file
krb5_kt_ops(3), krb5_keytab_entry(3), krb5_kt_cursor(3), krb5_kt_add_entry(3), krb5_kt_close(3), krb5_kt_compare(3), krb5_kt_copy_entry_contents(3), krb5_kt_default(3), krb5_kt_default_name(3), krb5_kt_end_seq_get(3), krb5_kt_free_entry(3), krb5_kt_get_entry(3), krb5_kt_get_name(3), krb5_kt_get_type(3), krb5_kt_next_entry(3), krb5_kt_read_service_key(3), krb5_kt_register(3), krb5_kt_remove_entry(3
objcopy(1)               - copy and translate object files
pax(1)                   - read and write file archives and copy directory hierarchies
rcp(1)                   - remote file copy
scp(1)                   - secure copy (remote file copy program)
прошло 15 минут
23:41:22
#whatis intro
intro(1)                 - introduction to general commands (tools and utilities)
intro(2)                 - introduction to system calls and error numbers
intro(3)                 - introduction to the C libraries
intro(4)                 - introduction to devices and device drivers
intro(5)                 - introduction to file formats
intro(6)                 - introduction to games
intro(7)                 - miscellaneous information pages
intro(8)                 - introduction to system maintenance and operation commands
intro(9)                 - introduction to system kernel interfaces
23:41:47
#ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1
        inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255
        ether 00:07:e9:3c:2c:15
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        options=9<RXCSUM,VLAN_MTU>
        ether 00:04:76:a1:f2:1e
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
23:42:19
#!if
ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        inet6 fe80::207:e9ff:fe3c:2c15%em0 prefixlen 64 scopeid 0x1
        inet 192.168.15.23 netmask 0xffffff00 broadcast 192.168.15.255
        ether 00:07:e9:3c:2c:15
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
xl0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        options=9<RXCSUM,VLAN_MTU>
        ether 00:04:76:a1:f2:1e
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
23:42:44
#traceroute zarja.com.ua
traceroute to zarja.com.ua (80.91.162.154), 64 hops max, 40 byte packets
 1  linux.nt (192.168.15.254)  0.378 ms  0.286 ms  0.209 ms
 2  10.0.1.1 (10.0.1.1)  0.442 ms  0.431 ms  0.334 ms
 3  * * *
 4  tekexpert-lgw.sovam.net.ua (62.64.113.245)  43.761 ms  40.901 ms  40.183 ms
 5  srp-2-1-cr0-co11.kv.sovam.net.ua (212.109.37.9)  40.679 ms  41.528 ms  40.933 ms
 6  gi-0-1-55-br1-co11.kv.sovam.net.ua (85.223.224.101)  41.052 ms  41.905 ms  42.305 ms
 7  datacom-gw.ix.net.ua (195.35.65.32)  42.681 ms  42.777 ms  42.446 ms
 8  KE1-KTU.rtr.newline.net.ua (80.91.160.70)  43.418 ms  42.148 ms  42.430 ms
 9  ll-datasat-r.newline.net.ua (80.91.160.222)  44.309 ms  43.782 ms  44.052 ms
10  * * *
11  * * *
12  gw.megabit.com.ua (80.91.160.214)  1492.501 ms  3427.516 ms  2814.294 ms
13  ns.zarja.com.ua (80.91.162.154)  1333.235 ms  2191.067 ms  2059.775 ms

Понедельник (04/03/06)

00:11:35
#ssh 80.91.162.153
Connection to 80.91.162.153 closed.
00:16:26
#ssh 80.91.162.154
ssh_exchange_identification: Connection closed by remote host
00:16:35
#pkg_info
kdegames-3.4.2_1    Games for the KDE integrated X11 desktop
kdegraphics-3.4.2_1 Graphics utilities for the KDE3 integrated X11 desktop
kdehier-1.0_6       Utility port which installs a hierarchy of shared KDE direc
kdelibs-3.4.2_1     Base set of libraries needed by KDE programs
kdemultimedia-3.4.2 Multimedia utilities for the KDE integrated X11 desktop
kdemultimedia-akode-3.4.2 Default KDE audio backend
kdemultimedia-akode-plugins-mpc-3.4.2 Musepack decoder plugin for akode
kdemultimedia-akode-plugins-mpeg-3.4.2 MPEG audio decoder plugin for akode
kdemultimedia-akode-plugins-oss-3.4.2 OSS output plugin for akode
kdemultimedia-akode-plugins-resampler-3.4.2 Resampler plugin for akode
...
xorg-nestserver-6.8.2 Nesting X server from X.Org
xorg-printserver-6.8.2 X Print server from X.Org
xorg-server-6.8.2_6 X.Org X server and related programs
xorg-vfbserver-6.8.2 X virtual framebuffer server from X.Org
xpdf-3.00_7         Display PDF files, and convert them to other formats
xscreensaver-gnome-4.22 Save your screen while you entertain your cat (for GNOME us
xterm-203           Terminal emulator for the X Window System
xvid-1.0.3,1        An opensource MPEG-4 codec, based on OpenDivx
yelp-2.10.0_1       A help browser for the GNOME 2 desktop
zenity-2.10.0       Display GNOME dialogs from the command line
00:17:37
#pkg_
pkg_add        pkg_deinstall  pkg_glob       pkg_sort
pkg_check      pkg_delete     pkg_info       pkg_version
pkg_create     pkg_fetch      pkg_sign       pkg_which

Вторник (04/04/06)

/dev/ttyv0
14:50:14
$man rsync
14:52:54
$rsync -avz fbsd4:/etc /tmp/
^Crsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(163)
14:54:45
$rsync -avz fbsd4:/etc/rc.conf /tmp
^Crsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(163)
14:56:32
$ping fbsd4
PING fbsd4.unix.nt (192.168.15.24): 56 data bytes
^C
--- fbsd4.unix.nt ping statistics ---
11 packets transmitted, 0 packets received, 100% packet loss
14:56:48
$ipfw list
ipfw: socket: Operation not permitted
14:56:55
$su -
Password:
14:57:09
#ping fbsd4
PING fbsd4.unix.nt (192.168.15.24): 56 data bytes
^C
--- fbsd4.unix.nt ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
14:57:24
#ping fbsd2
PING fbsd2.unix.nt (192.168.15.22): 56 data bytes
64 bytes from 192.168.15.22: icmp_seq=0 ttl=64 time=0.833 ms
64 bytes from 192.168.15.22: icmp_seq=1 ttl=64 time=0.446 ms
64 bytes from 192.168.15.22: icmp_seq=2 ttl=64 time=0.457 ms
^C
--- fbsd2.unix.nt ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.446/0.579/0.833/0.180 ms
14:57:33
#ipfw list
00010 divert 8668 ip from any to any via em0
00110 pipe 1 ip from any 80 to 192.168.16.130 via xl0 in
00210 pipe 1 ip from any 21 to 192.168.16.130 via xl0 in
00310 pipe 1 ip from any 21 to 192.168.16.130 via xl0 out
00410 pipe 1 ip from any 80 to 192.168.16.130 via xl0 out
65535 allow ip from any to any
14:57:42
#exit
exit
14:58:07
$rsync -avz fbsd2:/etc/rc.conf /tmp
The authenticity of host 'fbsd2.unix.nt (192.168.15.22)' can't be established.
DSA key fingerprint is ec:0e:af:b0:8b:3b:94:cf:e7:06:c8:13:b9:7b:ff:fa.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'fbsd2.unix.nt' (DSA) to the list of known hosts.
Password:
Password:
receiving file list ... done
rc.conf
sent 42 bytes  received 526 bytes  18.62 bytes/sec
total size is 802  speedup is 1.41
14:58:49
$cd /tmp

14:58:58
$ls -l -A
total 58
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .ICE-unix
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .X11-unix
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .XIM-unix
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .font-unix
drwxrwxr-x  2 root  operator    512 Apr  3 00:21 .snap
drwx------  5 500   500         512 Apr  2 21:52 Term-VT102-0.82
-rw-r--r--  1 root  wheel     25211 Apr  2 21:52 Term-VT102-0.82.tar.gz
drwxr-xr-x  4 101   staff       512 Apr  2 21:51 Text-Iconv-1.4
-rw-r--r--  1 root  wheel      8986 Apr  2 21:52 Text-Iconv-1.4.tar.gz
-rw-r--r--  1 root  wheel         6 Apr  4 14:39 file
drwx------  2 root  wheel       512 Apr  2 23:52 mc-root
-rw-r--r--  1 user  wheel       802 Apr  4 11:38 rc.conf
drwxr-xr-x  3 root  wheel       512 Apr  3 06:36 screens
14:59:02
$zsh
\[v2#\!#$?#$UID#$$#$(/bin/date +)#$PWD#\033[1024D\033[K\]\[\033[0;32m\][\u@\h:\W]\$ \[\033[0m\]exit
15:01:02
$mc
15:01:07
$File: l3bashrc Col 0 5740 bytes 0%
‚<€~/.lilalo€€€€€€€€€€€€€€€€€€€€€€€€€v>ƒ‚<€/tmp€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€v>ƒ
/..              UP--DIR            /..              UP--DIR            
 13679230~67.info    398Apr  4 15:01/.X11-unix           512Apr  3 21:58
 16972343~ ‚€€€€€€€€€€€€€€€ The Midnight Commander €€€€€€€€€€€€€€€ƒ r  3 21:58
 18009265~                                                        r  2 21:52
 l3-agent. „€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€… r  2 23:52
                                    /screens             512Apr  3 06:36
                        return 0     Text-Ico~.tar.gz   8986Apr  2 21:52
 ======                              rc.conf             802Apr  4 11:38
†€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€‡†€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€‡
„€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€…„€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€…
$
        ps waux | awk '{print $2" "$11 }' | grep -q ^$PPID" "script
        ps waux | awk '{print $2" "$11 }' | grep -q ^$PPID" "script
        ps waux | awk '{print $2" "$11 }' | grep -q ^$PPID" "script
15:03:02
$cd /tmp; ssh fbsd2 tar cf - /etc | tar x
tar: Error opening archive: Failed to open '/dev/sa0': No such file or directory
Password:
tar: Removing leading '/' from member names
tar: /etc/master.passwd: could not open file: Permission denied
tar: /etc/nsmb.conf: could not open file: Permission denied
tar: /etc/opieaccess: could not open file: Permission denied
tar: /etc/spwd.db: could not open file: Permission denied
tar: /etc/ssh/ssh_host_key: could not open file: Permission denied
tar: /etc/ssh/ssh_host_dsa_key: could not open file: Permission denied
tar: /etc/ssh/ssh_host_rsa_key: could not open file: Permission denied
tar: /etc/ppp/ppp.conf: could not open file: Permission denied
tar: /etc/ntp: Couldn't visit directory: Permission denied
tar: /etc/isdn: Couldn't visit directory: Permission denied
tar: /etc/bluetooth/hcsecd.conf: could not open file: Permission denied
15:05:02
$cd /tmp/1; ssh fbsd2 tar cf - /tmp | tar x
bash: cd: /tmp/1: No such file or directory
tar: Error opening archive: Failed to open '/dev/sa0': No such file or directory
Password:
tar: Removing leading '/' from member names
tar: /tmp/mc-root: Couldn't visit directory: Permission denied
tar: /tmp/Term-VT102-0.82: Couldn't visit directory: Permission denied
15:09:52
$ls -l -A
total 60
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .ICE-unix
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .X11-unix
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .XIM-unix
drwxrwxrwt  2 root  wheel       512 Apr  3 21:58 .font-unix
drwxrwxr-x  2 root  operator    512 Apr  3 00:21 .snap
drwx------  5 500   500         512 Apr  2 21:52 Term-VT102-0.82
-rw-r--r--  1 root  wheel     25211 Apr  2 21:52 Term-VT102-0.82.tar.gz
drwxr-xr-x  4 101   staff       512 Apr  2 21:51 Text-Iconv-1.4
-rw-r--r--  1 root  wheel      8986 Apr  2 21:52 Text-Iconv-1.4.tar.gz
-rw-r--r--  1 root  wheel         6 Apr  4 14:39 file
drwx------  2 root  wheel       512 Apr  2 23:52 mc-root
drwx------  2 user  wheel       512 Apr  4 15:01 mc-user
-rw-r--r--  1 user  wheel       802 Apr  4 11:38 rc.conf
drwxr-xr-x  3 root  wheel       512 Apr  3 06:36 screens
прошло 22 минуты
15:32:28
$cd /tmp/1; ssh fbsd2 tar cf - /tmp | tar x
bash: cd: /tmp/1: No such file or directory
tar: Error opening archive: Failed to open '/dev/sa0': No such file or directory
Password:
tar: Removing leading '/' from member names
tar: /tmp/etc/master.passwd: could not open file: Permission denied
tar: /tmp/etc/nsmb.conf: could not open file: Permission denied
tar: /tmp/etc/opieaccess: could not open file: Permission denied
tar: /tmp/etc/rc.conf.b: could not open file: Permission denied
tar: /tmp/etc/spwd.db: could not open file: Permission denied
tar: /tmp/etc/ssh/ssh_host_dsa_key: could not open file: Permission denied
tar: /tmp/etc/ssh/ssh_host_key: could not open file: Permission denied
tar: /tmp/etc/ssh/ssh_host_rsa_key: could not open file: Permission denied
tar: /tmp/etc/ppp/ppp.conf: could not open file: Permission denied
tar: /tmp/etc/ntp: Couldn't visit directory: Permission denied
tar: /tmp/etc/isdn: Couldn't visit directory: Permission denied
tar: /tmp/etc/bluetooth/hcsecd.conf: could not open file: Permission denied
tar: /tmp/mc-root: Couldn't visit directory: Permission denied
tar: /tmp/Term-VT102-0.82: Couldn't visit directory: Permission denied
15:32:44
$cd /tmp/1; ssh fbsd2 tar cf - /tmp | tar xf -
bash: cd: /tmp/1: No such file or directory
Password:
15:33:06
$mkdir /tmp/1

15:33:14
$cd /tmp/1; ssh fbsd2 tar cf - /tmp | tar xf -
Password:
tar: Removing leading '/' from member names
tar: /tmp/etc/master.passwd: could not open file: Permission denied
tar: /tmp/etc/nsmb.conf: could not open file: Permission denied
tar: /tmp/etc/opieaccess: could not open file: Permission denied
tar: /tmp/etc/rc.conf.b: could not open file: Permission denied
tar: /tmp/etc/spwd.db: could not open file: Permission denied
tar: /tmp/etc/ssh/ssh_host_dsa_key: could not open file: Permission denied
tar: /tmp/etc/ssh/ssh_host_key: could not open file: Permission denied
tar: /tmp/etc/ssh/ssh_host_rsa_key: could not open file: Permission denied
tar: /tmp/etc/ppp/ppp.conf: could not open file: Permission denied
tar: /tmp/etc/ntp: Couldn't visit directory: Permission denied
tar: /tmp/etc/isdn: Couldn't visit directory: Permission denied
tar: /tmp/etc/bluetooth/hcsecd.conf: could not open file: Permission denied
tar: /tmp/mc-root: Couldn't visit directory: Permission denied
tar: /tmp/Term-VT102-0.82: Couldn't visit directory: Permission denied
15:34:54
$su -
Password:
15:39:25
#ssh-key
ssh-keygen   ssh-keyscan
15:39:25
#ssh-keygen -l -f /etc/ss
ssh/ ssl/
15:39:25
#ssh-keygen -l -f /etc/ssh/ssh
ssh_config            ssh_host_key          ssh_host_rsa_key.pub
ssh_host_dsa_key      ssh_host_key.pub      sshd_config
ssh_host_dsa_key.pub  ssh_host_rsa_key
15:39:25
#ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key
2048 62:7f:97:d0:ae:68:b2:e3:7a:82:76:6a:fa:51:76:73 /etc/ssh/ssh_host_dsa_key.pub
прошло 12 минут
15:52:03
#ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
DSA key fingerprint is 62:7f:97:d0:ae:68:b2:e3:7a:82:76:6a:fa:51:76:73.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
15:53:29
#man ssh-keygen
15:56:02
#ssh-key
ssh-keygen   ssh-keyscan
15:56:02
#ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
4c:c6:7c:eb:5d:ea:55:22:8d:bd:e6:c3:5d:68:81:35 root@fbsd3.unix.nt
15:58:03
#ca
caesar          callbootd       cap_mkdb        catalogmanager
cal             caller          case            catman
calendar        camcontrol      cat
15:58:03
#cat ~/.ssh/id_dsa
id_dsa      id_dsa.pub
15:58:03
#cat ~/.ssh/id_dsa.pub | ssh fbsd2 'cat >> ~/.ssh/authorize_keys
'
16:01:30
#ssh fbsd2
Last login: Tue Apr  4 15:58:40 2006 from fbsd3.linux.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.0-RELEASE (MAIN) #0: Mon Apr  3 14:33:41 EEST 2006
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
   for your release first as it's updated frequently.
o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc distribution has
   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.
16:01:43
#exit
exit
Connection to fbsd2.unix.nt closed.
16:02:08
#cat ~/.ssh/id_dsa.pub | ssh fbsd2 'cat >> ~/.ssh/authorize_keys

16:02:08
#cat ~/.ssh/id_dsa.pub | ssh fbsd2 'cat >> ~/.ssh/authorize_keys
>
>
>
16:05:48
#cat ~/.ssh/id_dsa.pub | ssh fbsd2 'cat >> ~/.ssh/authorize_keys

16:05:48
#cat ~/.ssh/id_dsa.pub | ssh fbsd2 'cat >> ~/.ssh/authorize_key

16:05:48
#vim /etc/passwd

Файлы

  • ~/.ssh/id_dsa
  • ~/.ssh/id_dsa
    >
    id_dsa      id_dsa.pub
    

    Статистика

    Время первой команды журнала22:53:07 2006- 4- 2
    Время последней команды журнала16:05:48 2006- 4- 4
    Количество командных строк в журнале100
    Процент команд с ненулевым кодом завершения, %21.00
    Процент синтаксически неверно набранных команд, % 2.00
    Суммарное время работы с терминалом *, час 2.67
    Количество командных строк в единицу времени, команда/мин 0.62
    Частота использования команд
    cd21|================| 16.15%
    ssh14|==========| 10.77%
    cat9|======| 6.92%
    man5|===| 3.85%
    tar5|===| 3.85%
    >5|===| 3.85%
    su5|===| 3.85%
    authorize_keys4|===| 3.08%
    ls4|===| 3.08%
    ssh-keygen4|===| 3.08%
    exit4|===| 3.08%
    cp3|==| 2.31%
    pkg_info3|==| 2.31%
    sudo3|==| 2.31%
    visudo3|==| 2.31%
    ping3|==| 2.31%
    vim3|==| 2.31%
    vi3|==| 2.31%
    rsync3|==| 2.31%
    grep3|==| 2.31%
    ifconfig2|=| 1.54%
    traceroute2|=| 1.54%
    ssh-key2|=| 1.54%
    ipfw2|=| 1.54%
    mc2|=| 1.54%
    mkdir1|| 0.77%
    !if1|| 0.77%
    ca1|| 0.77%
    zsh1|| 0.77%
    whereis1|| 0.77%
    make1|| 0.77%
    File:1|| 0.77%
    su-1|| 0.77%
    whatis1|| 0.77%
    touch1|| 0.77%
    pkg_1|| 0.77%
    authorize_key1|| 0.77%
    apropos1|| 0.77%
    ____
    *) Интервалы неактивности длительностью 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$