/l3/users/25-05-2009/nt-net/debian4.unix.nt/root :1 :2 :3 :4 :5 :6 |
|
#ps waux | grep xinetd
root 1724 0.0 0.1 2276 804 ? Ss 13:33 0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive root 2703 0.0 0.1 4620 740 ttyp4 R+ 14:33 0:00 grep xinetd |
#tail /var/log/daemon.log
May 26 13:33:42 debian4 xinetd[1724]: removing echo May 26 13:33:42 debian4 xinetd[1724]: removing echo May 26 13:33:42 debian4 xinetd[1724]: removing time May 26 13:33:42 debian4 xinetd[1724]: removing time May 26 13:33:42 debian4 xinetd[1724]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 26 13:33:42 debian4 xinetd[1724]: Started working: 0 available services May 26 14:32:41 debian4 xinetd[2686]: Bad operator for attribute: includedir [file=/etc/xinetd.conf] [line=36] May 26 14:32:41 debian4 xinetd[2686]: missing service keyword [file=/etc/xinetd.conf] [line=37] May 26 14:32:41 debian4 xinetd[2686]: missing } in last service entry [file=/etc/xinetd.conf] [line=38] May 26 14:32:41 debian4 xinetd[2686]: 2686 {init_services} no services. Exiting... |
#xinetd re
Usage: xinetd [-d] [-f config_file] [-filelog filename] [-syslog facility] [-reuse] [-limit proc_limit] [-pidfile filename] [-logprocs limit] [-shutdownprocs limit] [-cc interval] |
#vim /etc/xinetd.conf
--- /tmp/l3-saved-2760.16992.14157 2009-05-26 14:36:26.000000000 +0300 +++ /etc/xinetd.conf 2009-05-26 14:40:45.000000000 +0300 @@ -9,6 +9,7 @@ # The defaults section sets some information for all services +includedir /usr/local/etc/xinet.d defaults { #The maximum number of requests a particular service may handle @@ -33,6 +34,6 @@ # The maximum number of connections a specific IP address can # have to a specific service. per_source = 5 - includedir /usr/local/etc/xinet.d + } |
#vim /usr/local/etc/xinet.d/calc
--- /tmp/l3-saved-2760.21714.31465 2009-05-26 14:44:48.000000000 +0300 +++ /usr/local/etc/xinet.d/calc 2009-05-26 14:45:21.000000000 +0300 @@ -4,7 +4,7 @@ # to the originating source the time in seconds since midnight on January first # 1900. # This is the tcp version. -sevice calc +ser:vice calc { disable =no type = INTERNAL |
#whereis
whereis [ -sbmu ] [ -SBM dir ... -f ] name... |
#whereis xinetd
xinetd: /usr/sbin/xinetd /etc/xinetd.d /etc/xinetd.conf /usr/share/man/man8/xinetd.8.gz |
#/etc/xinetd
bash: /etc/xinetd: No such file or directory |
#xin
[root@debian4:~]# /etc/xinetd.d bash: /etc/xinetd.d: is a directory xinetd xinit |
#xin
xinetd xinit |
#xin
xinetd xinit |
#xinetd
|
#tail /var/log/daemon.log
May 26 13:33:42 debian4 xinetd[1724]: Started working: 0 available services May 26 14:32:41 debian4 xinetd[2686]: Bad operator for attribute: includedir [file=/etc/xinetd.conf] [line=36] May 26 14:32:41 debian4 xinetd[2686]: missing service keyword [file=/etc/xinetd.conf] [line=37] May 26 14:32:41 debian4 xinetd[2686]: missing } in last service entry [file=/etc/xinetd.conf] [line=38] May 26 14:32:41 debian4 xinetd[2686]: 2686 {init_services} no services. Exiting... May 26 14:42:57 debian4 xinetd[2850]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:42:57 debian4 xinetd[2850]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:42:57 debian4 xinetd[2850]: Reading included configuration file: /usr/local/etc/xinet.d/time [file=/usr/local/etc/xinet.d/time] [line=27] May 26 14:42:57 debian4 xinetd[2850]: missing service keyword [file=/usr/local/etc/xinet.d/time] [line=7] May 26 14:42:57 debian4 xinetd[2850]: 2850 {init_services} no services. Exiting... |
#xinetd
|
#tail /var/log/daemon.log
May 26 14:32:41 debian4 xinetd[2686]: missing } in last service entry [file=/etc/xinetd.conf] [line=38] May 26 14:32:41 debian4 xinetd[2686]: 2686 {init_services} no services. Exiting... May 26 14:42:57 debian4 xinetd[2850]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:42:57 debian4 xinetd[2850]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:42:57 debian4 xinetd[2850]: Reading included configuration file: /usr/local/etc/xinet.d/time [file=/usr/local/etc/xinet.d/time] [line=27] May 26 14:42:57 debian4 xinetd[2850]: missing service keyword [file=/usr/local/etc/xinet.d/time] [line=7] May 26 14:42:57 debian4 xinetd[2850]: 2850 {init_services} no services. Exiting... May 26 14:44:00 debian4 xinetd[2867]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:44:00 debian4 xinetd[2867]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:44:00 debian4 xinetd[2867]: 2867 {init_services} no services. Exiting... |
#xinetd
|
#vim /usr/local/etc/xinet.d/calc
--- /tmp/l3-saved-2760.21014.334 2009-05-26 14:45:43.000000000 +0300 +++ /usr/local/etc/xinet.d/calc 2009-05-26 14:47:05.000000000 +0300 @@ -9,7 +9,7 @@ disable =no type = INTERNAL socket_type = stream - protocol = tcp +protocol = tcp user = root wait = no } |
#tail /var/log/daemon.log
May 26 14:42:57 debian4 xinetd[2850]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:42:57 debian4 xinetd[2850]: Reading included configuration file: /usr/local/etc/xinet.d/time [file=/usr/local/etc/xinet.d/time] [line=27] May 26 14:42:57 debian4 xinetd[2850]: missing service keyword [file=/usr/local/etc/xinet.d/time] [line=7] May 26 14:42:57 debian4 xinetd[2850]: 2850 {init_services} no services. Exiting... May 26 14:44:00 debian4 xinetd[2867]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:44:00 debian4 xinetd[2867]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:44:00 debian4 xinetd[2867]: 2867 {init_services} no services. Exiting... May 26 14:45:25 debian4 xinetd[2902]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:45:25 debian4 xinetd[2902]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:45:25 debian4 xinetd[2902]: 2902 {init_services} no services. Exiting... |
#xinetd start
Usage: xinetd [-d] [-f config_file] [-filelog filename] [-syslog facility] [-reuse] [-limit proc_limit] [-pidfile filename] [-logprocs limit] [-shutdownprocs limit] [-cc interval] |
#ssh root@192.168.16.5
The authenticity of host '192.168.16.5 (192.168.16.5)' can't be established. RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.5' (RSA) to the list of known hosts. root@192.168.16.5's password: Last login: Tue May 26 15:12:53 2009 from debian10.net.nt Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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=1293; pidfile=/root/.lilalo/l3-agent.pid |
#xinetd start
Usage: xinetd [-d] [-f config_file] [-filelog filename] [-syslog facility] [-reuse] [-limit proc_limit] [-pidfile filename] [-logprocs limit] [-shutdownprocs limit] [-cc interval] |
#tail /var/log/daemon.log
May 26 14:42:57 debian4 xinetd[2850]: 2850 {init_services} no services. Exiting... May 26 14:44:00 debian4 xinetd[2867]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:44:00 debian4 xinetd[2867]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:44:00 debian4 xinetd[2867]: 2867 {init_services} no services. Exiting... May 26 14:45:25 debian4 xinetd[2902]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:45:25 debian4 xinetd[2902]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:45:25 debian4 xinetd[2902]: 2902 {init_services} no services. Exiting... May 26 14:47:28 debian4 xinetd[2945]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:47:28 debian4 xinetd[2945]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:47:28 debian4 xinetd[2945]: 2945 {init_services} no services. Exiting... |
#vim /etc/services
--- /tmp/l3-saved-1629.10099.6487 2009-05-26 14:48:38.000000000 +0300 +++ /etc/services 2009-05-26 14:55:45.000000000 +0300 @@ -554,4 +554,11 @@ tfido 60177/tcp # fidonet EMSI over telnet fido 60179/tcp # fidonet EMSI over TCP vnc1 65534/tcp #VNC_inetd +calc 8899/tcp #calculator +x +x +calc +y +y +calc # Local services |
#whereis xinet
xinet: /usr/local/etc/xinet.d |
#/usr/local/etc/xinet.d
bash: /usr/local/etc/xinet.d: is a directory |
#ls -lh /etc/in
inetd.conf init.d/ inittab inputrc |
#ls -lh /etc/in
inetd.conf init.d/ inittab inputrc |
#ls -lh /etc/init.d/
итого 240K -rwxr-xr-x 1 root root 5,0K 2006-09-20 14:33 bootclean -rwxr-xr-x 1 root root 2,1K 2006-09-13 00:30 bootlogd -rwxr-xr-x 1 root root 1,9K 2006-09-20 14:27 bootmisc.sh -rwxr-xr-x 1 root root 2,9K 2006-09-14 11:20 checkfs.sh -rwxr-xr-x 1 root root 9,4K 2006-09-23 10:34 checkroot.sh -rwxr-xr-x 1 root root 468 2006-09-24 17:15 console-cyrillic -rwxr-xr-x 1 root root 6,5K 2006-09-05 23:32 console-screen.kbd.sh -rwxr-xr-x 1 root root 1,8K 2006-10-12 21:55 cron -rwxr-xr-x 1 root root 1,8K 2006-12-15 04:52 gdm ... -rwxr-xr-x 1 root root 520 2006-09-13 00:26 stop-bootlogd -rwxr-xr-x 1 root root 730 2006-10-02 20:14 stop-bootlogd-single -rwxr-xr-x 1 root root 541 2006-04-06 22:58 sudo -rwxr-xr-x 1 root root 2,0K 2006-05-25 12:38 sysklogd -rwxr-xr-x 1 root root 3,2K 2006-11-25 11:22 umountfs -rwxr-xr-x 1 root root 2,1K 2006-11-26 20:23 umountnfs.sh -rwxr-xr-x 1 root root 1,1K 2006-09-30 17:37 umountroot -rwxr-xr-x 1 root root 1,8K 2006-09-13 00:30 urandom -rwxr-xr-x 1 root root 1,8K 2007-02-13 12:02 x11-common -rwxr-xr-x 1 root root 1,5K 2006-05-08 19:09 xinetd |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#tail /var/log/daemon.log
May 26 14:44:00 debian4 xinetd[2867]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:44:00 debian4 xinetd[2867]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:44:00 debian4 xinetd[2867]: 2867 {init_services} no services. Exiting... May 26 14:45:25 debian4 xinetd[2902]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:45:25 debian4 xinetd[2902]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:45:25 debian4 xinetd[2902]: 2902 {init_services} no services. Exiting... May 26 14:47:28 debian4 xinetd[2945]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:47:28 debian4 xinetd[2945]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:47:28 debian4 xinetd[2945]: 2945 {init_services} no services. Exiting... May 26 14:57:23 debian4 xinetd[1724]: Exiting... |
#vim /usr/local/etc/xinet.d/calc
--- /tmp/l3-saved-1629.2729.18161 2009-05-26 14:58:17.000000000 +0300 +++ /usr/local/etc/xinet.d/calc 2009-05-26 14:58:53.000000000 +0300 @@ -4,12 +4,11 @@ # to the originating source the time in seconds since midnight on January first # 1900. # This is the tcp version. -ser:vice calc +service calc { disable =no type = INTERNAL socket_type = stream -protocol = tcp user = root wait = no } |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#vim /etc/xinetd.conf
--- /tmp/l3-saved-1629.25411.26818 2009-05-26 14:59:35.000000000 +0300 +++ /etc/xinetd.conf 2009-05-26 15:00:05.000000000 +0300 @@ -9,8 +9,8 @@ # The defaults section sets some information for all services -includedir /usr/local/etc/xinet.d -defaults + includedir /usr/local/etc/xinet.d + defaults { #The maximum number of requests a particular service may handle # at once. |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#tail /var/log/daemon.log
May 26 14:45:25 debian4 xinetd[2902]: 2902 {init_services} no services. Exiting... May 26 14:47:28 debian4 xinetd[2945]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:47:28 debian4 xinetd[2945]: missing service keyword [file=/usr/local/etc/xinet.d/calc] [line=7] May 26 14:47:28 debian4 xinetd[2945]: 2945 {init_services} no services. Exiting... May 26 14:57:23 debian4 xinetd[1724]: Exiting... May 26 14:58:56 debian4 xinetd[3067]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:58:56 debian4 xinetd[3067]: No such internal service: calc/stream - DISABLING May 26 14:58:56 debian4 xinetd[3067]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 26 14:58:56 debian4 xinetd[3067]: Started working: 0 available services May 26 15:00:10 debian4 xinetd[3067]: Exiting... |
#vim
--- /tmp/l3-saved-1629.15308.3085 2009-05-26 15:01:22.000000000 +0300 +++ /usr/local/etc/xinet.d/calc 2009-05-26 15:07:07.000000000 +0300 @@ -11,6 +11,7 @@ socket_type = stream user = root wait = no + port = 8899 } # This is the udp version. |
#/etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
#tail /var/log/daemon.log
May 26 14:57:23 debian4 xinetd[1724]: Exiting... May 26 14:58:56 debian4 xinetd[3067]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 14:58:56 debian4 xinetd[3067]: No such internal service: calc/stream - DISABLING May 26 14:58:56 debian4 xinetd[3067]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 26 14:58:56 debian4 xinetd[3067]: Started working: 0 available services May 26 15:00:10 debian4 xinetd[3067]: Exiting... May 26 15:07:12 debian4 xinetd[3149]: Reading included configuration file: /usr/local/etc/xinet.d/calc [file=/etc/xinetd.conf] [line=12] May 26 15:07:12 debian4 xinetd[3149]: No such internal service: calc/stream - DISABLING May 26 15:07:12 debian4 xinetd[3149]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. May 26 15:07:12 debian4 xinetd[3149]: Started working: 0 available services |
#touch /usr/local/etc/xinet.d/
|
#touch /usr/local/etc/xinet.d/chargen
|
#vim
--- /tmp/l3-saved-1629.15970.28972 2009-05-26 15:08:55.000000000 +0300 +++ /usr/local/etc/xinet.d/chargen 2009-05-26 15:12:36.000000000 +0300 @@ -0,0 +1,11 @@ +service chargen + +{ +type = INTERNAL +id = chargen-stream +socket_type = stream +protocol = tcp +user = root +wait = no +disable = no +} |
##111
|
#vim /usr/local/etc/xinet.d/calc
--- /tmp/l3-saved-1629.10751.26555 2009-05-26 15:16:17.000000000 +0300 +++ /usr/local/etc/xinet.d/calc 2009-05-26 15:16:38.000000000 +0300 @@ -11,7 +11,6 @@ socket_type = stream user = root wait = no - port = 8899 } # This is the udp version. |
#vim /etc/xinetd.conf
|
#man eval
|
#man ssh
|
#man ssh-agent
|
#vim /etc/inetd.conf
|
#vim /usr/local/etc
|
#vim /usr/local/etc/inetd.conf/telnet
|
#vim /etc/rc.conf
|
#vim /etc/ssh/sshd_config
|
#ssh user@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established. RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'localhost' (RSA) to the list of known hosts. user@localhost's password: Linux debian4 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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. Last login: Tue May 26 15:24:19 2009 from host202.net.nt l3-agent is already running: pid=1335; pidfile=/home/user/.lilalo/l3-agent.pid |
$scp -r root@192.168.16.5: /etc ~/etc_that
|
#ssh root@192.168.16.4
The authenticity of host '192.168.16.4 (192.168.16.4)' can't be established. RSA key fingerprint is 51:5b:32:d8:70:19:6d:04:c7:b4:11:49:13:74:dc:bc. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.4' (RSA) to the list of known hosts. root@192.168.16.4's password: Last login: Tue May 26 11:28:06 2009 from debian10.net.nt Linux debian4 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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=1595; pidfile=/root/.lilalo/l3-agent.pid openpty failed Connection to 192.168.16.4 closed. |
#exit
exit Connection to 192.168.16.5 closed. |
$ls -lah ~
итого 3,0M drwxr-xr-x 14 user user 728 2009-05-26 15:24 . drwxr-xr-x 205 root root 4,9K 2008-03-14 11:04 .. -rw------- 1 user user 1,6K 2009-05-26 16:35 .bash_history -rw-r--r-- 1 user user 220 2007-12-23 16:52 .bash_logout -rw-r--r-- 1 user root 424 2009-04-30 15:11 .bash_profile -rw-r--r-- 1 user user 2,3K 2009-04-30 15:11 .bashrc -rw------- 1 user user 26 2007-12-23 16:52 .dmrc drwxr-xr-x 5 user user 248 2007-12-23 17:01 .fluxbox drwxr-xr-x 2 user user 240 2009-05-25 10:38 .fontconfig ... -rw------- 1 user user 35 2009-05-25 12:00 .lesshst drwxr-xr-x 2 user root 3,5K 2009-05-26 16:37 .lilalo drwxr-xr-x 2 user user 120 2009-05-26 14:19 .mc drwx------ 3 user user 72 2007-12-23 17:01 .mozilla -rw------- 1 user user 264 2009-05-26 12:49 .recently-used drwxr-xr-x 2 root root 80 2009-04-30 15:12 .ssh -rwxr-xr-x 1 user user 3,0M 2009-05-25 10:36 ug-bsdnet.pdf -rw------- 1 user user 3,8K 2009-05-26 14:17 .viminfo -rw------- 1 user user 171 2009-05-26 15:24 .Xauthority -rw-r--r-- 1 user user 1,1K 2009-05-26 12:49 .xsession-errors |
$sudo
Password: |
$ls -lah ~
итого 3,0M drwxr-xr-x 14 user user 728 2009-05-26 15:24 . drwxr-xr-x 205 root root 4,9K 2008-03-14 11:04 .. -rw------- 1 user user 1,6K 2009-05-26 16:35 .bash_history -rw-r--r-- 1 user user 220 2007-12-23 16:52 .bash_logout -rw-r--r-- 1 user root 424 2009-04-30 15:11 .bash_profile -rw-r--r-- 1 user user 2,3K 2009-04-30 15:11 .bashrc -rw------- 1 user user 26 2007-12-23 16:52 .dmrc drwxr-xr-x 5 user user 248 2007-12-23 17:01 .fluxbox drwxr-xr-x 2 user user 240 2009-05-25 10:38 .fontconfig ... -rw------- 1 user user 35 2009-05-25 12:00 .lesshst drwxr-xr-x 2 user root 3,5K 2009-05-26 16:39 .lilalo drwxr-xr-x 2 user user 120 2009-05-26 14:19 .mc drwx------ 3 user user 72 2007-12-23 17:01 .mozilla -rw------- 1 user user 264 2009-05-26 12:49 .recently-used drwxr-xr-x 2 root root 80 2009-04-30 15:12 .ssh -rwxr-xr-x 1 user user 3,0M 2009-05-25 10:36 ug-bsdnet.pdf -rw------- 1 user user 3,8K 2009-05-26 14:17 .viminfo -rw------- 1 user user 171 2009-05-26 15:24 .Xauthority -rw-r--r-- 1 user user 1,1K 2009-05-26 12:49 .xsession-errors |
$su -
Password: l3-agent is already running: pid=1595; pidfile=/root/.lilalo/l3-agent.pid |
#sudo scp -r root@192.168.16.5: /etc ~/etc_that
|
#ls -l /home/user/
итого 2983 -rwxr-xr-x 1 root root 13 2008-03-11 12:42 hello -rwxr-xr-x 1 user user 3046166 2009-05-25 10:36 ug-bsdnet.pdf |
#ls -l /home/user/
итого 2983 -rwxr-xr-x 1 root root 13 2008-03-11 12:42 hello -rwxr-xr-x 1 user user 3046166 2009-05-25 10:36 ug-bsdnet.pdf |
#ls -l /root/
итого 4 -rw-r--r-- 1 root root 0 2008-03-12 12:05 1234 -rw-r--r-- 1 root root 715 2009-05-26 14:31 calc |
#ls -l /root/
итого 4 -rw-r--r-- 1 root root 0 2008-03-12 12:05 1234 -rw-r--r-- 1 root root 715 2009-05-26 14:31 calc |
#ls -la
итого 51 drwxr-xr-x 9 root root 472 2009-05-26 16:30 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. -rw-r--r-- 1 root root 0 2008-03-12 12:05 1234 -rw------- 1 root root 5839 2009-05-26 16:35 .bash_history -rw-r--r-- 1 root root 19 2008-03-10 15:10 .bash_profile -rw-r--r-- 1 root root 444 2008-03-12 10:43 .bashrc -rw-r--r-- 1 root root 715 2009-05-26 14:31 calc drwx------ 2 root root 48 2008-03-13 13:12 .gconf drwx------ 2 root root 80 2008-03-13 13:17 .gconfd drwx------ 2 root root 176 2009-05-25 10:31 .gnupg -rw-r--r-- 1 root root 51 2009-05-24 13:26 .l3rc -rw------- 1 root root 105 2009-05-26 16:26 .lesshst drwxr-xr-x 2 root root 5992 2009-05-26 16:44 .lilalo drwxr-xr-x 2 root root 72 2009-05-26 14:22 .mc drwx------ 3 root root 72 2008-03-13 13:12 .mozilla -rw-r--r-- 1 root root 110 2004-11-10 18:10 .profile drwx------ 2 root root 112 2009-04-30 15:12 .ssh -rw------- 1 root root 6919 2009-05-26 16:30 .viminfo -rw-r--r-- 1 root root 51 2008-03-11 17:53 .vimrc |
#ls -la
итого 51 drwxr-xr-x 9 root root 472 2009-05-26 16:30 . drwxr-xr-x 23 root root 544 2008-07-04 20:13 .. -rw-r--r-- 1 root root 0 2008-03-12 12:05 1234 -rw------- 1 root root 5839 2009-05-26 16:35 .bash_history -rw-r--r-- 1 root root 19 2008-03-10 15:10 .bash_profile -rw-r--r-- 1 root root 444 2008-03-12 10:43 .bashrc -rw-r--r-- 1 root root 715 2009-05-26 14:31 calc drwx------ 2 root root 48 2008-03-13 13:12 .gconf drwx------ 2 root root 80 2008-03-13 13:17 .gconfd drwx------ 2 root root 176 2009-05-25 10:31 .gnupg -rw-r--r-- 1 root root 51 2009-05-24 13:26 .l3rc -rw------- 1 root root 105 2009-05-26 16:26 .lesshst drwxr-xr-x 2 root root 5992 2009-05-26 16:44 .lilalo drwxr-xr-x 2 root root 72 2009-05-26 14:22 .mc drwx------ 3 root root 72 2008-03-13 13:12 .mozilla -rw-r--r-- 1 root root 110 2004-11-10 18:10 .profile drwx------ 2 root root 112 2009-04-30 15:12 .ssh -rw------- 1 root root 6919 2009-05-26 16:30 .viminfo -rw-r--r-- 1 root root 51 2008-03-11 17:53 .vimrc |
#ssh root@192.168.16.5
root@192.168.16.5's password: Last login: Tue May 26 16:37:22 2009 from host202.net.nt Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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=1293; pidfile=/root/.lilalo/l3-agent.pid |
#ssh root@192.168.16.5
root@192.168.16.5's password: Last login: Tue May 26 16:37:22 2009 from host202.net.nt Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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=1293; pidfile=/root/.lilalo/l3-agent.pid |
#ssh root@192.168.16.5 pw useradd newuser
root@192.168.16.5's password: bash: pw: command not found |
#ssh root@192.168.16.5 pw useradd newuser
root@192.168.16.5's password: bash: pw: command not found |
#ssh root@192.168.16.5
root@192.168.16.5's password: passwd: неизвестный пользователь newuser |
#ssh root@192.168.16.5
root@192.168.16.5's password: passwd: неизвестный пользователь newuser |
#ssh root@192.168.16.5 passwd newuser
root@192.168.16.5's password: passwd: неизвестный пользователь newuser |
#ssh root@192.168.16.5 passwd newuser
root@192.168.16.5's password: passwd: неизвестный пользователь newuser |
#ssh-keygen -t rsa1
[root@debian4:~]# ssh root@192.168.16.5 passwd newuser root@192.168.16.5's password: Enter new UNIX password: password Retype new UNIX password: password passwd: пароль успешно обновлён Generating public/private rsa1 key pair. Enter file in which to save the key (/root/.ssh/identity): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/identity. Your public key has been saved in /root/.ssh/identity.pub. The key fingerprint is: 1f:78:d8:dd:d5:d0:51:ae:16:dd:51:03:6e:31:bd:b1 root@debian4 |
#ssh-keygen -t rsa1
[root@debian4:~]# ssh root@192.168.16.5 passwd newuser root@192.168.16.5's password: Enter new UNIX password: password Retype new UNIX password: password passwd: пароль успешно обновлён Generating public/private rsa1 key pair. Enter file in which to save the key (/root/.ssh/identity): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/identity. Your public key has been saved in /root/.ssh/identity.pub. The key fingerprint is: 1f:78:d8:dd:d5:d0:51:ae:16:dd:51:03:6e:31:bd:b1 root@debian4 |
#ssh-keygen -t rsa
Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: a4:5d:ab:1e:7a:60:05:65:25:3d:6b:cf:1c:e8:30:65 root@debian4 |
#ssh-keygen -t rsa
Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: a4:5d:ab:1e:7a:60:05:65:25:3d:6b:cf:1c:e8:30:65 root@debian4 |
#ssh-keygen -t d
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: 8c:77:38:56:a2:94:fa:d9:0e:2f:ad:16:cd:41:f4:39 root@debian4 |
#ssh-keygen -t d
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: 8c:77:38:56:a2:94:fa:d9:0e:2f:ad:16:cd:41:f4:39 root@debian4 |
#ssh root@192.168.16.5
root@192.168.16.5's password: Last login: Tue May 26 16:46:26 2009 from linux4.net.nt Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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=1293; pidfile=/root/.lilalo/l3-agent.pid |
#ssh root@192.168.16.5
root@192.168.16.5's password: Last login: Tue May 26 16:46:26 2009 from linux4.net.nt Linux debiant 2.6.18-5-xen-686 #1 SMP Fri Jun 1 05:05:24 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=1293; pidfile=/root/.lilalo/l3-agent.pid |
Время первой команды журнала | 14:32:51 2009- 5-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:55:20 2009- 5-26 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 24.75 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.21 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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