/l3/users/10-09-2007/nt-bsdnet/fbsd2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
#ps waux | grep xinetd
root 3358 0.0 0.1 1592 1036 p4 S+ 1:16PM 0:00.00 grep xinetd |
#killall -1 xinetd
No matching processes were found |
#ps waux | grep xinetd
|
#ps waux | grep xinetd
|
#./xinetd start
Starting xinetd. |
#ps waux | grep xinetd
root 3399 0.0 0.1 1592 1036 p4 S+ 1:16PM 0:00.00 grep xinetd |
#./xinetd start
Starting xinetd. |
#tail /var/log/messages
Sep 11 13:16:25 fbsd2 xinetd[3351]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:25 fbsd2 xinetd[3351]: 3351 {init_services} no services. Exiting... Sep 11 13:16:55 fbsd2 xinetd[3392]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:55 fbsd2 xinetd[3392]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:55 fbsd2 xinetd[3392]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:55 fbsd2 xinetd[3392]: 3392 {init_services} no services. Exiting... Sep 11 13:16:59 fbsd2 xinetd[3413]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... |
#vi /usr/local/etc/xinetd.conf
36c36 < includedir /usr/local/etc/xinetd.d --- > includedir = /usr/local/etc/xinetd.d |
#./xinetd start
Starting xinetd. |
#tail /var/log/messages
Sep 11 13:16:55 fbsd2 xinetd[3392]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:55 fbsd2 xinetd[3392]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:55 fbsd2 xinetd[3392]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:55 fbsd2 xinetd[3392]: 3392 {init_services} no services. Exiting... Sep 11 13:16:59 fbsd2 xinetd[3413]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... Sep 11 13:17:45 fbsd2 xinetd[3447]: attribute: includedir should not be in default section [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:17:45 fbsd2 xinetd[3447]: 3447 {init_services} no services. Exiting... |
#vi /usr/local/etc/xinetd.conf
|
#vi /usr/local/etc/xinetd.conf
36d35 < includedir = /usr/local/etc/xinetd.d 38c37 < --- > includedir = /usr/local/etc/xinetd.d |
#./xinetd start
Starting xinetd. |
#ps waux | grep xinetd
root 3502 0.0 0.1 1592 1036 p4 S+ 1:18PM 0:00.00 grep xinetd |
#tail /var/log/messages
Sep 11 13:16:55 fbsd2 xinetd[3392]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:55 fbsd2 xinetd[3392]: 3392 {init_services} no services. Exiting... Sep 11 13:16:59 fbsd2 xinetd[3413]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... Sep 11 13:17:45 fbsd2 xinetd[3447]: attribute: includedir should not be in default section [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:17:45 fbsd2 xinetd[3447]: 3447 {init_services} no services. Exiting... Sep 11 13:18:46 fbsd2 xinetd[3495]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:18:46 fbsd2 xinetd[3495]: 3495 {init_services} no services. Exiting... |
#l
total 34 drwxr-xr-x 2 root wheel 512 Sep 11 13:05 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -r-xr-xr-x 1 root wheel 472 Oct 15 2006 001slpd.sh -r-xr-xr-x 1 root wheel 833 Oct 28 2006 avahi-daemon.sh -r-xr-xr-x 1 root wheel 1072 Oct 28 2006 avahi-dnsconfd.sh -r-xr-xr-x 1 root wheel 508 Oct 16 2006 cupsd -r-xr-xr-x 1 root wheel 622 Oct 28 2006 dbus -r-xr-xr-x 1 root wheel 523 Nov 1 2006 gdm -r-xr-xr-x 1 root wheel 1082 Oct 31 2006 hald -r-xr-xr-x 1 root wheel 57 Oct 28 2006 kdelibs.sh -r-xr-xr-x 1 root wheel 345 Oct 15 2006 mdnsd -r-xr-xr-x 1 root wheel 995 Oct 28 2006 polkitd -r-xr-xr-x 1 root wheel 606 Oct 15 2006 rsyncd -r-xr-xr-x 1 root wheel 1269 Oct 16 2006 snmpd -r-xr-xr-x 1 root wheel 813 Oct 16 2006 snmptrapd -r-xr-xr-x 1 root wheel 805 Oct 16 2006 svnserve -r-xr-xr-x 1 root wheel 461 Oct 16 2006 xinetd |
#more xinetd
|
#tail /var/log/messages
Sep 11 13:16:55 fbsd2 xinetd[3392]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:55 fbsd2 xinetd[3392]: 3392 {init_services} no services. Exiting... Sep 11 13:16:59 fbsd2 xinetd[3413]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... Sep 11 13:17:45 fbsd2 xinetd[3447]: attribute: includedir should not be in default section [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:17:45 fbsd2 xinetd[3447]: 3447 {init_services} no services. Exiting... Sep 11 13:18:46 fbsd2 xinetd[3495]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:18:46 fbsd2 xinetd[3495]: 3495 {init_services} no services. Exiting... |
#vi /usr/local/etc/xinetd.conf
37c37 < includedir = /usr/local/etc/xinetd.d --- > includedir = /usr/local/etc/xinetd.d/ |
#./xinetd start
Starting xinetd. |
#tail /var/log/messages
Sep 11 13:16:59 fbsd2 xinetd[3413]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... Sep 11 13:17:45 fbsd2 xinetd[3447]: attribute: includedir should not be in default section [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:17:45 fbsd2 xinetd[3447]: 3447 {init_services} no services. Exiting... Sep 11 13:18:46 fbsd2 xinetd[3495]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:18:46 fbsd2 xinetd[3495]: 3495 {init_services} no services. Exiting... Sep 11 13:19:57 fbsd2 xinetd[3556]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:19:57 fbsd2 xinetd[3556]: 3556 {init_services} no services. Exiting... |
#vi /usr/local/etc/xinetd.conf
|
#l /usr/local/etc/xinetd.d
total 34 drwxr-xr-x 2 root wheel 512 Sep 11 13:05 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -r-xr-xr-x 1 root wheel 472 Oct 15 2006 001slpd.sh -r-xr-xr-x 1 root wheel 833 Oct 28 2006 avahi-daemon.sh -r-xr-xr-x 1 root wheel 1072 Oct 28 2006 avahi-dnsconfd.sh -r-xr-xr-x 1 root wheel 508 Oct 16 2006 cupsd -r-xr-xr-x 1 root wheel 622 Oct 28 2006 dbus -r-xr-xr-x 1 root wheel 523 Nov 1 2006 gdm -r-xr-xr-x 1 root wheel 1082 Oct 31 2006 hald -r-xr-xr-x 1 root wheel 57 Oct 28 2006 kdelibs.sh -r-xr-xr-x 1 root wheel 345 Oct 15 2006 mdnsd -r-xr-xr-x 1 root wheel 995 Oct 28 2006 polkitd -r-xr-xr-x 1 root wheel 606 Oct 15 2006 rsyncd -r-xr-xr-x 1 root wheel 1269 Oct 16 2006 snmpd -r-xr-xr-x 1 root wheel 813 Oct 16 2006 snmptrapd -r-xr-xr-x 1 root wheel 805 Oct 16 2006 svnserve -r-xr-xr-x 1 root wheel 461 Oct 16 2006 xinetd |
#l /usr/local/etc/xinetd
total 34 drwxr-xr-x 2 root wheel 512 Sep 11 13:05 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -r-xr-xr-x 1 root wheel 472 Oct 15 2006 001slpd.sh -r-xr-xr-x 1 root wheel 833 Oct 28 2006 avahi-daemon.sh -r-xr-xr-x 1 root wheel 1072 Oct 28 2006 avahi-dnsconfd.sh -r-xr-xr-x 1 root wheel 508 Oct 16 2006 cupsd -r-xr-xr-x 1 root wheel 622 Oct 28 2006 dbus -r-xr-xr-x 1 root wheel 523 Nov 1 2006 gdm -r-xr-xr-x 1 root wheel 1082 Oct 31 2006 hald -r-xr-xr-x 1 root wheel 57 Oct 28 2006 kdelibs.sh -r-xr-xr-x 1 root wheel 345 Oct 15 2006 mdnsd -r-xr-xr-x 1 root wheel 995 Oct 28 2006 polkitd -r-xr-xr-x 1 root wheel 606 Oct 15 2006 rsyncd -r-xr-xr-x 1 root wheel 1269 Oct 16 2006 snmpd -r-xr-xr-x 1 root wheel 813 Oct 16 2006 snmptrapd -r-xr-xr-x 1 root wheel 805 Oct 16 2006 svnserve -r-xr-xr-x 1 root wheel 461 Oct 16 2006 xinetd |
#cd /usr/lcoal/etc
bash: cd: /usr/lcoal/etc: No such file or directory |
#cd /usr/locl/etc
|
#l
-rw-r--r-- 1 root wheel 1314 Sep 11 13:19 xinetd.conf drwxr-xr-x 2 root wheel 512 Sep 11 13:15 xinetd.d -r--r--r-- 1 root wheel 340 Oct 16 2006 xml2Conf.sh -r--r--r-- 1 root wheel 232 Oct 16 2006 xsltConf.sh drwxr-xr-x 2 root wheel 512 Sep 7 13:58 openslpit -rw-r--r-- 1 root wheel 28 Oct 16 2006 orbit2rc -rw-r--r-- 1 root wheel 28 Oct 16 2006 orbit2rc.default drwxr-xr-x 2 root wheel 512 Sep 7 14:03 pam.d drwxr-xr-x 2 root wheel 512 Sep 7 13:53 pangoo-activation drwxr-xr-x 2 root wheel 512 Sep 11 13:05 rc.dcord ... -r--r--r-- 1 root wheel 35 Oct 16 2006 scrollkeeper.conf drwxr-xr-x 2 root wheel 512 Sep 7 13:59 snmpconf drwxr-xr-x 3 root wheel 512 Sep 7 13:52 soundonf.default -r--r----- 1 root wheel 606 Sep 9 11:19 sudoers -r--r--r-- 1 root wheel 608 Oct 15 2006 sudoers.default -r--r--r-- 1 root wheel 4127 Oct 15 2006 sudoers.sample drwxr-xr-x 3 root wheel 512 Sep 7 13:52 vfsme-vfs-2.0 drwxr-xr-x 2 root wheel 512 Sep 7 14:08 vgame-vfs-mime-magic -r--r--r-- 1 root wheel 4224 Sep 7 16:38 wgetrc0 drwxr-xr-x 3 root wheel 512 Sep 7 13:54 xdgsguarddrc |
#cd xinetd.d
|
#l
total 6 drwxr-xr-x 2 root wheel 512 Sep 11 13:15 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -rw-r--r-- 1 root wheel 139 Sep 11 13:15 chargen |
#vi /usr/local/etc/xinetd.conf
|
#l
total 6 drwxr-xr-x 2 root wheel 512 Sep 11 13:15 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -rw-r--r-- 1 root wheel 139 Sep 11 13:15 chargen |
#l /usr/local/etc/xinetd
total 6 drwxr-xr-x 2 root wheel 512 Sep 11 13:15 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -rw-r--r-- 1 root wheel 139 Sep 11 13:15 chargen |
#./xinetd start
bash: ./xinetd: No such file or directory |
#cd /usr/local/etc/rc.d
|
#l
total 34 drwxr-xr-x 2 root wheel 512 Sep 11 13:05 . drwxr-xr-x 29 root wheel 1024 Sep 11 13:09 .. -r-xr-xr-x 1 root wheel 472 Oct 15 2006 001slpd.sh -r-xr-xr-x 1 root wheel 833 Oct 28 2006 avahi-daemon.sh -r-xr-xr-x 1 root wheel 1072 Oct 28 2006 avahi-dnsconfd.sh -r-xr-xr-x 1 root wheel 508 Oct 16 2006 cupsd -r-xr-xr-x 1 root wheel 622 Oct 28 2006 dbus -r-xr-xr-x 1 root wheel 523 Nov 1 2006 gdm -r-xr-xr-x 1 root wheel 1082 Oct 31 2006 hald -r-xr-xr-x 1 root wheel 57 Oct 28 2006 kdelibs.sh -r-xr-xr-x 1 root wheel 345 Oct 15 2006 mdnsd -r-xr-xr-x 1 root wheel 995 Oct 28 2006 polkitd -r-xr-xr-x 1 root wheel 606 Oct 15 2006 rsyncd -r-xr-xr-x 1 root wheel 1269 Oct 16 2006 snmpd -r-xr-xr-x 1 root wheel 813 Oct 16 2006 snmptrapd -r-xr-xr-x 1 root wheel 805 Oct 16 2006 svnserve -r-xr-xr-x 1 root wheel 461 Oct 16 2006 xinetd |
#tail /var/log/messages
Sep 11 13:16:59 fbsd2 xinetd[3413]: Bad operator for attribute: includedir [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing service keyword [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... Sep 11 13:17:45 fbsd2 xinetd[3447]: attribute: includedir should not be in default section [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:17:45 fbsd2 xinetd[3447]: 3447 {init_services} no services. Exiting... Sep 11 13:18:46 fbsd2 xinetd[3495]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:18:46 fbsd2 xinetd[3495]: 3495 {init_services} no services. Exiting... Sep 11 13:19:57 fbsd2 xinetd[3556]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:19:57 fbsd2 xinetd[3556]: 3556 {init_services} no services. Exiting... |
#vi /usr/local/etc/xinetd.conf
|
#vi /usr/local/etc/xinetd.conf
|
#vi /usr/local/etc/xinetd.conf
|
#vim/usr/local/etc/xinetd.conf
# The type of logging. This logs to a file that is specified. # Another option is: SYSLOG syslog_facility [syslog_level] # What to log when the connection succeeds.ame options as above # PID logs the pid of the server processing the request. # HOST logs the remote host's ip address. # USERID logs the remote user (using RFC 1413) # EXIT logs the exit status of the server. # DURATION logs the duration of the session. # The maximum number of connections a specific IP address can # What to log when the connection fails. Same options as above per_source = 5 # The maximum number of connections a specific IP address can } # have to a specific service. includedir = /usr/local/etc/xinetd.d/ includedir = /usr/local/etc/xinetd.d/ "/usr/local/etc/xinetd.conf" 37 lines, 1313 characters written |
#vim /usr/local/etc/xinetd.conf
37c37 < includedir = /usr/local/etc/xinetd.d/ --- > includedir /usr/local/etc/xinetd.d/ |
#./xinetd reart
xinetd not running? Starting xinetd. |
#tail /var/log/messages
Sep 11 13:16:59 fbsd2 xinetd[3413]: missing } in last service entry [file=/usr/local/etc/xinetd.conf] [line=38] Sep 11 13:16:59 fbsd2 xinetd[3413]: 3413 {init_services} no services. Exiting... Sep 11 13:17:45 fbsd2 xinetd[3447]: attribute: includedir should not be in default section [file=/usr/local/etc/xinetd.conf] [line=36] Sep 11 13:17:45 fbsd2 xinetd[3447]: 3447 {init_services} no services. Exiting... Sep 11 13:18:46 fbsd2 xinetd[3495]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:18:46 fbsd2 xinetd[3495]: 3495 {init_services} no services. Exiting... Sep 11 13:19:57 fbsd2 xinetd[3556]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:19:57 fbsd2 xinetd[3556]: 3556 {init_services} no services. Exiting... Sep 11 13:23:49 fbsd2 xinetd[3805]: missing service keyword [file=/usr/local/etc/xinetd.d//chargen] [line=1] Sep 11 13:23:49 fbsd2 xinetd[3805]: 3805 {init_services} no services. Exiting... |
#vim /usr/local/etc/xinetd.d/chargen
1c1 < ervice chargen --- > service chargen |
#./xinetd restart
xinetd not running? Starting xinetd. |
#tail /var/log/messages
Sep 11 13:18:46 fbsd2 xinetd[3495]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:18:46 fbsd2 xinetd[3495]: 3495 {init_services} no services. Exiting... Sep 11 13:19:57 fbsd2 xinetd[3556]: Unable to read included directory: = [file=/usr/local/etc/xinetd.conf] [line=37] Sep 11 13:19:57 fbsd2 xinetd[3556]: 3556 {init_services} no services. Exiting... Sep 11 13:23:49 fbsd2 xinetd[3805]: missing service keyword [file=/usr/local/etc/xinetd.d//chargen] [line=1] Sep 11 13:23:49 fbsd2 xinetd[3805]: 3805 {init_services} no services. Exiting... Sep 11 13:24:28 fbsd2 xinetd[3846]: Bad socket type: strewam [file=/usr/local/etc/xinetd.d//chargen] [line=5] Sep 11 13:24:28 fbsd2 xinetd[3846]: Error parsing attribute socket_type - DISABLING SERVICE [file=/usr/local/etc/xinetd.d//chargen] [line=5] Sep 11 13:24:28 fbsd2 xinetd[3846]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Sep 11 13:24:28 fbsd2 xinetd[3846]: Started working: 1 available service |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root xinetd 3846 0 tcp4 *:19 *:* root Xorg 1248 3 tcp4 *:6000 *:* root sendmail 831 3 tcp4 127.0.0.1:25 *:* root sshd 825 4 tcp4 *:22 *:* root syslogd 651 7 udp4 *:514 *:* |
#sockstat -14
sockstat: illegal option -- 1 Usage: sockstat [-46clu] [-p ports] |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root xinetd 3846 0 tcp4 *:19 *:* root Xorg 1248 3 tcp4 *:6000 *:* root sendmail 831 3 tcp4 127.0.0.1:25 *:* root sshd 825 4 tcp4 *:22 *:* root syslogd 651 7 udp4 *:514 *:* |
#lsof | grep listen
bash: lsof: command not found |
#pkg_add -r lsof
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/lsof.tbz... Done. |
#rehash
bash: rehash: command not found |
#lsof | grep listen
lsof: WARNING: access /root/.lsof_fbsd2: No such file or directory lsof: WARNING: created device cache file: /root/.lsof_fbsd2 |
#lsof | grep listen
|
#lsof | grep listen
|
#vi echo
|
#cd /usr/local/etc/rc.d
|
#./xinetd restart
Stopping xinetd. Starting xinetd. |
#tail -f /var/log/messages
Sep 11 13:24:28 fbsd2 xinetd[3846]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Sep 11 13:24:28 fbsd2 xinetd[3846]: Started working: 1 available service Sep 11 13:25:40 fbsd2 su: user to root on /dev/ttyp9 Sep 11 13:29:50 fbsd2 su: user to root on /dev/ttyp9 Sep 11 13:42:43 fbsd2 xinetd[3846]: Exiting... Sep 11 13:42:43 fbsd2 xinetd[4246]: Bad socket type: strewam [file=/usr/local/etc/xinetd.d//chargen] [line=5] Sep 11 13:42:43 fbsd2 xinetd[4246]: Error parsing attribute socket_type - DISABLING SERVICE [file=/usr/local/etc/xinetd.d//chargen] [line=5] Sep 11 13:42:43 fbsd2 xinetd[4246]: bad service attribute: socket-type [file=/usr/local/etc/xinetd.d//echo] [line=5] Sep 11 13:42:43 fbsd2 xinetd[4246]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Sep 11 13:42:43 fbsd2 xinetd[4246]: Started working: 2 available services ^C^C |
#vi /etc/hosts.allow
22a23,25 > chargen: 192.168.15.0/24 : allow > chargen: ALL : deny > echo : ALL : allow |
#telnet locahost chargen
locahost: hostname nor servname provided, or not known |
#telnet localost chargen
Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost.unix.nt. Escape character is '^]'. Connection closed by foreign host. |
#vi /etc/hosts.allow
23a24 > chargen: 127.0.0.1 lolhost : allow |
#telnet localhost chargen
RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;< STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<= TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=> UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>? VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@A XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@AB YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABC Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCD [\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDE ... !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi #$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij $%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl &'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno |
#pkg_add -r nmap
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/Latest/nmap.tbz... Done. pkg_add: package 'nmap-4.11' or its older version already installed |
#telnet 192.168.15.242
STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<= TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=> UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>? VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ WXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@A XYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@AB YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABC Z[\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCD [\]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDE \]^_`abcdefghijklmnopqrstuvwxyz{|}!"#$%&'()*+,-./0123456789:;<=>?@ABCDEF ... "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi #$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij $%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk %&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl &'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm '()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop |
#telnet 192.168.15.242 echo
Trying 192.168.15.242... Connected to host242.unix.nt. Escape character is '^]'. Connection closed by foreign host. |
#telnet 192.168.15.242 echo
Trying 192.168.15.242... Connected to host242.unix.nt. Escape character is '^]'. ^C :q :q ^] telnet> q Connection closed. |
#vi /etc/hosts.allow
23c23 < chargen: 192.168.15.0/24 : allow --- > chargen: 192.168.15.0/255.255.255.0 : allow |
#nmap localhost
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-09-11 13:51 EEST Interesting ports on localhost.unix.nt (127.0.0.1): Not shown: 1675 closed ports PORT STATE SERVICE 7/tcp open echo 19/tcp open chargen 22/tcp open ssh 25/tcp open smtp 6000/tcp open X11 Nmap finished: 1 IP address (1 host up) scanned in 10.407 seconds |
#more /etc/make.conf
|
#ssh 192.168.15.180
root@192.168.15.180's password: ble to print partial mailbox contents w/ biff, Last login: Mon Sep 10 12:07:18 2007 from host242.unix.ntl has been received. Linux debian 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 comsat 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=15034; pidfile=/root/.lilalo/l3-agent.pid |
#screen
|
#screen -x
|
#exit
Connection to 192.168.15.180 closed. |
#ssh 192.168.15.243
1 # $FreeBSD: src/etc/inetd.conf,v 1.70.2.2 2006/09/07 20:03:25 obrien Exp $ 2 # 3 # Internet server configuration database 4 # 5 # Define *both* IPv4 and IPv6 entries for dual-stack support. The authenticity of host '192.168.15.243 (192.168.15.243)' can't be established. DSA key fingerprint is 2f:cc:06:36:59:8e:4d:d1:1f:c8:9e:b1:0d:04:0f:9e.gerd -s "/etc/inetd.conf" 128L, 5495C Are you sure you want to continue connecting (yes/no)? noec/fingerd fingerd -s Host key verification failed. 26 # run comsat as root to be able to print partial mailbox contents w/ biff, 27 # or use the safer tty:tty to just print that new mail has been received. 28 #comsat dgram udp wait tty:tty /usr/libexec/comsat comsat |
#ssh 192.168.15.242
Password: Last login: Tue Sep 11 15:08:48 2007 from host180.unix.nt Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-RELEASE (SMP) #0: Fri Jan 12 11:05:30 UTC 2007 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. ... 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. l3-agent is already running: pid=20144; pidfile=/root/.lilalo/l3-agent.pid |
#screen
|
#screen -x
|
#exit
Connection to 192.168.15.242 closed. |
#exit
Connection to 192.168.15.242 closed. |
#ssh root@192.168.15.242
Password: Last login: Tue Sep 11 15:21:56 2007 from host180.unix.nt Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-RELEASE (SMP) #0: Fri Jan 12 11:05:30 UTC 2007 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. ... 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. l3-agent is already running: pid=20144; pidfile=/root/.lilalo/l3-agent.pid |
#screen -x
|
#shutdown -h now
Shutdown NOW! shutdown: [pid 5054] |
#vi /etc/inetd.conf
15c15 < #telnet stream tcp nowait root /usr/libexec/telnetd telnetd --- > telnet stream tcp nowait root /usr/libexec/telnetd telnetd |
#vi /etc/rc.conf
|
#vi /etc/rc.conf
|
#vi /etc/inetd.conf
15c15 < telnet stream tcp nowait root /usr/libexec/telnetd telnetd --- > #telnet stream tcp nowait root /usr/libexec/telnetd telnetd |
#vi /usr/local/etc/xinetd.d/telnet
|
#killall -1 xinetd
|
#telnet localhost
Trying ::1... telnet: connect to address ::1: Permission denied Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Permission denied telnet: Unable to connect to remote host |
#telnet 127.0.0.1
Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Permission denied telnet: Unable to connect to remote host |
#vi /etc/hosts.allow
24c24 < chargen: 127.0.0.1 lolhost : allow --- > chargen: 127.0.0.1 localhost : allow 26a27,30 > > telnet : 127.0.0.1 localhost : allow > telnet : ALL : deny > |
#telnet localhost
Trying ::1... telnet: connect to address ::1: Permission denied Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Permission denied telnet: Unable to connect to remote host |
#tail /var/log/messages
Sep 12 09:54:20 fbsd2 kernel: info: [drm] Initialized i915 1.4.0 20060119 Sep 12 09:55:02 fbsd2 su: user to root on /dev/ttyp4 Sep 12 09:58:25 fbsd2 xinetd[720]: Starting reconfiguration Sep 12 09:58:25 fbsd2 xinetd[720]: Bad socket type: strewam [file=/usr/local/etc/xinetd.d//chargen] [line=5] Sep 12 09:58:25 fbsd2 xinetd[720]: Error parsing attribute socket_type - DISABLING SERVICE [file=/usr/local/etc/xinetd.d//chargen] [line=5] Sep 12 09:58:25 fbsd2 xinetd[720]: bad service attribute: socket-type [file=/usr/local/etc/xinetd.d//echo] [line=5] Sep 12 09:58:25 fbsd2 xinetd[720]: Swapping defaults Sep 12 09:58:25 fbsd2 xinetd[720]: readjusting service chargen-stream Sep 12 09:58:25 fbsd2 xinetd[720]: readjusting service echo-stream Sep 12 09:58:25 fbsd2 xinetd[720]: Reconfigured: new=1 old=2 dropped=0 (services) |
#netstat -an | more
|
#l
total 54 drwxr-xr-x 9 user wheel 1024 Sep 12 09:54 . drwxr-xr-x 5 root wheel 512 Sep 9 11:18 .. lrwxr-xr-x 1 user wheel 39 Sep 12 09:54 .DCOPserver_fbsd2.unix.nt_:0 -> /ho me/user/.DCOPserver_fbsd2.unix.nt__0 -rw-r--r-- 1 user wheel 60 Sep 12 09:54 .DCOPserver_fbsd2.unix.nt__0 -rw------- 1 user wheel 203 Sep 12 09:54 .ICEauthority -rw------- 1 user wheel 751 Sep 11 17:39 .bash_history -rw-r--r-- 1 user wheel 19 Sep 7 22:53 .bash_profile -rw-r--r-- 1 user wheel 43 Sep 7 22:49 .bashrc ... -rw-r--r-- 1 user wheel 52 Sep 7 22:50 .l3rc -rw------- 1 user wheel 35 Sep 11 17:08 .lesshst drwxr-xr-x 2 user wheel 2048 Sep 12 09:54 .lilalo drwx------ 3 user wheel 512 Sep 10 10:49 .local -rw-r--r-- 1 user wheel 248 Sep 7 14:52 .login -rw-r--r-- 1 user wheel 158 Sep 7 14:52 .login_conf -rw------- 1 user wheel 373 Sep 7 14:52 .mail_aliases -rw-r--r-- 1 user wheel 331 Sep 7 14:52 .mailrc drwxr-xr-x 3 user wheel 512 Sep 10 10:49 .mcop -rw------- 1 user wheel 31 Sep 12 09:54 .mcoprc |
#vi /etc/hosts.allow
|
Время первой команды журнала | 13:16:25 2007- 9-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:00:57 2007- 9-12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 19.80 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 1.98 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.89 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.89 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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