/l3/users/kolya/nt-ladm-2006-03-13/linux3.unix.nt/user :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 |
|
#[root@linux3:user]# vi /etc/motd
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/motd" 0L, 0C written |
#[root@linux3:user]# mail new
Subject: test ertre . Cc: |
#apt-get install mutt
Reading Package Lists... Done Building Dependency Tree... Done mutt is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
#mutt
q:Quit d:Del u:Undel s:Save m:Mail r:Reply g:Grou dfgfdg root <root> fdg gf ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Mail sent. |
#apt-get install sendmail
Reading Package Lists... Done Building Dependency Tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: sendmail: Depends: sendmail-bin but it is not going to be installed Depends: rmail but it is not going to be installed E: Broken packages |
#apt-get install sendmail-bin
dpkg: exim4-base: dependency problems, but removing anyway as you request: exim4-daemon-light depends on exim4-base (>= 4.34). Removing exim4-base ... Stopping MTA: exim4. Removing exim4-config ... dpkg: exim4-daemon-light: dependency problems, but removing anyway as you request: qpopper depends on exim4 | mail-transport-agent; however: Package exim4 is not installed. Package mail-transport-agent is not installed. Package exim4-daemon-light which provides mail-transport-agent is to be removed. ... Warning: 3 database(s) sources were not found, (but were created) please investigate. Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent: sendmail. |
#netstat -ln | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN unix 2 [ ACC ] STREAM LISTENING 137614 /tmp/.ICE-unix/dcop25328-1142425934 unix 2 [ ACC ] STREAM LISTENING 137777 /tmp/.ICE-unix/25348 unix 2 [ ACC ] STREAM LISTENING 125830 /tmp/keyring-uQ58RM/socket unix 2 [ ACC ] STREAM LISTENING 137571 /tmp/ssh-HcRtY25241/agent.25241 |
#cd /etc/mail
|
#ls -l
total 183 -rwxr-xr-- 1 root smmsp 9098 Mar 15 15:36 Makefile -rw------- 1 root root 4645 Mar 15 15:36 access -rw-r----- 1 smmta smmsp 12288 Mar 15 15:36 access.db -rw-r--r-- 1 root root 281 Dec 16 2004 address.resolve lrwxrwxrwx 1 root smmsp 10 Mar 15 15:36 aliases -> ../aliases -rw-r----- 1 smmta smmsp 12288 Mar 15 15:36 aliases.db -rw-r--r-- 1 root root 3040 Mar 15 15:36 databases -rw-r--r-- 1 root root 5588 Dec 16 2004 helpfile -rw-r--r-- 1 root smmsp 26 Mar 15 15:36 local-host-names ... -rw-r--r-- 1 root root 11882 Mar 15 15:36 sendmail.conf -rw-r--r-- 1 root smmsp 3666 Mar 15 15:36 sendmail.mc -rw-r--r-- 1 root root 149 Dec 16 2004 service.switch -rw-r--r-- 1 root root 180 Dec 16 2004 service.switch-nodns drwxr-sr-x 2 smmta smmsp 1024 Mar 15 15:36 smrsh lrwxrwxrwx 1 root root 15 Mar 15 11:40 spamassassin -> ../spamassassin -rw-r--r-- 1 root smmsp 43592 Mar 15 15:36 submit.cf -rw-r--r-- 1 root smmsp 2284 Mar 15 15:36 submit.mc drwxr-xr-x 2 smmta smmsp 1024 Mar 15 15:36 tls -rw-r--r-- 1 root smmsp 0 Mar 15 15:36 trusted-users |
#vi sendmail.mc
|
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#/etc/init.d/reboot
Rebooting... |
#/etc/init.d/sendmail reload
Reloading Mail Transport Agent configuration: sendmail. |
#netstat -ln | grep 25
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN unix 2 [ ACC ] STREAM LISTENING 137614 /tmp/.ICE-unix/dcop25328-1142425934 unix 2 [ ACC ] STREAM LISTENING 137777 /tmp/.ICE-unix/25348 unix 2 [ ACC ] STREAM LISTENING 125830 /tmp/keyring-uQ58RM/socket unix 2 [ ACC ] STREAM LISTENING 142825 /var/run/sendmail/mta/smcontrol unix 2 [ ACC ] STREAM LISTENING 137571 /tmp/ssh-HcRtY25241/agent.25241 |
#hostname
linux3 |
#hostname -f
linux3.linux.nt |
#echo hello | mail root@linux3.linux.nt
|
#mail
No mail for root |
#mail
No mail for root |
#mail
No mail for root |
#mail
No mail for root |
#ls -l /var/mail/
total 8 -rw------- 1 mail mail 6311 Mar 15 11:42 mail -rw-rw---- 1 new mail 0 Mar 15 15:31 new |
#vi /etc/aliases
|
#ls -l /var/mail/
total 8 -rw------- 1 mail mail 6311 Mar 15 11:42 mail -rw-rw---- 1 new mail 0 Mar 15 15:31 new |
#mail root
Subject: test yesy . Cc: |
#tail /var/log/mail.log
Mar 15 13:36:47 linux3 logger[27202]: /etc/init.d/sendmail stop Mar 15 13:36:51 linux3 sendmail[27781]: alias database /etc/mail/aliases rebuilt by root Mar 15 13:36:51 linux3 sendmail[27781]: /etc/mail/aliases: 13 aliases, longest 10 bytes, 142 bytes total Mar 15 13:36:51 linux3 sm-mta[27879]: starting daemon (8.13.2): SMTP+queueing@00:10:00 Mar 15 13:38:18 linux3 sm-mta[27879]: restarting /usr/sbin/sendmail-mta due to signal Mar 15 13:38:18 linux3 sm-mta[27989]: starting daemon (8.13.2): SMTP+queueing@00:10:00 Mar 15 13:38:59 linux3 sendmail[28015]: k2FDcxA8028015: from=root, size=32, class=0, nrcpts=1, msgid=<200603151338.k2FDcxA8028015@linux3.linux.nt>, relay=root@localhost Mar 15 13:38:59 linux3 sendmail[28015]: k2FDcxA8028015: to=root@linux3.linux.nt, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30032, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Mar 15 13:39:43 linux3 sendmail[28101]: k2FDdhbI028101: from=root, size=29, class=0, nrcpts=1, msgid=<200603151339.k2FDdhbI028101@linux3.linux.nt>, relay=root@localhost Mar 15 13:39:43 linux3 sendmail[28101]: k2FDdhbI028101: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30029, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] |
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 3 messages 3 new >N 1 root@linux3.linux Wed Mar 15 15:44 13/588 N 2 root@linux3.linux Wed Mar 15 15:44 15/594 N 3 root@linux3.linux Wed Mar 15 15:44 14/464 TEST & t 3 Message 3: From root@linux3.linux.nt Wed Mar 15 15:44:27 2006 Date: Wed, 15 Mar 2006 15:40:05 +0200 From: root <root@linux3.linux.nt> Subject: TEST To: undisclosed-recipients:; Hello Test & Saved 1 message in /home/user/mbox Held 2 messages in /var/mail/user |
#telnet 127.0.0.1 25
Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 linux3.linux.nt ESMTP Sendmail 8.13.2/8.13.2/Debian-1; Wed, 15 Mar 2006 15:40:05 +0200; (No UCE/UBE) logging access from: localhost.localdomain(OK)-root@localhost.localdomain [127.0.0.1] HELO d 250 linux3.linux.nt Hello root@localhost.localdomain [127.0.0.1], pleased to meet you MAIL FROM: root@linux3.linux.nt 250 2.1.0 root@linux3.linux.nt... Sender ok RCPT TO: root@linux3.linux.nt 250 2.1.5 root@linux3.linux.nt... Recipient ok DATA 354 Enter mail, end with "." on a line by itself Subject: TEST Hello Test . 250 2.0.0 k2FDe5i7028129 Message accepted for delivery ^] telnet> q Connection closed. |
#mail
No mail for root |
#mail
No mail for root |
#ls -l /var/mail/
total 8 -rw------- 1 mail mail 6311 Mar 15 11:42 mail -rw-rw---- 1 new mail 0 Mar 15 15:31 new |
#vi /etc/hosts
|
#ls -l /var/mail/
total 8 -rw------- 1 mail mail 6311 Mar 15 11:42 mail -rw-rw---- 1 new mail 0 Mar 15 15:31 new |
#tail /var/log/mail.log
Mar 15 13:38:59 linux3 sendmail[28015]: k2FDcxA8028015: from=root, size=32, class=0, nrcpts=1, msgid=<200603151338.k2FDcxA8028015@linux3.linux.nt>, relay=root@localhost Mar 15 13:38:59 linux3 sendmail[28015]: k2FDcxA8028015: to=root@linux3.linux.nt, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30032, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Mar 15 13:39:43 linux3 sendmail[28101]: k2FDdhbI028101: from=root, size=29, class=0, nrcpts=1, msgid=<200603151339.k2FDdhbI028101@linux3.linux.nt>, relay=root@localhost Mar 15 13:39:43 linux3 sendmail[28101]: k2FDdhbI028101: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30029, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Mar 15 13:40:01 linux3 sm-msp-queue[28126]: k2FDdhbI028101: to=root, ctladdr=root (0/0), delay=00:00:18, xdelay=00:00:00, mailer=relay, pri=120029, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Mar 15 13:40:01 linux3 sm-msp-queue[28126]: k2FDcxA8028015: to=root@linux3.linux.nt, ctladdr=root (0/0), delay=00:01:02, xdelay=00:00:00, mailer=relay, pri=120032, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1] Mar 15 13:40:49 linux3 sm-mta[28129]: k2FDe5i7028129: from=root@linux3.linux.nt, size=26, class=0, nrcpts=1, msgid=<200603151340.k2FDe5i7028129@linux3.linux.nt>, proto=SMTP, daemon=MTA, relay=root@localhost.localdomain [127.0.0.1] Mar 15 13:40:49 linux3 sm-mta[28138]: k2FDe5i7028129: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory Mar 15 13:40:49 linux3 sm-mta[28138]: k2FDe5i7028129: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory Mar 15 13:40:49 linux3 sm-mta[28137]: k2FDe5i7028129: to=user, ctladdr=root@linux3.linux.nt (0/0), delay=00:00:09, xdelay=00:00:00, mailer=local, pri=30405, dsn=4.0.0, stat=Operating system error |
#mailq
MSP Queue status... /var/spool/mqueue-client (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDdhbI028101 5 Wed Mar 15 15:39 root (Deferred: Connection refused by [127.0.0.1]) root k2FDcxA8028015 6 Wed Mar 15 15:38 root (Deferred: Connection refused by [127.0.0.1]) root@linux3.linux.nt Total requests: 2 MTA Queue status... /var/spool/mqueue (1 request) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDe5i7028129 11 Wed Mar 15 15:40 root@linux3.linux.nt (Operating system error) user Total requests: 1 |
#vi sendmail.mc
|
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#/etc/init.d/sendmail reload
Reloading Mail Transport Agent configuration: sendmail. |
#netstat -lnp | grep send
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 28264/sendmail: MTA unix 2 [ ACC ] STREAM LISTENING 143195 28264/sendmail: MTA /var/run/sendmail/mta/smcontrol |
#netstat -lnp | grep send
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 28264/sendmail: MTA unix 2 [ ACC ] STREAM LISTENING 143195 28264/sendmail: MTA /var/run/sendmail/mta/smcontrol |
#vi sendmail.mc
|
#make
Updating databases ... Reading configuration from /etc/mail/sendmail.conf. Validating configuration. Creating /etc/mail/databases... Updating auth ... sasl2-bin not installed, not configuring sendmail support. To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth" Creating /etc/mail/relay-domains # Optional file... Updating Makefile ... Validating configuration. Creating /etc/mail/Makefile... Updating sendmail.cf ... *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() The following file(s) have changed: /etc/mail/sendmail.cf ** ** You should issue `/etc/init.d/sendmail reload` ** ** |
#/etc/init.d/sendmail reload
Reloading Mail Transport Agent configuration: sendmail. |
#netstat -lnp | grep send
tcp 0 0 127.0.0.1:587 0.0.0.0:* LISTEN 28371/sendmail: MTA tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 28371/sendmail: MTA unix 2 [ ACC ] STREAM LISTENING 144041 28371/sendmail: MTA /var/run/sendmail/mta/smcontrol |
#mailq
MSP Queue status... /var/spool/mqueue-client (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDdhbI028101 5 Wed Mar 15 15:39 root (Deferred: Connection refused by [127.0.0.1]) root k2FDcxA8028015 6 Wed Mar 15 15:38 root (Deferred: Connection refused by [127.0.0.1]) root@linux3.linux.nt Total requests: 2 MTA Queue status... /var/spool/mqueue (1 request) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDe5i7028129 11 Wed Mar 15 15:40 root@linux3.linux.nt (Operating system error) user Total requests: 1 |
#sendmail -q
|
#mailq
MSP Queue status... /var/spool/mqueue-client (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDdhbI028101 5 Wed Mar 15 15:39 root (Deferred: Connection refused by [127.0.0.1]) root k2FDcxA8028015 6 Wed Mar 15 15:38 root (Deferred: Connection refused by [127.0.0.1]) root@linux3.linux.nt Total requests: 2 MTA Queue status... /var/spool/mqueue (1 request) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDe5i7028129 11 Wed Mar 15 15:40 root@linux3.linux.nt (Operating system error) user Total requests: 1 |
#mailq
MSP Queue status... /var/spool/mqueue-client (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDdhbI028101 5 Wed Mar 15 15:39 root (Deferred: Connection refused by [127.0.0.1]) root k2FDcxA8028015 6 Wed Mar 15 15:38 root (Deferred: Connection refused by [127.0.0.1]) root@linux3.linux.nt Total requests: 2 MTA Queue status... /var/spool/mqueue (1 request) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDe5i7028129 11 Wed Mar 15 15:40 root@linux3.linux.nt (Operating system error) user Total requests: 1 |
#test | mail root
No message, no subject; hope that's ok |
#echo test | mail root
|
#mailq
MSP Queue status... /var/spool/mqueue-client (2 requests) -----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient----------- k2FDdhbI028101 5 Wed Mar 15 15:39 root (Deferred: Connection refused by [127.0.0.1]) root k2FDcxA8028015 6 Wed Mar 15 15:38 root (Deferred: Connection refused by [127.0.0.1]) root@linux3.linux.nt Total requests: 2 ... k2FDhjZb028447 0 Wed Mar 15 15:43 <root@linux3.linux.nt> (Operating system error) user k2FDhpCa028462 5 Wed Mar 15 15:43 <root@linux3.linux.nt> (Operating system error) user k2FDe5i7028129 11 Wed Mar 15 15:40 root@linux3.linux.nt (Operating system error) user Total requests: 3 |
#tail /var/log/messages
Mar 15 11:42:53 linux3 -- MARK -- Mar 15 12:02:53 linux3 -- MARK -- Mar 15 12:06:38 linux3 kernel: mtrr: base(0xf0020000) is not aligned on a size(0x300000) boundary Mar 15 12:07:07 linux3 last message repeated 2 times Mar 15 12:22:53 linux3 -- MARK -- Mar 15 12:32:05 linux3 kernel: mtrr: base(0xf0020000) is not aligned on a size(0x300000) boundary Mar 15 12:37:09 linux3 kernel: cdrom: open failed. Mar 15 13:02:54 linux3 -- MARK -- Mar 15 13:22:54 linux3 -- MARK -- Mar 15 13:41:57 linux3 -- MARK -- |
#tail /var/log/mail.log
Mar 15 13:43:46 linux3 sendmail[28446]: k2FDhjt3028446: to=root, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30010, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k2FDhjZb028447 Message accepted for delivery) Mar 15 13:43:46 linux3 sm-mta[28457]: k2FDhjZb028447: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory Mar 15 13:43:46 linux3 sm-mta[28457]: k2FDhjZb028447: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory Mar 15 13:43:46 linux3 sm-mta[28455]: k2FDhjZb028447: to=user, ctladdr=<root@linux3.linux.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30527, dsn=4.0.0, stat=Operating system error Mar 15 13:43:51 linux3 sendmail[28461]: k2FDhplX028461: from=root, size=15, class=0, nrcpts=1, msgid=<200603151343.k2FDhplX028461@linux3.linux.nt>, relay=root@localhost Mar 15 13:43:51 linux3 sm-mta[28462]: k2FDhpCa028462: from=<root@linux3.linux.nt>, size=297, class=0, nrcpts=1, msgid=<200603151343.k2FDhplX028461@linux3.linux.nt>, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost.localdomain [127.0.0.1] Mar 15 13:43:51 linux3 sendmail[28461]: k2FDhplX028461: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k2FDhpCa028462 Message accepted for delivery) Mar 15 13:43:51 linux3 sm-mta[28466]: k2FDhpCa028462: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory Mar 15 13:43:51 linux3 sm-mta[28466]: k2FDhpCa028462: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory Mar 15 13:43:51 linux3 sm-mta[28464]: k2FDhpCa028462: to=user, ctladdr=<root@linux3.linux.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30532, dsn=4.0.0, stat=Operating system error |
#apt-cache search sensible
dgipip - AMPRNet dynamic IPIP encapsulation routing daemon misdn-utils - mISDN userspace utilities psad - The Port Scan Attack Detector buffy - Heavy duty browser for mail folders libclass-dbi-fromcgi-perl - Update Class::DBI data using CGI::Untaint libfile-chdir-perl - A more sensible way to change directories debianutils - Miscellaneous utilities specific to Debian dns-browse - Front-ends to DNS search sensible-mda - Mail Delivery Agent wrapper libggi2 - General Graphics Interface runtime libraries libsgmls-perl - Perl modules for processing SGML parser output sgmlspl - SGMLS-based example Perl script for processing SGML parser output |
#apt-get install sensible-mda
Reading Package Lists... Done Building Dependency Tree... Done The following NEW packages will be installed: sensible-mda 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/194kB of archives. After unpacking 279kB of additional disk space will be used. Selecting previously deselected package sensible-mda. (Reading database ... 98786 files and directories currently installed.) Unpacking sensible-mda (from .../sensible-mda_8.13.2-1_i386.deb) ... Setting up sensible-mda (8.13.2-1) ... |
#sendmail -q
|
#tail /var/log/mail.log
Mar 15 13:43:46 linux3 sm-mta[28455]: k2FDhjZb028447: to=user, ctladdr=<root@linux3.linux.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30527, dsn=4.0.0, stat=Operating system error Mar 15 13:43:51 linux3 sendmail[28461]: k2FDhplX028461: from=root, size=15, class=0, nrcpts=1, msgid=<200603151343.k2FDhplX028461@linux3.linux.nt>, relay=root@localhost Mar 15 13:43:51 linux3 sm-mta[28462]: k2FDhpCa028462: from=<root@linux3.linux.nt>, size=297, class=0, nrcpts=1, msgid=<200603151343.k2FDhplX028461@linux3.linux.nt>, proto=ESMTP, daemon=MSP-v4, relay=smmsp@localhost.localdomain [127.0.0.1] Mar 15 13:43:51 linux3 sendmail[28461]: k2FDhplX028461: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k2FDhpCa028462 Message accepted for delivery) Mar 15 13:43:51 linux3 sm-mta[28466]: k2FDhpCa028462: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory Mar 15 13:43:51 linux3 sm-mta[28466]: k2FDhpCa028462: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory Mar 15 13:43:51 linux3 sm-mta[28464]: k2FDhpCa028462: to=user, ctladdr=<root@linux3.linux.nt> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30532, dsn=4.0.0, stat=Operating system error Mar 15 13:44:27 linux3 sendmail[28521]: k2FDhjZb028447: to=user, ctladdr=<root@linux3.linux.nt> (0/0), delay=00:00:41, xdelay=00:00:01, mailer=local, pri=120527, dsn=2.0.0, stat=Sent Mar 15 13:44:27 linux3 sendmail[28521]: k2FDhpCa028462: to=user, ctladdr=<root@linux3.linux.nt> (0/0), delay=00:00:36, xdelay=00:00:00, mailer=local, pri=120532, dsn=2.0.0, stat=Sent Mar 15 13:44:27 linux3 sendmail[28521]: k2FDe5i7028129: to=user, ctladdr=root@linux3.linux.nt (0/0), delay=00:03:47, xdelay=00:00:00, mailer=local, pri=390405, dsn=2.0.0, stat=Sent |
#mail
No mail for root |
#ls /var/log/
XFree86.0.log btmp gdm mail.err samba XFree86.0.log.old daemon.log kern.log mail.info scrollkeeper.log apache2 debian-installer ksymoops mail.log syslog aptitude debug lastlog mail.warn user.log auth.log dmesg lp-acct messages uucp.log base-config.log exim4 lp-errs netatalk.log wtmp base-config.timings fontconfig.log lpr.log news You have new mail in /var/mail/user |
#ls /var/mail/
mail new user |
#ls -l /var/mail/
total 12 -rw------- 1 mail mail 6311 Mar 15 11:42 mail -rw-rw---- 1 new mail 0 Mar 15 15:31 new -rw-rw---- 1 user mail 1646 Mar 15 15:44 user |
#less /etc/passwd
|
$mail
Mail version 8.1.2 01/15/2001. Type ? for help. "/var/mail/user": 3 messages 1 new 3 unread U 1 root@linux3.linux Wed Mar 15 15:44 14/598 U 2 root@linux3.linux Wed Mar 15 15:44 16/604 >N 3 root@fbsd2.unix.n Wed Mar 15 15:45 20/858 & t 3 Message 3: From root@fbsd2.unix.nt Wed Mar 15 15:45:16 2006 Date: Wed, 15 Mar 2006 15:45:15 +0200 (EET) From: Charlie Root <root@fbsd2.unix.nt> To: user@linux3.linux.nt test & Interrupt & q Saved 1 message in /home/user/mbox Held 2 messages in /var/mail/user |
$[user@linux3:user]$ mutt
q:÷ÙÈÏÄ d:õÄÁÌÉÔØ u:÷ÏÓÓÔÁÎÏ×ÉÔØ s:óÏÈÒÁÎÉÔØ m:óÏÚÄÁÔØ r:ïÔ×ÅÔÉÔØ g:÷ÓÅÍ 1 O Mar 15 root ( 0K) |
$es
bash: es: command not found |
$vi ~/.bashrc
|
$vi ~/.bash_p
|
$vi ~/.bash_profile
|
$vi ~/.bash_profile
0a1 > LANG=C 2d2 < |
$mutt
From root@linux3.linux.nt Wed Mar 15 15:44:26 2006 Return-Path: <root@linux3.linux.nt> by linux3.linux.nt (8.13.2/8.13.2/Debian-1) with ESMTP id k2FDhjZb028447 Receivedfor <root@linux3.linux.nt>; Wed, 15 Mar 2006 15:43:46 +02000.1]) Receivedby linux3.linux.nt (8.13.2/8.13.2/Submit) id k2FDhjt3028446 for root; Wed, 15 Mar 2006 15:43:45 +0200 Date: Wed, 15 Mar 2006 15:43:45 +0200 From: root <root@linux3.linux.nt> Message-Id: <200603151343.k2FDhjt3028446@linux3.linux.nt> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |
$LANG ru_UA/UTF-8
bash: LANG: command not found |
$LANG ru_UA.UTF-8
bash: LANG: command not found |
$LANG=ru_UA.UTF-8
|
$[user@linux3:user]$ cp
cp: пропущен аргумент, задающий файл Попробуйте `cp --help' для получения более подробного описания. |
$su rootpass
Неизвестный id: rootpass |
$su
Password: root@linux3:/home/user# exit exit |
$less .plan
|
$finger user
Login: user Name: user Directory: /home/user Shell: /bin/bash On since Wed Mar 15 16:27 (EET) on tty2 (messages off) New mail received Wed Mar 15 16:00 2006 (EET) Unread since Wed Mar 15 15:51 2006 (EET) Plan: |
$w
16:29:33 up 5:08, 1 user, load average: 0.00, 0.03, 0.07 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT user tty2 - 16:27 0.00s 0.03s 0.03s script -f -q /h |
$lis
bash: lis: command not found |
$last
user tty2 Wed Mar 15 16:27 still logged in root tty2 Wed Mar 15 16:27 - 16:27 (00:00) root pts/0 linux.nt Wed Mar 15 16:25 - 16:26 (00:01) user tty3 Wed Mar 15 16:24 - 16:26 (00:02) root pts/0 linux.nt Wed Mar 15 16:24 - 16:25 (00:00) root tty3 Wed Mar 15 16:19 - 16:24 (00:04) new tty1 Wed Mar 15 16:14 - 16:14 (00:00) root tty3 Wed Mar 15 16:08 - 16:19 (00:10) root tty1 Wed Mar 15 16:02 - 16:04 (00:02) root tty1 Wed Mar 15 16:00 - 16:01 (00:01) ... user tty1 Wed Mar 15 12:37 - 14:39 (02:02) user :0 Wed Mar 15 12:20 - 12:50 (00:30) user :0 Wed Mar 15 12:08 - 12:19 (00:11) user tty1 Wed Mar 15 12:04 - 12:30 (00:26) user :0 Wed Mar 15 12:01 - 12:03 (00:02) root tty2 Wed Mar 15 11:55 - 12:15 (00:19) user tty1 Wed Mar 15 11:54 - 12:04 (00:09) user :0 Wed Mar 15 11:52 - 12:01 (00:08) reboot system boot 2.6.8-2-686-smp Wed Mar 15 13:22 (03:06) wtmp begins Wed Mar 15 13:22:53 2006 |
$[user@linux3:user]$ chown --
chown: too few arguments Try `chown --help' for more information. |
$chown --help
Usage: chown [OPTION]... OWNER[:[GROUP]] FILE... or: chown [OPTION]... :GROUP FILE... or: chown [OPTION]... --reference=RFILE FILE... Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE. -c, --changes like verbose but report only when a change is made --dereference affect the referent of each symbolic link, rather than the symbolic link itself -h, --no-dereference affect each symbolic link instead of any referenced file (useful only on systems that can change the ... to a directory, traverse it -L traverse every symbolic link to a directory encountered -P do not traverse any symbolic links (default) --help display this help and exit --version output version information and exit Owner is unchanged if missing. Group is unchanged if missing, but changed to login group if implied by a `:'. OWNER and GROUP may be numeric as well as symbolic. Report bugs to <bug-coreutils@gnu.org>. |
$LANG=ru_RU.UTF-8
|
$chown --help
Usage: chown [OPTION]... OWNER[:[GROUP]] FILE... or: chown [OPTION]... :GROUP FILE... or: chown [OPTION]... --reference=RFILE FILE... Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE. -c, --changes like verbose but report only when a change is made --dereference affect the referent of each symbolic link, rather than the symbolic link itself -h, --no-dereference affect each symbolic link instead of any referenced file (useful only on systems that can change the ... to a directory, traverse it -L traverse every symbolic link to a directory encountered -P do not traverse any symbolic links (default) --help display this help and exit --version output version information and exit Owner is unchanged if missing. Group is unchanged if missing, but changed to login group if implied by a `:'. OWNER and GROUP may be numeric as well as symbolic. Report bugs to <bug-coreutils@gnu.org>. |
$LANG=ru_UA.UTF-8
|
$chown --help
ÐÑполÑзование: chown [ÐÐ:[ÐРУÐÐÐ]] ФÐÐÐhown [ÐÐhown [ÐÐeference=ÐФÐÐÐ hange the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE. -c, --changes like verbose but report only when a change is made --dereference affect the referent of each symbolic link, rather than the symbolic link itself -h, --no-dereference affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink) --from=CURRENT_OWNER:CURRENT_GROUP изменÑÐµÑ Ð²Ð»Ð°Ð´ÐµÐ»ÑÑа и/или гÑÑÐ¿Ð¿Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ Ñайла ... to a directory, traverse it -L traverse every symbolic link to a directory encountered -P do not traverse any symbolic links (default) --help показаÑÑ ÑÑÑ ÑпÑÐ°Ð²ÐºÑ Ð¸ вÑйÑи --version показаÑÑ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¾ веÑÑии и вÑйÑи ÐÐ»Ð°Ð´ÐµÐ»ÐµÑ Ð½Ðµ изменÑеÑÑÑ ÐµÑли он не ÑÑÑеÑÑвÑеÑ. ÐÑÑппа Ñакже не изменÑеÑÑÑ ÐµÑли оÑÑÑÑÑÑвÑеÑ, но изменÑеÑÑÑ Ð½Ð° гÑÑÐ¿Ð¿Ñ Ð¿Ð¾ ÑмолÑÐ°Ð½Ð¸Ñ ÐµÑли не задан полÑзоваÑелÑ. Ðб оÑÐ¸Ð±ÐºÐ°Ñ ÑообÑайÑе по адÑеÑÑ <bug-coreutils@gnu.org>. |
$chown new /new
chown: невозможно получить доступ к `/new': No such file or directory |
$chown new new
chown: невозможно получить доступ к `new': No such file or directory |
$chown new /tmp/
chown: изменение владельца `/tmp/': Operation not permitted |
$chown -R new /home/new
chown: `/home/new/Mail': Permission denied chown: невозможно получить доступ к `new': No such file or directory |
$chown -R new /home/new
chown: `/home/new/Mail': Permission denied |
$ls /home/new
Mail mbox |
$ls -1 /home/new
Mail mbox |
$ls -l /home/new
итого 8 drwx------ 2 new users 4096 2006-03-15 15:34 Mail -rw------- 1 new users 485 2006-03-15 15:29 mbox |
Время первой команды журнала | 15:26:50 2006- 3-15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 16:34:11 2006- 3-15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 20.79 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.50 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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