/l3/users/lav/nt-bsdnet/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 |
|
#vi /etc/resolv.conf
|
#cd /etc/namedb/named.conf
bash: cd: /etc/namedb/named.conf: Not a directory |
#vietc/namedb/named.conf
}; }; zone "1.168.192.in-addr.arpa" { type slave; file "slave/1.168.192.in-addr.arpa"; masters { 192.168.1.1; }; }; */ zone "lav.unix.nt" { type master; /etc/namedb/db.lav.unix.nt" allow-query { 0.0.0.0/0; }; allow-transfer { 127.0.0.1; }; }; /etc/namedb/named.conf: 138 ÓÔÒÏË, 3893 ÓÉÍ×ÏÌÏ× |
#vi /etc/namedb/db.lav.unix.nt
|
#ping ya.ru
ping: cannot resolve ya.ru: Host name lookup failure |
#/etc/rc.d/named restart
Stopping named. Waiting for PIDS: 365. Starting named. |
#ping ya.ru
PING ya.ru (213.180.204.8): 56 data bytes 64 bytes from 213.180.204.8: icmp_seq=0 ttl=55 time=126.655 ms 64 bytes from 213.180.204.8: icmp_seq=1 ttl=55 time=121.022 ms 64 bytes from 213.180.204.8: icmp_seq=2 ttl=55 time=130.479 ms 64 bytes from 213.180.204.8: icmp_seq=3 ttl=55 time=116.587 ms 64 bytes from 213.180.204.8: icmp_seq=4 ttl=55 time=119.504 ms 64 bytes from 213.180.204.8: icmp_seq=5 ttl=55 time=122.618 ms ^C --- ya.ru ping statistics --- 6 packets transmitted, 6 packets received, 0% packet loss round-trip min/avg/max/stddev = 116.587/122.811/130.479/4.591 ms |
#tail /var/log/messages
Sep 21 11:13:54 fbsd1 sm-mta[5004]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: optional socket disabled Sep 21 11:14:41 fbsd1 sm-mta[5055]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: can't create server SMTP socket: Protocol not supported Sep 21 11:14:41 fbsd1 sm-mta[5055]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: optional socket disabled Sep 21 11:16:24 fbsd1 sm-mta[5110]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: can't create server SMTP socket: Protocol not supported Sep 21 11:16:24 fbsd1 sm-mta[5110]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: optional socket disabled Sep 21 11:51:47 fbsd1 named[365]: stopping command channel on 127.0.0.1#953 Sep 21 11:51:47 fbsd1 named[365]: exiting Sep 21 11:51:49 fbsd1 named[5372]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 11:51:49 fbsd1 named[5372]: command channel listening on 127.0.0.1#953 Sep 21 11:51:49 fbsd1 named[5372]: running |
#ipfw show
00010 56191 19131400 allow ip from any to any 65535 183 10908 deny ip from any to any |
#dig server2.lav.unix.nt
; <<>> DiG 9.3.1 <<>> server2.lav.unix.nt ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61522 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;server2.lav.unix.nt. IN A ;; ANSWER SECTION: server2.lav.unix.nt. 10800 IN A 192.168.15.2 ;; AUTHORITY SECTION: lav.unix.nt. 10800 IN NS server2.lav.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 11:52:51 2006 ;; MSG SIZE rcvd: 67 |
#dig lav.unix.nt
; <<>> DiG 9.3.1 <<>> lav.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50781 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;lav.unix.nt. IN MX ;; ANSWER SECTION: lav.unix.nt. 10800 IN MX 10 server2.lav.unix.nt. ;; AUTHORITY SECTION: lav.unix.nt. 10800 IN NS server2.lav.unix.nt. ;; ADDITIONAL SECTION: server2.lav.unix.nt. 10800 IN A 192.168.15.2 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 11:53:56 2006 ;; MSG SIZE rcvd: 83 |
#dig lav.unix.nt mx
; <<>> DiG 9.3.1 <<>> lav.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64066 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;lav.unix.nt. IN MX ;; ANSWER SECTION: lav.unix.nt. 10800 IN MX 10 server2.lav.unix.nt. ;; AUTHORITY SECTION: lav.unix.nt. 10800 IN NS server2.lav.unix.nt. ;; ADDITIONAL SECTION: server2.lav.unix.nt. 10800 IN A 192.168.15.2 ;; Query time: 2 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 11:55:44 2006 ;; MSG SIZE rcvd: 83 |
#vi /etc/rc.conf
|
#tail /var/log/messages
Sep 21 11:51:47 fbsd1 named[365]: exiting Sep 21 11:51:49 fbsd1 named[5372]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 11:51:49 fbsd1 named[5372]: command channel listening on 127.0.0.1#953 Sep 21 11:51:49 fbsd1 named[5372]: running Sep 21 11:56:53 fbsd1 sshd[5444]: error: PAM: authentication error for illegal user devi from 192.168.15.254 Sep 21 12:00:03 fbsd1 named[5372]: stopping command channel on 127.0.0.1#953 Sep 21 12:00:03 fbsd1 named[5372]: exiting Sep 21 12:00:03 fbsd1 named[5688]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 12:00:03 fbsd1 named[5688]: command channel listening on 127.0.0.1#953 Sep 21 12:00:03 fbsd1 named[5688]: running |
#sockstat
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS user kdeinit 5526 3 stream -> /tmp/ksocket-user/konquerorN75wuQ.slave-socket user kdeinit 5526 7 stream -> /tmp/.ICE-unix/dcop698-1158818987 bind named 5372 3 dgram -> /var/run/logpriv bind named 5372 20 udp4 127.0.0.1:53 *:* bind named 5372 21 tcp4 127.0.0.1:53 *:* bind named 5372 22 udp4 *:53466 *:* bind named 5372 23 tcp4 127.0.0.1:953 *:* smmsp sendmail 5114 3 dgram -> /var/run/log root sendmail 5110 3 dgram -> /var/run/logpriv ... root Xorg 668 30 stream /tmp/.X11-unix/X0 user xinit 667 3 stream -> /tmp/.X11-unix/X0 root login 609 3 dgram -> /var/run/logpriv root sshd 485 3 tcp4 *:22 *:* root syslogd 304 3 dgram /var/run/log root syslogd 304 4 dgram /var/run/logpriv root syslogd 304 5 dgram /var/run/log root syslogd 304 6 dgram /var/named/var/run/log root syslogd 304 7 udp4 *:514 *:* root devd 271 4 stream /var/run/devd.pipe |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS bind named 5372 20 udp4 127.0.0.1:53 *:* bind named 5372 21 tcp4 127.0.0.1:53 *:* bind named 5372 22 udp4 *:53466 *:* bind named 5372 23 tcp4 127.0.0.1:953 *:* root sendmail 5110 4 tcp4 *:25 *:* root sendmail 5110 5 tcp4 *:587 *:* user licq 2395 8 tcp4 *:53159 *:* root Xorg 668 1 tcp4 *:6000 *:* root sshd 485 3 tcp4 *:22 *:* root syslogd 304 7 udp4 *:514 *:* |
#vi /etc/namedb/db.lav.unix.nt
|
#vi /etc/namedb/named.conf
|
#/etc/rc.d/named restart
Stopping named. Starting named. |
#sockstat
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS bind named 5688 3 dgram -> /var/run/logpriv bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* bind named 5688 24 udp4 *:54241 *:* bind named 5688 25 tcp4 127.0.0.1:953 *:* user kdeinit 5526 3 stream -> /tmp/ksocket-user/konquerorN75wuQ.slave-socket user kdeinit 5526 7 stream -> /tmp/.ICE-unix/dcop698-1158818987 ... root Xorg 668 30 stream /tmp/.X11-unix/X0 user xinit 667 3 stream -> /tmp/.X11-unix/X0 root login 609 3 dgram -> /var/run/logpriv root sshd 485 3 tcp4 *:22 *:* root syslogd 304 3 dgram /var/run/log root syslogd 304 4 dgram /var/run/logpriv root syslogd 304 5 dgram /var/run/log root syslogd 304 6 dgram /var/named/var/run/log root syslogd 304 7 udp4 *:514 *:* root devd 271 4 stream /var/run/devd.pipe |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* bind named 5688 24 udp4 *:54241 *:* bind named 5688 25 tcp4 127.0.0.1:953 *:* root sendmail 5110 4 tcp4 *:25 *:* root sendmail 5110 5 tcp4 *:587 *:* user licq 2395 8 tcp4 *:53159 *:* root Xorg 668 1 tcp4 *:6000 *:* root sshd 485 3 tcp4 *:22 *:* root syslogd 304 7 udp4 *:514 *:* |
#less sendmail.cf
|
#ls
Makefile fbsd1.unix.nt.submit.cf mailer.conf README fbsd1.unix.nt.submit.mc mailertable.sample access.sample freebsd.cf sendmail.cf aliases freebsd.mc submit.cf aliases.db freebsd.submit.cf virtusertable.sample fbsd1.unix.nt.cf freebsd.submit.mc fbsd1.unix.nt.mc helpfile |
#vi fbsd1.unix.nt.mc
|
#ls
Makefile fbsd1.unix.nt.submit.cf mailer.conf README fbsd1.unix.nt.submit.mc mailertable.sample access.sample freebsd.cf sendmail.cf aliases freebsd.mc submit.cf aliases.db freebsd.submit.cf virtusertable.sample fbsd1.unix.nt.cf freebsd.submit.mc fbsd1.unix.nt.mc helpfile |
#vi local-host-names
|
#ls
Makefile fbsd1.unix.nt.submit.cf local-host-names README fbsd1.unix.nt.submit.mc mailer.conf access.sample freebsd.cf mailertable.sample aliases freebsd.mc sendmail.cf aliases.db freebsd.submit.cf submit.cf fbsd1.unix.nt.cf freebsd.submit.mc virtusertable.sample fbsd1.unix.nt.mc helpfile |
#/etc/rc.d/sendmail restart
Sep 21 11:51:47 fbsd1 named[365]: exiting Sep 21 11:51:49 fbsd1 named[5372]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 11:51:49 fbsd1 named[5372]: command channel listening on 127.0.0.1#953 Sep 21 11:51:49 fbsd1 named[5372]: running Sep 21 11:56:53 fbsd1 sshd[5444]: error: PAM: authentication error for illegal user devi from 192.168.15.254 Sep 21 12:00:03 fbsd1 named[5372]: stopping command channel on 127.0.0.1#953 Sep 21 12:00:03 fbsd1 named[5372]: exiting Sep 21 12:00:03 fbsd1 named[5688]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 12:00:03 fbsd1 named[5688]: command channel listening on 127.0.0.1#953 Sep 21 12:00:03 fbsd1 named[5688]: running Sep 21 12:08:46 fbsd1 sm-mta[5798]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: can't create server SMTP socket: Protocol not supported Sep 21 12:08:46 fbsd1 sm-mta[5798]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: optional socket disabled Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#tail -f /var/log/messages
Sep 21 11:51:47 fbsd1 named[365]: exiting Sep 21 11:51:49 fbsd1 named[5372]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 11:51:49 fbsd1 named[5372]: command channel listening on 127.0.0.1#953 Sep 21 11:51:49 fbsd1 named[5372]: running Sep 21 11:56:53 fbsd1 sshd[5444]: error: PAM: authentication error for illegal user devi from 192.168.15.254 Sep 21 12:00:03 fbsd1 named[5372]: stopping command channel on 127.0.0.1#953 Sep 21 12:00:03 fbsd1 named[5372]: exiting Sep 21 12:00:03 fbsd1 named[5688]: starting BIND 9.3.1 -u bind -t /var/named Sep 21 12:00:03 fbsd1 named[5688]: command channel listening on 127.0.0.1#953 Sep 21 12:00:03 fbsd1 named[5688]: running Sep 21 12:08:46 fbsd1 sm-mta[5798]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: can't create server SMTP socket: Protocol not supported Sep 21 12:08:46 fbsd1 sm-mta[5798]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon IPv6: optional socket disabled ^C |
#sockstat
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS smmsp sendmail 5802 3 dgram -> /var/run/log root sendmail 5798 3 tcp4 *:25 *:* root sendmail 5798 4 dgram -> /var/run/logpriv root sendmail 5798 5 tcp4 *:587 *:* bind named 5688 3 dgram -> /var/run/logpriv bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* ... root Xorg 668 30 stream /tmp/.X11-unix/X0 user xinit 667 3 stream -> /tmp/.X11-unix/X0 root login 609 3 dgram -> /var/run/logpriv root sshd 485 3 tcp4 *:22 *:* root syslogd 304 3 dgram /var/run/log root syslogd 304 4 dgram /var/run/logpriv root syslogd 304 5 dgram /var/run/log root syslogd 304 6 dgram /var/named/var/run/log root syslogd 304 7 udp4 *:514 *:* root devd 271 4 stream /var/run/devd.pipe |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root sendmail 5798 3 tcp4 *:25 *:* root sendmail 5798 5 tcp4 *:587 *:* bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* bind named 5688 24 udp4 *:54241 *:* bind named 5688 25 tcp4 127.0.0.1:953 *:* user licq 2395 8 tcp4 *:53159 *:* root Xorg 668 1 tcp4 *:6000 *:* root sshd 485 3 tcp4 *:22 *:* root syslogd 304 7 udp4 *:514 *:* |
#netstat-rn
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 192.168.15.254 UGS 0 11305 fxp0 127.0.0.1 127.0.0.1 UH 0 14689 lo0 192.168.15 link#1 UC 0 0 fxp0 192.168.15.21 00:0e:a6:1e:53:e8 UHLW 1 7 lo0 192.168.15.254 00:0a:01:d4:d1:39 UHLW 2 583 fxp0 1175 |
#netstat -lnp
netstat: option requires an argument -- p usage: netstat [-AaLnSW] [-f protocol_family | -p protocol] [-M core] [-N system] netstat -i | -I interface [-abdhnt] [-f address_family] [-M core] [-N system] netstat -w wait [-I interface] [-d] [-M core] [-N system] netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core] netstat -i | -I interface -s [-f protocol_family | -p protocol] [-M core] [-N system] netstat -m [-M core] [-N system] netstat -r [-AenW] [-f address_family] [-M core] [-N system] netstat -rs [-s] [-M core] [-N system] netstat -g [-W] [-f address_family] [-M core] [-N system] netstat -gs [-s] [-f address_family] [-M core] [-N system] |
#netstat -n
Active Internet connections Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.15.21.51213 62.149.17.62.18030 TIME_WAIT tcp4 0 0 192.168.15.21.64392 62.149.17.62.18030 TIME_WAIT tcp4 0 0 192.168.15.21.49550 62.149.17.62.18030 TIME_WAIT tcp4 0 0 192.168.15.21.53574 62.149.17.62.18030 TIME_WAIT tcp4 0 0 192.168.15.21.55568 205.188.7.250.5190 ESTABLISHED udp4 0 0 127.0.0.1.53 *.* udp4 0 0 192.168.15.21.53 *.* Active UNIX domain sockets ... c1c3494c stream 0 0 c1f1d440 0 0 0 /tmp/.X11-unix/X0 c1c35000 stream 0 0 c1c36660 0 0 0 /var/run/devd.pipe c3f1308c dgram 0 0 0 c1c34dac 0 0 c227ca64 dgram 0 0 0 c1c34e38 0 c1c34a64 c1c34a64 dgram 0 0 0 c1c34e38 0 c1c349d8 c1c349d8 dgram 0 0 0 c1c34e38 0 0 c1c34d20 dgram 0 0 c1c36770 0 0 0 /var/named/var/run/log c1c34dac dgram 0 0 c1c36880 0 c3f1308c 0 /var/run/log c1c34e38 dgram 0 0 c1c36990 0 c227ca64 0 /var/run/logpriv c1c34ec4 dgram 0 0 c1c36aa0 0 0 0 /var/run/log |
#na
bash: na: command not found |
#netstat -na
tcp4 0 0 192.168.15.21.49550 62.149.17.62.18030 TIME_WAIT tcp4 0 0 192.168.15.21.53574 62.149.17.62.18030 TIME_WAIT tcp4 0 0 *.587 *.* LISTEN tcp4 0 0 *.25 *.* LISTEN tcp4 0 0 127.0.0.1.953 *.* LISTEN tcp4 0 0 127.0.0.1.53 *.* LISTEN tcp4 0 0 192.168.15.21.53 *.* LISTEN tcp4 0 0 192.168.15.21.55568 205.188.7.250.5190 ESTABLISHED tcp4 0 0 *.53159 *.* LISTEN tcp4 0 0 *.6000 *.* LISTEN ... c1c3494c stream 0 0 c1f1d440 0 0 0 /tmp/.X11-unix/X0 c1c35000 stream 0 0 c1c36660 0 0 0 /var/run/devd.pipe c3f1308c dgram 0 0 0 c1c34dac 0 0 c227ca64 dgram 0 0 0 c1c34e38 0 c1c34a64 c1c34a64 dgram 0 0 0 c1c34e38 0 c1c349d8 c1c349d8 dgram 0 0 0 c1c34e38 0 0 c1c34d20 dgram 0 0 c1c36770 0 0 0 /var/named/var/run/log c1c34dac dgram 0 0 c1c36880 0 c3f1308c 0 /var/run/log c1c34e38 dgram 0 0 c1c36990 0 c227ca64 0 /var/run/logpriv c1c34ec4 dgram 0 0 c1c36aa0 0 0 0 /var/run/log |
#sockstat
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS smmsp sendmail 5802 3 dgram -> /var/run/log root sendmail 5798 3 tcp4 *:25 *:* root sendmail 5798 4 dgram -> /var/run/logpriv root sendmail 5798 5 tcp4 *:587 *:* bind named 5688 3 dgram -> /var/run/logpriv bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* ... root Xorg 668 30 stream /tmp/.X11-unix/X0 user xinit 667 3 stream -> /tmp/.X11-unix/X0 root login 609 3 dgram -> /var/run/logpriv root sshd 485 3 tcp4 *:22 *:* root syslogd 304 3 dgram /var/run/log root syslogd 304 4 dgram /var/run/logpriv root syslogd 304 5 dgram /var/run/log root syslogd 304 6 dgram /var/named/var/run/log root syslogd 304 7 udp4 *:514 *:* root devd 271 4 stream /var/run/devd.pipe |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root sendmail 5798 3 tcp4 *:25 *:* root sendmail 5798 5 tcp4 *:587 *:* bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* bind named 5688 24 udp4 *:54241 *:* bind named 5688 25 tcp4 127.0.0.1:953 *:* user licq 2395 8 tcp4 *:53159 *:* root Xorg 668 1 tcp4 *:6000 *:* root sshd 485 3 tcp4 *:22 *:* root syslogd 304 7 udp4 *:514 *:* |
#make && make install
/usr/bin/m4 -D_CF_DIR_=/usr/share/sendmail/cf/ /usr/share/sendmail/cf/m4/cf.m4 fbsd1.unix.nt.mc > fbsd1.unix.nt.cf install -m 444 fbsd1.unix.nt.cf /etc/mail/sendmail.cf install -m 444 fbsd1.unix.nt.submit.cf /etc/mail/submit.cf |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root sendmail 5798 3 tcp4 *:25 *:* root sendmail 5798 5 tcp4 *:587 *:* bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* bind named 5688 24 udp4 *:54241 *:* bind named 5688 25 tcp4 127.0.0.1:953 *:* user licq 2395 8 tcp4 *:53159 *:* root Xorg 668 1 tcp4 *:6000 *:* root sshd 485 3 tcp4 *:22 *:* root syslogd 304 7 udp4 *:514 *:* |
#sockstat -l4
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS root sendmail 5798 3 tcp4 *:25 *:* root sendmail 5798 5 tcp4 *:587 *:* bind named 5688 20 udp4 192.168.15.21:53 *:* bind named 5688 21 tcp4 192.168.15.21:53 *:* bind named 5688 22 udp4 127.0.0.1:53 *:* bind named 5688 23 tcp4 127.0.0.1:53 *:* bind named 5688 24 udp4 *:54241 *:* bind named 5688 25 tcp4 127.0.0.1:953 *:* user licq 2395 8 tcp4 *:53159 *:* root Xorg 668 1 tcp4 *:6000 *:* root sshd 485 3 tcp4 *:22 *:* root syslogd 304 7 udp4 *:514 *:* |
#vi fbsd1.unix.nt.mc
|
#telnet 127.0.0.1 25
Trying 127.0.0.1... Connected to localhost.linux.nt. Escape character is '^]'. 220 fbsd1.unix.nt ESMTP Sendmail 8.13.4/8.13.4; Thu, 21 Sep 2006 12:20:18 +0300 (EEST) HELLO s 500 5.5.1 Command unrecognized: "HELLO s" HELO s 250 fbsd1.unix.nt Hello localhost.linux.nt [127.0.0.1], pleased to meet you MAIL FROM user@lav.unix.nt 501 5.5.2 Syntax error in parameters scanning "FROM" ... ewjfkh wejfh . 250 2.0.0 k8L9KIF7005964 Message accepted for delivery 500 5.5.1 Command unrecognized: "" jg{e 500 5.5.1 Command unrecognized: "jg{e" QUIT 221 2.0.0 fbsd1.unix.nt closing connection Connection closed by foreign host. |
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 1 message 1 new >N 1 user@lav.unix.nt Thu Sep 21 12:22 15/476 & 1 Message 1: From user@lav.unix.nt Thu Sep 21 12:22:53 2006 Date: Thu, 21 Sep 2006 12:20:18 +0300 (EEST) From: User User <user@lav.unix.nt> To: undisclosed-recipients:; jkfshdfk ewjfkh wejfh & d & t No applicable messages & q |
$date |mail user
|
$mail
No mail for user |
$date | ail user
|
$mail
No mail for user |
$date | mail user@lav.unix.nt
|
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 1 message 1 new >N 1 user@fbsd1.linux.nt Thu Sep 21 12:31 17/693 & 1 Message 1: From user@fbsd1.linux.nt Thu Sep 21 12:31:49 2006 Date: Thu, 21 Sep 2006 12:31:48 +0300 (EEST) From: User User <user@fbsd1.linux.nt> To: user@lav.unix.nt ÞÅÔ×ÅÒÇ, 21 ÓÅÎÔÑÂÒÑ 2006 Ç. 12:31:48 (EEST) & d & t No applicable messages & ^[[A^[[Aq q" & qnown command: " |
$date | mail user@server2..nt
|
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 1 message 1 new >N 1 user@fbsd1.linux.nt Thu Sep 21 12:32 17/717 & 1 Message 1: From user@fbsd1.linux.nt Thu Sep 21 12:32:16 2006 Date: Thu, 21 Sep 2006 12:32:16 +0300 (EEST) From: User User <user@fbsd1.linux.nt> To: user@server2.lav.unix.nt ÞÅÔ×ÅÒÇ, 21 ÓÅÎÔÑÂÒÑ 2006 Ç. 12:32:16 (EEST) & d & t No applicable messages & q |
$mail
No mail for user |
#vi fbsd1.unix.nt.mc
|
#/etc/rc.d/sendmail restart
Stopping sendmail. Stopping sendmail_clientmqueue. Starting sendmail. |
#mail user@sergey.unix.nt
Sep 21 12:36:06 fbsd1 sm-mta[6138]: starting daemon (8.13.4): SMTP+queueing@00:30:00 Sep 21 12:36:06 fbsd1 sm-msp-queue[6142]: starting daemon (8.13.4): queueing@00:30:00 Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: from=user, size=36, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, relay=user@localhost Sep 21 12:52:39 fbsd1 sm-mta[6211]: k8L9qdqU006211: from=<user@fbsd1.unix.nt>, size=351, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30036, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9qdqU006211 Message accepted for delivery) Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: to=<user@fbsd1.unix.nt>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30351, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: k8L9qeqU006213: DSN: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: to=<user@fbsd1.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31375, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: k8L9qeqV006213: return to sender: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqV006213: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32399, relay=local, dsn=2.0.0, stat=Sent ... Sep 21 14:32:25 fbsd1 sm-mta[6703]: k8LBWPHo006701: k8LBWPHo006703: DSN: Host unknown (Name server: sergey.unix.nt: host not found) Sep 21 14:32:25 fbsd1 sm-mta[6703]: k8LBWPHo006703: to=<user@server2.lav.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31427, relay=local, dsn=2.0.0, stat=Sent Subject: proverka dklwg wergkl werg wegtnjk . EOT You have mail in /var/mail/user |
$hostname
fbsd1.unix.nt |
#tail -f /var/log/maillog
Sep 21 12:36:06 fbsd1 sm-mta[6138]: starting daemon (8.13.4): SMTP+queueing@00:30:00 Sep 21 12:36:06 fbsd1 sm-msp-queue[6142]: starting daemon (8.13.4): queueing@00:30:00 Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: from=user, size=36, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, relay=user@localhost Sep 21 12:52:39 fbsd1 sm-mta[6211]: k8L9qdqU006211: from=<user@fbsd1.unix.nt>, size=351, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30036, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9qdqU006211 Message accepted for delivery) Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: to=<user@fbsd1.unix.nt>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30351, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: k8L9qeqU006213: DSN: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: to=<user@fbsd1.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31375, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: k8L9qeqV006213: return to sender: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqV006213: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32399, relay=local, dsn=2.0.0, stat=Sent ... Sep 21 14:32:25 fbsd1 sm-mta[6703]: k8LBWPHo006701: k8LBWPHo006703: DSN: Host unknown (Name server: sergey.unix.nt: host not found) Sep 21 14:32:25 fbsd1 sm-mta[6703]: k8LBWPHo006703: to=<user@server2.lav.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31427, relay=local, dsn=2.0.0, stat=Sent Sep 21 14:39:36 fbsd1 sendmail[6904]: k8LBdaIY006904: from=user, size=52, class=0, nrcpts=1, msgid=<200609211139.k8LBdaIY006904@server2.lav.unix.nt>, relay=root@localhost Sep 21 14:39:36 fbsd1 sm-mta[6910]: k8LBdabt006910: from=<user@server2.lav.unix.nt>, size=386, class=0, nrcpts=1, msgid=<200609211139.k8LBdaIY006904@server2.lav.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 14:39:36 fbsd1 sendmail[6904]: k8LBdaIY006904: to=user@sergey.unix.nt, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30052, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBdabt006910 Message accepted for delivery) Sep 21 14:39:37 fbsd1 sm-mta[6912]: k8LBdabt006910: to=<user@sergey.unix.nt>, ctladdr=<user@server2.lav.unix.nt> (1001/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30386, relay=yellow.sergey.unix.nt. [192.168.15.4], dsn=2.0.0, stat=Sent (k8LBceBZ012303 Message accepted for delivery) .unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 14:39:36 fbsd1 sendmail[6904]: k8LBdaIY006904: to=user@sergey.unix.nt, ct laddr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer ^C |
$hostname
fbsd1.unix.nt |
$hostname av.unix.net
hostname: sethostname: Operation not permitted |
$sudo ame lav.unix.net
Password: |
$hostname
lav.unix.net |
$mail user
Sep 21 12:36:06 fbsd1 sm-mta[6138]: starting daemon (8.13.4): SMTP+queueing@00:30:00 Sep 21 12:36:06 fbsd1 sm-msp-queue[6142]: starting daemon (8.13.4): queueing@00:30:00 Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: from=user, size=36, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, relay=user@localhost Sep 21 12:52:39 fbsd1 sm-mta[6211]: k8L9qdqU006211: from=<user@fbsd1.unix.nt>, size=351, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30036, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9qdqU006211 Message accepted for delivery) Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: to=<user@fbsd1.unix.nt>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30351, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: k8L9qeqU006213: DSN: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: to=<user@fbsd1.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31375, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: k8L9qeqV006213: return to sender: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqV006213: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32399, relay=local, dsn=2.0.0, stat=Sent Sep 21 12:54:46 fbsd1 sendmail[6274]: k8L9skX9006274: from=user, size=28, class=0, nrcpts=1, msgid=<200609210954.k8L9skX9006274@lav.unix.net>, relay=user@localhost Sep 21 12:54:46 fbsd1 sm-mta[6280]: k8L9skmY006280: ruleset=check_mail, arg1=<user@lav.unix.net>, relay=localhost.linux.nt [127.0.0.1], reject=553 5.1.8 <user@lav.unix.net>... Domain of sender address user@lav.unix.net does not exist Sep 21 12:54:46 fbsd1 sendmail[6274]: k8L9skX9006274: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30028, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error Sep 21 12:54:46 fbsd1 sm-mta[6280]: k8L9skmY006280: from=<user@lav.unix.net>, size=28, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Subject: qwer qqq . EOT |
$/home/user/dead.letter... Saved message in /home/user/dead.letter
|
$mail
No mail for user |
$mail
No mail for user |
$mail user
Sep 21 12:36:06 fbsd1 sm-mta[6138]: starting daemon (8.13.4): SMTP+queueing@00:30:00 Sep 21 12:36:06 fbsd1 sm-msp-queue[6142]: starting daemon (8.13.4): queueing@00:30:00 Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: from=user, size=36, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, relay=user@localhost Sep 21 12:52:39 fbsd1 sm-mta[6211]: k8L9qdqU006211: from=<user@fbsd1.unix.nt>, size=351, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30036, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9qdqU006211 Message accepted for delivery) Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: to=<user@fbsd1.unix.nt>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30351, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: k8L9qeqU006213: DSN: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: to=<user@fbsd1.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31375, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: k8L9qeqV006213: return to sender: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqV006213: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32399, relay=local, dsn=2.0.0, stat=Sent ... Sep 21 12:55:19 fbsd1 sendmail[6319]: k8L9tJJr006319: from=user, size=40, class=0, nrcpts=1, msgid=<200609210955.k8L9tJJr006319@lav.unix.net>, relay=user@localhost Sep 21 12:55:19 fbsd1 sm-mta[6325]: k8L9tJEf006325: ruleset=check_mail, arg1=<user@lav.unix.net>, relay=localhost.linux.nt [127.0.0.1], reject=553 5.1.8 <user@lav.unix.net>... Domain of sender address user@lav.unix.net does not exist Sep 21 12:55:19 fbsd1 sendmail[6319]: k8L9tJJr006319: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30040, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error Sep 21 12:55:19 fbsd1 sm-mta[6325]: k8L9tJEf006325: from=<user@lav.unix.net>, size=40, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Subject: fewf wjkefh werjk kg . EOT |
$/home/user/dead.letter... Saved message in /home/user/dead.letter
mail user |
$hostname lav.unix.nt
hostname: sethostname: Operation not permitted |
$sudo ame lav.unix.nt
|
$hostname
lav.unix.nt |
$sudo hostname server2.lav.unix.nt
|
$hostname
Sep 21 12:36:06 fbsd1 sm-mta[6138]: starting daemon (8.13.4): SMTP+queueing@00:30:00 Sep 21 12:36:06 fbsd1 sm-msp-queue[6142]: starting daemon (8.13.4): queueing@00:30:00 Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: from=user, size=36, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, relay=user@localhost Sep 21 12:52:39 fbsd1 sm-mta[6211]: k8L9qdqU006211: from=<user@fbsd1.unix.nt>, size=351, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30036, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9qdqU006211 Message accepted for delivery) Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: to=<user@fbsd1.unix.nt>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30351, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: k8L9qeqU006213: DSN: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: to=<user@fbsd1.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31375, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: k8L9qeqV006213: return to sender: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqV006213: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32399, relay=local, dsn=2.0.0, stat=Sent ... Sep 21 12:54:46 fbsd1 sm-mta[6280]: k8L9skmY006280: from=<user@lav.unix.net>, size=28, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:55:19 fbsd1 sendmail[6319]: k8L9tJJr006319: from=user, size=40, class=0, nrcpts=1, msgid=<200609210955.k8L9tJJr006319@lav.unix.net>, relay=user@localhost Sep 21 12:55:19 fbsd1 sm-mta[6325]: k8L9tJEf006325: ruleset=check_mail, arg1=<user@lav.unix.net>, relay=localhost.linux.nt [127.0.0.1], reject=553 5.1.8 <user@lav.unix.net>... Domain of sender address user@lav.unix.net does not exist Sep 21 12:55:19 fbsd1 sendmail[6319]: k8L9tJJr006319: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30040, relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error Sep 21 12:55:19 fbsd1 sm-mta[6325]: k8L9tJEf006325: from=<user@lav.unix.net>, size=40, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:56:37 fbsd1 sendmail[6388]: k8L9ubKN006388: from=user, size=27, class=0, nrcpts=1, msgid=<200609210956.k8L9ubKN006388@server2.lav.unix.nt>, relay=user@localhost Sep 21 12:56:37 fbsd1 sm-mta[6394]: k8L9ubTm006394: from=<user@server2.lav.unix.nt>, size=366, class=0, nrcpts=1, msgid=<200609210956.k8L9ubKN006388@server2.lav.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:56:37 fbsd1 sendmail[6388]: k8L9ubKN006388: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30027, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9ubTm006394 Message accepted for delivery) Sep 21 12:56:37 fbsd1 sm-mta[6395]: k8L9ubTm006394: to=<user@server2.lav.unix.nt>, ctladdr=<user@server2.lav.unix.nt> (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30642, relay=local, dsn=2.0.0, stat=Sent server2.lav.unix.nt |
$mail user
Subject: dfg wrg . EOT |
$mail
Mail version 8.1 6/6/93. Type ? for help. "/var/mail/user": 1 message 1 new >N 1 user@server2.lav.uni Thu Sep 21 12:56 18/707 "dfg" & 1 Message 1: From user@server2.lav.unix.nt Thu Sep 21 12:56:37 2006 Date: Thu, 21 Sep 2006 12:56:37 +0300 (EEST) From: User User <user@server2.lav.unix.nt> To: user@server2.lav.unix.nt Subject: dfg ... No applicable messages & t No applicable messages & t No applicable messages & t No applicable messages & q New mail has arrived. You have mail in /var/mail/user |
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 48134 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10726 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:33:39 2006 ;; MSG SIZE rcvd: 107 You have new mail in /var/mail/user |
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 31912 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10651 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:34:54 2006 ;; MSG SIZE rcvd: 107 |
#dig sergey.unix.nt mx @192.168.15.4
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx @192.168.15.4 ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64102 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; ANSWER SECTION: sergey.unix.nt. 86400 IN MX 1 yellow.sergey.unix.nt. ;; AUTHORITY SECTION: sergey.unix.nt. 86400 IN NS yellow.sergey.unix.nt. ;; ADDITIONAL SECTION: yellow.sergey.unix.nt. 86400 IN A 192.168.15.4 ;; Query time: 1 msec ;; SERVER: 192.168.15.4#53(192.168.15.4) ;; WHEN: Thu Sep 21 14:35:12 2006 ;; MSG SIZE rcvd: 85 |
#rndc flush
|
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 300 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 162 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:35:48 2006 ;; MSG SIZE rcvd: 107 |
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40480 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10779 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 2 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:36:09 2006 ;; MSG SIZE rcvd: 107 |
#rndc flush
|
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18745 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 2118 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:36:36 2006 ;; MSG SIZE rcvd: 107 |
#less /etc/namedb/named.conf
|
#vietc/namedb/named.conf
// If you have IPv6 enabled on this system, uncomment this option for // use as a local resolver. To give access to the network, specify // an IPv6 address, or the keyword "any". // listen-on-v6 { ::1; }; // In addition to the "forwarders" clause, you can force your name // server to never initiate queries of its own, but always ask its // forwarders only, by enabling the following line: // // forward only; // If you've got a DNS server around at your upstream provider, enter // its IP address here, and enable the line below. This will make you // benefit from its cache, thus reduce overall DNS traffic in the Internet. forwarders { 192.168.15.254; }; /* * If there is a firewall between you and nameservers you want /etc/namedb/named.conf: 138 ÓÔÒÏË, 3891 ÓÉÍ×ÏÌÏ× |
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 24391 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10727 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:37:49 2006 ;; MSG SIZE rcvd: 107 |
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 54437 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10726 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:37:50 2006 ;; MSG SIZE rcvd: 107 |
#rndc flush
|
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 37010 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; AUTHORITY SECTION: . 10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2006092001 1800 900 604800 86400 ;; Query time: 80 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:37:57 2006 ;; MSG SIZE rcvd: 107 |
#/etc/rc.d/named restart
Stopping named. Waiting for PIDS: 5688. Starting named. |
#dig sergey.unix.nt mx
; <<>> DiG 9.3.1 <<>> sergey.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24835 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;sergey.unix.nt. IN MX ;; ANSWER SECTION: sergey.unix.nt. 86256 IN MX 1 yellow.sergey.unix.nt. ;; AUTHORITY SECTION: sergey.unix.nt. 86256 IN NS yellow.sergey.unix.nt. ;; ADDITIONAL SECTION: yellow.sergey.unix.nt. 86256 IN A 192.168.15.4 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Sep 21 14:38:27 2006 ;; MSG SIZE rcvd: 85 |
#mail user@sergey.unix.nt
Sep 21 12:36:06 fbsd1 sm-mta[6138]: starting daemon (8.13.4): SMTP+queueing@00:30:00 Sep 21 12:36:06 fbsd1 sm-msp-queue[6142]: starting daemon (8.13.4): queueing@00:30:00 Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: from=user, size=36, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, relay=user@localhost Sep 21 12:52:39 fbsd1 sm-mta[6211]: k8L9qdqU006211: from=<user@fbsd1.unix.nt>, size=351, class=0, nrcpts=1, msgid=<200609210952.k8L9qd2E006205@fbsd1.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 12:52:39 fbsd1 sendmail[6205]: k8L9qd2E006205: to=user, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30036, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8L9qdqU006211 Message accepted for delivery) Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: to=<user@fbsd1.unix.nt>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30351, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qdqU006211: k8L9qeqU006213: DSN: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: to=<user@fbsd1.unix.nt>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31375, relay=fbsd1.linux.nt. [192.168.15.3], dsn=5.7.1, stat=User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqU006213: k8L9qeqV006213: return to sender: User unknown Sep 21 12:52:40 fbsd1 sm-mta[6213]: k8L9qeqV006213: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32399, relay=local, dsn=2.0.0, stat=Sent ... Sep 21 14:39:36 fbsd1 sendmail[6904]: k8LBdaIY006904: from=user, size=52, class=0, nrcpts=1, msgid=<200609211139.k8LBdaIY006904@server2.lav.unix.nt>, relay=root@localhost Sep 21 14:39:36 fbsd1 sm-mta[6910]: k8LBdabt006910: from=<user@server2.lav.unix.nt>, size=386, class=0, nrcpts=1, msgid=<200609211139.k8LBdaIY006904@server2.lav.unix.nt>, proto=ESMTP, daemon=MTA, relay=localhost.linux.nt [127.0.0.1] Sep 21 14:39:36 fbsd1 sendmail[6904]: k8LBdaIY006904: to=user@sergey.unix.nt, ctladdr=user (1001/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30052, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k8LBdabt006910 Message accepted for delivery) Sep 21 14:39:37 fbsd1 sm-mta[6912]: k8LBdabt006910: to=<user@sergey.unix.nt>, ctladdr=<user@server2.lav.unix.nt> (1001/0), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30386, relay=yellow.sergey.unix.nt. [192.168.15.4], dsn=2.0.0, stat=Sent (k8LBceBZ012303 Message accepted for delivery) Subject: privet ewfd f wef . EOT |
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 1 message 1 new >N 1 user@server2.lav. Thu Sep 21 14:38 23/933 privet & 1 Message 1: From user@server2.lav.unix.nt Thu Sep 21 14:38:41 2006 Date: Thu, 21 Sep 2006 14:39:36 +0300 (EEST) From: User User <user@server2.lav.unix.nt> To: user@localhost.localdomain Subject: privet ... From user@server2.lav.unix.nt Thu Sep 21 14:38:41 2006 Date: Thu, 21 Sep 2006 14:39:36 +0300 (EEST) From: User User <user@server2.lav.unix.nt> To: user@localhost.localdomain Subject: privet ewfd f wef & q Saved 1 message in /home/user/mbox |
$ssh 192.168.15.4
The authenticity of host '192.168.15.4 (192.168.15.4)' can't be established. DSA key fingerprint is 76:66:1a:67:94:f1:6f:aa:db:69:59:23:92:4b:b2:b7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.15.4' (DSA) to the list of known hosts. Password: Linux linux4.linux.nt 2.6.15.2 #1 Wed Jul 12 23:56:16 EEST 2006 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. You have new mail. Last login: Thu Sep 21 07:54:36 2006 from 192.168.15.254 l3-agent is already running: pid=4901; pidfile=/home/user/.lilalo/l3-agent.pid |
Время первой команды журнала | 11:17:17 2006- 9-21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:39:56 2006- 9-21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 15.84 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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