/l3/users/29-05-2007/nt-lnet/linux3.net.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 |
|
#/etc/init.d/ssh
.aptitude/ .bash_profile install .lesshst .mc/ .rnd .viminfo .bash_history .bashrc .l3rc .lilalo/ .profile .ssh/ .Xauthority |
#/etc/init.d/ssh/strt
bash: /etc/init.d/ssh/strt: Not a directory |
#/etc/init.d/ssh/start
bash: /etc/init.d/ssh/start: Not a directory |
#/etc/init.d/ssh
Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart} |
#/etc/init.d/ssh satrt
Usage: /etc/init.d/ssh {start|stop|reload|force-reload|restart} |
#/etc/init.d/ssh start
|
#nmap localhost
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-05-31 18:15 EEST Interesting ports on localhost (127.0.0.1): Not shown: 1674 closed ports PORT STATE SERVICE 22/tcp open ssh 25/tcp open smtp 80/tcp open http 111/tcp open rpcbind 631/tcp open ipp 2628/tcp open dict Nmap finished: 1 IP address (1 host up) scanned in 0.185 seconds |
#vim /etc/ssh/sshd_config
|
#ssh 127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established. RSA key fingerprint is 32:96:02:ad:e2:cc:89:02:bd:a9:df:27:25:39:e7:43. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts. root@127.0.0.1's password: Last login: Thu May 31 16:16:05 2007 Linux linux3 2.6.18-4-686 #1 SMP Mon Mar 26 17:17:36 UTC 2007 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. l3-agent is already running: pid=2884; pidfile=/root/.lilalo/l3-agent.pid |
#exit
Connection to 127.0.0.1 closed. |
#screen
|
#apt-get install screen
Чтение списков пакетов... Готово Построение дерева зависимостей... Готово НОВЫЕ пакеты, которые будут установлены: screen обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 0 пакетов не обновлено. Необходимо скачать 587kБ архивов. После распаковки объем занятого дискового пространства возрастёт на 999kB. Получено:1 http://debian.org.ua etch/main screen 4.0.3-0.3+b1 [587kB] Получено 587kB за 3s (157kB/c) Предварительная настройка пакетов ... Выбор ранее не выбранного пакета screen. (Чтение базы данных... на данный момент установлено 107954 файлов и каталогов.) Распаковывается пакет screen (из файла .../screen_4.0.3-0.3+b1_i386.deb)... Настраивается пакет screen (4.0.3-0.3+b1) ... |
#screen
|
#vim /etc/xinetd.d/telnetd
|
#xconv.pl < /etc/inetd.conf > /tmp/xinetd
# Please refer to the xinetd.conf man page for more information #The maximum number of requests a particular service may handle # on how# at once.ly configure xinetd. instances = 25 # The type of logging. This logs to a file that is specified. # Another option is: SYSLOG syslog_facility [syslog_level] log_type = FILE /var/log/servicelog # The defaults section sets some information for all services # What to log when the connection succeeds. defaults# PID logs the pid of the server processing the request. ... server = /usr/sbin/in.telnetd service { { " netd" 56L, 1570C socket_type = stream protocol = tcp wait = yes user = identd -- VISUAL BLOCK -- 45,1 55% |
#vim /tmp/xinetd
|
#vipw
news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh dictd:x:100:102::/var/lib/dictd:/bin/false ... ~ ~ ~ ~ ~ ~ ~ ~ ~ vipw: /etc/passwd не был изменён |
#netstat -nlp | grep :23
instances = 25 ~ # The type of logging. This logs to a file that is specified. log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } # What to log when the connection fails. Same options as above ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd start
instances = 25 ~ # The type of logging. This logs to a file that is specified. Starting internet superserver: xinetd. log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#netstat -nlp | grep :23
|
#tail -f /var/log/daemon.log
instances = 25 ~ # The type of logging. This logs to a file that is specified. May 31 18:23:13 linux3 dhclient: DHCPACK from 192.168.16.15 log_type = FILE /var/log/servicelog May 31 18:23:13 linux3 NetworkManager: <information>^IDHCP daemon state is now 3 (renew) for interface eth1 # What to log when the connection succeeds. May 31 18:23:13 linux3 dhclient: bound to 192.168.16.195 -- renewal in 258 seconds. # HOST logs the remote host's ip address. May 31 18:24:16 linux3 xinetd[29382]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=10] ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#mv /usr/local/etc/xinetd.d/telnet /tmp
instances = 25 ~ # The type of logging. This logs to a file that is specified. log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } # What to log when the connection fails. Same options as above ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#tail -f /var/log/daemon.log
May 31 18:23:13 linux3 dhclient: DHCPACK from 192.168.16.15 May 31 18:23:13 linux3 NetworkManager: <information>^IDHCP daemon state is now 3 (renew) for interface eth1 May 31 18:23:13 linux3 dhclient: bound to 192.168.16.195 -- renewal in 258 seconds. May 31 18:24:16 linux3 xinetd[29382]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=10] May 31 18:24:16 linux3 xinetd[29382]: Reading included configuration file: /usr/local/etc/xinetd.d/telnet [file=/usr/local/etc/xinetd.d/telnet] [line=28] May 31 18:24:16 linux3 xinetd[29382]: Server /usr/sbin/telnetd is not executable [file=/usr/local/etc/xinetd.d/telnet] [line=9] May 31 18:24:16 linux3 xinetd[29382]: Error parsing attribute server - DISABLING SERVICE [file=/usr/local/etc/xinetd.d/telnet] [line=9] May 31 18:24:16 linux3 xinetd[29382]: removing telnet May 31 18:24:16 linux3 xinetd[29382]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:24:16 linux3 xinetd[29382]: Started working: 3 available services May 31 18:25:28 linux3 xinetd[29382]: Exiting... May 31 18:25:28 linux3 xinetd[29522]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=10] May 31 18:25:28 linux3 xinetd[29522]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:25:28 linux3 xinetd[29522]: Started working: 3 available services |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#netstat -nlp | grep :23
instances = 25 ~ # The type of logging. This logs to a file that is specified. log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } # What to log when the connection fails. Same options as above ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#mv /etc/xinetd.d/telnetd /etc/xinetd.d/telnet
instances = 25 ~ # The type of logging. This logs to a file that is specified. log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } # What to log when the connection fails. Same options as above ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#tail -f /var/log/daemon.log
May 31 18:24:16 linux3 xinetd[29382]: Error parsing attribute server - DISABLING SERVICE [file=/usr/local/etc/xinetd.d/telnet] [line=9] # HOST logs the remote host's ip address. May 31 18:24:16 linux3 xinetd[29382]: removing telnet # EXIT logs the exit status of the server. May 31 18:24:16 linux3 xinetd[29382]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. log_on_success = HOST PID May 31 18:24:16 linux3 xinetd[29382]: Started working: 3 available services # What to log when the connection fails. Same options as above May 31 18:25:28 linux3 xinetd[29382]: Exiting... May 31 18:25:28 linux3 xinetd[29522]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=10] ... service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All May 31 18:26:39 linux3 xinetd[29610]: Reading included configuration file: /usr/local/etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=10] May 31 18:26:39 linux3 xinetd[29610]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:26:39 linux3 xinetd[29610]: Started working: 3 available services 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#vim /etc/xinetd.conf
10c10 < includedir /usr/local/etc/xinetd.d --- > includedir /etc/xinetd.d |
#tail -f /var/log/daemon.log
May 31 18:27:29 linux3 xinetd[29610]: Exiting... service telnet May 31 18:27:29 linux3 xinetd[29673]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.conf] [line=10] { protocol = tcp May 31 18:27:29 linux3 xinetd[29673]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] user = telnetd May 31 18:27:29 linux3 xinetd[29673]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25] May 31 18:27:30 linux3 xinetd[29673]: Reading included configuration file: /etc/xinetd.d/telnet [file=/etc/xinetd.d/telnet] [line=26] May 31 18:27:30 linux3 xinetd[29673]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=9] May 31 18:27:30 linux3 xinetd[29673]: removing daytime ... May 31 18:27:30 linux3 xinetd[29673]: removing echo May 31 18:27:30 linux3 xinetd[29673]: removing time May 31 18:27:30 linux3 xinetd[29673]: removing time May 31 18:27:30 linux3 xinetd[29673]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:27:30 linux3 xinetd[29673]: Started working: 2 available services May 31 18:27:31 linux3 dhclient: DHCPREQUEST on eth1 to 192.168.16.15 port 67 May 31 18:27:31 linux3 dhclient: DHCPACK from 192.168.16.15 May 31 18:27:31 linux3 NetworkManager: <information>^IDHCP daemon state is now 3 (renew) for interface eth1 May 31 18:27:31 linux3 dhclient: bound to 192.168.16.195 -- renewal in 246 seconds. 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#ifconfig
collisions:0 txqueuelen:1000 RX bytes:444259115 (423.6 MiB) TX bytes:17458359 (16.6 MiB) # have to a specific service. Interrupt:169 Base address:0x2000 ~ PID logs the pid of the server processing the request. /etc/xinetd.d/telnetd [+]emote host's ip address. 4,1 All eth1 Link encap:Ethernet HWaddr 00:01:02:B4:61:10 soEXIT logs the exit status of the server. inet addr:192.168.16.195 Bcast:192.168.16.255 Mask:255.255.255.0 log_on_success = HOST PID ... user = telnetd lo Link encap:Local Loopback lnetd 0,0-1 All inet addr:127.0.0.1 Mask:255.0.0.0 38,1 64% inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:30671 errors:0 dropped:0 overruns:0 frame:0 TX packets:30671 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1311077 (1.2 MiB) TX bytes:1311077 (1.2 MiB) 8 fewer lines; before #1 3 seconds ago |
#vim /etc/network/interfaces
|
#ifconfig eth1 0.0.0.0
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:75:75:46:C1 inet addr:192.168.16.3 Bcast:192.168.16.255 Mask:255.255.255.0 inet6 addr: fe80::204:75ff:fe75:46c1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:370780 errors:0 dropped:0 overruns:3 frame:0 TX packets:208639 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:444278437 (423.6 MiB) TX bytes:17498303 (16.6 MiB) Interrupt:169 Base address:0x2000 eth1 Link encap:Ethernet HWaddr 00:01:02:B4:61:10 ... RX bytes:2232037 (2.1 MiB) TX bytes:643985 (628.8 KiB) Interrupt:185 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:30671 errors:0 dropped:0 overruns:0 frame:0 TX packets:30671 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1311077 (1.2 MiB) TX bytes:1311077 (1.2 MiB) |
#tail -f /var/log/daemon.log
~ log_on_failure = HOST ~ # The maximum number of connections a specific IP address can # have to a specific service. ~ per_source = 5 May 31 18:29:18 linux3 xinetd[29673]: Exiting... May 31 18:29:23 linux3 xinetd[29823]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.conf] [line=10] service telnet May 31 18:29:23 linux3 xinetd[29823]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] { protocol = tcp ... May 31 18:29:23 linux3 xinetd[29823]: removing daytime May 31 18:29:23 linux3 xinetd[29823]: removing discard May 31 18:29:23 linux3 xinetd[29823]: removing discard May 31 18:29:23 linux3 xinetd[29823]: removing echo May 31 18:29:23 linux3 xinetd[29823]: removing echo May 31 18:29:23 linux3 xinetd[29823]: removing time May 31 18:29:23 linux3 xinetd[29823]: removing time May 31 18:29:23 linux3 xinetd[29823]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:29:23 linux3 xinetd[29823]: Started working: 2 available services 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#tail -f /var/log/daemon.log
~ log_on_failure = HOST ~ # The maximum number of connections a specific IP address can # have to a specific service. ~ per_source = 5 } May 31 18:30:12 linux3 xinetd[29823]: Exiting... service telnet May 31 18:30:12 linux3 xinetd[29877]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.conf] [line=10] { protocol = tcp ... May 31 18:30:12 linux3 xinetd[29877]: removing daytime May 31 18:30:12 linux3 xinetd[29877]: removing discard May 31 18:30:12 linux3 xinetd[29877]: removing discard May 31 18:30:12 linux3 xinetd[29877]: removing echo May 31 18:30:12 linux3 xinetd[29877]: removing echo May 31 18:30:12 linux3 xinetd[29877]: removing time May 31 18:30:12 linux3 xinetd[29877]: removing time May 31 18:30:12 linux3 xinetd[29877]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:30:12 linux3 xinetd[29877]: Started working: 1 available service 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#vim /etc/xinetd.d/daytime
|
#vim /etc/xinetd.d/telnet
|
#tail -f /var/log/daemon.log
~ log_on_failure = HOST ~ # The maximum number of connections a specific IP address can # have to a specific service. ~ per_source = 5 } May 31 18:31:52 linux3 last message repeated 2 times service telnet May 31 18:31:55 linux3 xinetd[29877]: Exiting... { protocol = tcp ... May 31 18:31:59 linux3 xinetd[30001]: removing discard May 31 18:31:59 linux3 xinetd[30001]: removing discard May 31 18:31:59 linux3 xinetd[30001]: removing echo May 31 18:31:59 linux3 xinetd[30001]: removing echo May 31 18:31:59 linux3 xinetd[30001]: removing time May 31 18:31:59 linux3 xinetd[30001]: removing time May 31 18:32:00 linux3 xinetd[30001]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:32:00 linux3 xinetd[30001]: Started working: 2 available services May 31 18:32:06 linux3 dhclient: DHCPREQUEST on eth1 to 192.168.16.15 port 67 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#vim /etc/xinetd.conf
|
#vim /etc/xinetd.
|
#vim /etc/xinetd.
|
#vim /etc/xinetd.d/
|
#vim /etc/xinetd.d/echo
|
#vim /etc/xinetd.conf
|
#vim /etc/xinetd.d/telnet
|
#grep telnet /etc/services
telnet 23/tcp rtelnet 107/tcp # Remote Telnet rtelnet 107/udp telnets 992/tcp # Telnet over SSL telnets 992/udp tfido 60177/tcp # fidonet EMSI over telnet |
#vim /etc/xinetd.d/telnet
8c8 < user = telnetd --- > user = root |
#vim /etc/xinetd.d/telnet
|
#tail -f /var/log/daemon.log
May 31 18:31:59 linux3 xinetd[30001]: removing discard May 31 18:31:59 linux3 xinetd[30001]: removing echo May 31 18:31:59 linux3 xinetd[30001]: removing echo May 31 18:31:59 linux3 xinetd[30001]: removing time May 31 18:31:59 linux3 xinetd[30001]: removing time May 31 18:32:00 linux3 xinetd[30001]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:32:00 linux3 xinetd[30001]: Started working: 2 available services May 31 18:32:06 linux3 dhclient: DHCPREQUEST on eth1 to 192.168.16.15 port 67 May 31 18:32:39 linux3 last message repeated 2 times May 31 18:33:40 linux3 last message repeated 4 times ... May 31 18:34:45 linux3 xinetd[30205]: removing echo May 31 18:34:45 linux3 xinetd[30205]: removing echo May 31 18:34:45 linux3 xinetd[30205]: removing time May 31 18:34:45 linux3 xinetd[30205]: removing time May 31 18:34:45 linux3 xinetd[30205]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:34:45 linux3 xinetd[30205]: Started working: 2 available services May 31 18:34:53 linux3 dhclient: DHCPREQUEST on eth1 to 192.168.16.15 port 67 May 31 18:35:23 linux3 last message repeated 3 times May 31 18:35:58 linux3 last message repeated 3 times May 31 18:36:18 linux3 dhclient: DHCPREQUEST on eth1 to 255.255.255.255 port 67 |
#telnet 127.0.0.1
instances = 25 ~ # The type of logging. This logs to a file that is specified. Trying 127.0.0.1... log_type = FILE /var/log/servicelog Connected to 127.0.0.1. # What to log when the connection succeeds. Escape character is '^]'. # HOST logs the remote host's ip address. Debian GNU/Linux lenny/sid ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#tel
Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused |
#netstat -lnp | grep 23
instances = 25 ~ # The type of logging. This logs to a file that is specified. tcp 0 0 127.0.0.1:49269 0.0.0.0:* LISTEN 2423/python log_type = FILE /var/log/servicelog tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 30205/xinetd # What to log when the connection succeeds. unix 2 [ ACC ] STREAM LISTENING 10411 3593/gnome-power-ma /tmp/orbit-user/linc-def-0-b0a3ae6df234 # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#telnet 192.168.16.3 23
instances = 25 ~ # The type of logging. This logs to a file that is specified. Trying 192.168.16.3... log_type = FILE /var/log/servicelog Connected to 192.168.16.3. # What to log when the connection succeeds. Escape character is '^]'. # HOST logs the remote host's ip address. Debian GNU/Linux lenny/sid ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
$w
18:36:07 up 8:44, 9 users, load average: 0,34, 0,31, 0,20 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 - 16:16 6.00s 17.79s 0.05s /bin/login -- root tty2 - 12:04 15:11m 0.47s 0.01s /bin/login -- user :0 - 10:35 ?xdm? 26:12m 0.86s x-session-manager user pts/2 :0.0 15:37 2:49 0.30s 0.28s script -f -q /home/user/.lilalo//2353511696154873709-118061504 root pts/6 :pts/0:S.0 18:21 1:24m 0.14s 0.05s script -f -q /root/.lilalo//3193737561314225098-1180624889.scr root pts/8 net.nt 18:21 0.00s 0.17s 0.07s script -f -q /root/.lilalo//1958492472332712824-1180624909.scr root pts/10 :pts/9:S.1 18:25 6.00s 0.02s 0.01s script -f -q /root/.lilalo//3056530530197805275-1180625115.scr root pts/12 :pts/9:S.2 18:35 0.00s 0.00s 0.00s script -f -q /root/.lilalo//3128158142845116236-1180625713.scr user pts/15 linux3.net.nt 18:35 0.00s 0.23s 0.00s login -h linux3.net.nt -p |
$exit
instances = 25 ~ # The type of logging. This logs to a file that is specified. Connection closed by foreign host. log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#vim /etc/xinetd.d/telnet
|
#vim /etc/xinetd.d/telnet
8c8 < user = root --- > user = telnetd |
#ssh root@192.168.16.2c
|
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#tail -r /var/log/daemon.log
instances = 25 ~ # The type of logging. This logs to a file that is specified. tail: invalid option -- r log_type = FILE /var/log/servicelog Попробуйте `tail --help' для получения более подробного описания. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#tail -f
May 31 18:39:36 linux3 xinetd[30824]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:39:36 linux3 xinetd[30824]: Started working: 2 available services May 31 18:39:37 linux3 xinetd[30824]: Exiting... May 31 18:39:39 linux3 xinetd[30852]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.conf] [line=10] May 31 18:39:39 linux3 xinetd[30852]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] May 31 18:39:39 linux3 xinetd[30852]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25] May 31 18:39:39 linux3 xinetd[30852]: Reading included configuration file: /etc/xinetd.d/telnet [file=/etc/xinetd.d/telnet] [line=26] May 31 18:39:39 linux3 xinetd[30852]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=10] May 31 18:39:39 linux3 xinetd[30852]: removing daytime May 31 18:39:39 linux3 xinetd[30852]: removing daytime May 31 18:39:39 linux3 xinetd[30852]: removing discard May 31 18:39:39 linux3 xinetd[30852]: removing discard May 31 18:39:39 linux3 xinetd[30852]: removing echo May 31 18:39:39 linux3 xinetd[30852]: removing echo May 31 18:39:39 linux3 xinetd[30852]: removing time May 31 18:39:39 linux3 xinetd[30852]: removing time May 31 18:39:39 linux3 xinetd[30852]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 31 18:39:39 linux3 xinetd[30852]: Started working: 2 available services 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#/etc/init.d/xinetd restart
instances = 25 ~ # The type of logging. This logs to a file that is specified. Stopping internet superserver: xinetd. log_type = FILE /var/log/servicelog Starting internet superserver: xinetd. # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#netstat -lnp | grep :23
instances = 25 ~ # The type of logging. This logs to a file that is specified. tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 30852/xinetd log_type = FILE /var/log/servicelog # What to log when the connection succeeds. # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. log_on_success = HOST PID } ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#!tel
telnet 127.0.0.1 3300 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused |
#telnet 127.0.0.1
instances = 25 ~ # The type of logging. This logs to a file that is specified. Trying 127.0.0.1... log_type = FILE /var/log/servicelog Connected to 127.0.0.1. # What to log when the connection succeeds. Escape character is '^]'. # HOST logs the remote host's ip address. Debian GNU/Linux lenny/sid ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
$echo YES | wall
instances = 25 ~ # The type of logging. This logs to a file that is specified. log_type = FILE /var/log/servicelog Broadcast Message from user@linux3 # What to log when the connection succeeds. (/dev/pts/15) at 18:40 ... # HOST logs the remote host's ip address. # EXIT logs the exit status of the server. YES ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
$exit
exit Connection closed by foreign host. |
#mc
|
#tail -f /var/log/daemon.log
instances = 25 ~ # The type of logging. This logs to a file that is specified. May 31 18:39:39 linux3 xinetd[30852]: removing echo log_type = FILE /var/log/servicelog May 31 18:39:39 linux3 xinetd[30852]: removing echo # What to log when the connection succeeds. May 31 18:39:39 linux3 xinetd[30852]: removing time # HOST logs the remote host's ip address. May 31 18:39:39 linux3 xinetd[30852]: removing time ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#netstat -nlp | grep :23
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 31178/xinetd |
#telnet 127.0.0.1
instances = 25 ~ # The type of logging. This logs to a file that is specified. Trying 127.0.0.1... log_type = FILE /var/log/servicelog Connected to 127.0.0.1. # What to log when the connection succeeds. Escape character is '^]'. # HOST logs the remote host's ip address. Debian GNU/Linux lenny/sid ... } ~ service telnet ~ { protocol = tcp ~ wait = no user = telnetd /etc/xinservertelnetd /usr/sbin/in.telnetd 0,0-1 All /tmp/xinetd 38,1 64% 8 fewer lines; before #1 3 seconds ago |
#vim /etc/dhcp3/dhclient
|
#vim /etc/dhcp3/dhclient
|
#vim /etc/dhcp3/dhclient.conf
|
#vim /etc/hosts.allow
|
#vim /etc/hosts.deny
|
#telnet 127.0.0.1
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. |
#vim /etc/hosts.allow
16a17 > telnet: 192.168.16.1 |
#vim /etc/hosts.allow
17a18 > telnet: 127.0.0.1 |
Время первой команды журнала | 18:14:42 2007- 5-31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 18:44:38 2007- 5-31 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 19.80 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.50 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 3.37 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ 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 |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008