Posts

Showing posts from December, 2016

Configure Postfix To Deliver Mail From Desktop (root, user) To My Gmail Account

I'm using Ubuntu 16.04 LTS and I want to use the command line to send messages to my regular email account. There are administrative tasks that sends mail to root / administrator but to simplify my tasks I want these messages to be sent to my regular email account in Gmail.

I installed postfix first.

#apt install postfix mailutils

Then accepted some basic configurations that were prompted when installing postfix.

    General type of mail configuration?: Internet Site
    System mail name: a hostname that will be used in mail headers, a FQDN is preferred, desktop, home
    Root and postmaster mail recipient: root
    Other destinations to accept mail for: $myhostname, desktop, localhost.localdomain, localhost
    Force synchronous updates on mail queue?: No
    Local networks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
    Mailbox size limit: 0
    Local address extensi…

1st Impressions On Wave8, the Tablet

Hello ReeseI am using the new Wave8 tablet from PLDTHome customer retention. It is fun to use a slightly larger screen. The brightness is different in IPS screens. I have to download the app for neutral brightness.The mail app is fine. The compose window have a bigger keyboard I agree with. No SMS though because this device is WiFi only. But it has android 6 marshmallow so it should be more secure than my zenfone android 5, right?It has 12 GB storage. It is a little cramped.

New Tablet - Wave8 From PLDT Home

Image
PLDT Home's customer retention bait is a device called the Wave8. This is a Android Marshmallow device. It has an IPS screen.


Merry Christmas From the Philippines this 2016

Image
Keep Safe Everyone!r           

fstab2

To find the UUID, use 'blkid' as root. This will generate a list of
devices and their respective UUID's. Like so:

#blkid
/dev/mapper/sda5_crypt: UUID="DLkZz4-D3rH-dODr-eaO3-h1Oa-MLe2-9OVQMz"
TYPE="LVM2_member"
/dev/mapper/ubuntu--vg-root: UUID="d05b055d-032c-4f91-88d1-f8983d3474f6"
TYPE="ext4"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/sda1: UUID="3f4ce798-b0c8-4c04-a83d-3628838cb6ca" TYPE="ext2"
PARTUUID="68d8d639-01"
/dev/sda5: UUID="a0497c16-a3ae-4610-820c-3bb61b52af1f"
TYPE="crypto_LUKS" PARTUUID="68d8d639-05"
/dev/sdb1: UUID="e3284314-1258-cac3-1b6c-243c748be2fe"
UUID_SUB="f30caf8e-a9f4-672c-eb72-113d4520fc53" LABEL="desktop:0"
TYPE="linux_raid_member" PARTUUID="8e34b25a-01"
/dev/sdc1: UUID="e3284314-1258-cac3-1b6c-243c748be2fe"
UUID_SU…

fstab

fstab is a file (actually /etc/fstab) showing the partitions that are
automatically mounted by the kernel when it is booted. The kernel reads
the fstab file and follows it.

It is recommended that instead of a device name, a UUID is used. A UUID
is a universally unique identifier for the device. This hexadecimal
value doesn't change even as you remove hard drives or replace them, or
move their connections around. In other words the hard drives don't get
lost in the shuffle. If you have more than one hard drive in the box
like me that would be a tremendous help keeping tabs.

The fstab lists the root partition and swap partition. Ubuntu plans to
use a swap file by Ubuntu 17.04 but fstab rules still applies. Each
partition contains the name or UUID, mount point, filesystem type, mount
options, etc. Don't worry about the details, fstab is automatically
generated for you upon installation. You do get extra points for
modifying it for security, and if you have more esoteric plans…

How Did I Get Started With Linux?

I started my journey in Linux from Windows XP. I spent half the time
trying to regain control of my computer. I spent too many minutes
checking malware and viruses. I spent too many minutes wondering why my
machine is getting slow. Then I ask myself if there's a better way.

A better way is not a new GUI. A better way is not surrendering control
to the machine and letting it handle the way I work. When I first
install a Linux distribution, I was surprised at its speed, then I
checked if I can work with the alternative applications. Using Linux is
empowering. You figure things out with other people online asking the
same questions. Then I read. Then I do and test. Then I learn.

I don't create code. I do know how to work a script. I examine logs.
Then I read. Then I learn. This is something I wouldn't do if I'm using
Microsoft or OSX, although you can code on those platforms.

State Of My Blogging 2016

Image
This is how my wordpress blog appears on the desktop, December 2016. Evoking mystery and unknown adventure with shadows and light. I'm using 2016 theme from the Wordpress resource.

Smartctl Knows If It Slips

I have smartctl configured to run short tests on all my hard drives but I wonder if it slips one, what would happen.

donato@desktop:~$ less /var/log/syslog|grep sdd
Dec 14 08:30:31 desktop smartd[1444]: Device: /dev/sdd [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 74 to 68
Dec 14 08:30:31 desktop smartd[1444]: Device: /dev/sdd [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 26 to 32
Dec 14 08:30:31 desktop smartd[1444]: Device: /dev/sdd [SAT], old test of type S not run at Sat Dec 10 23:00:00 2016 PHT, starting now.
Dec 14 08:30:31 desktop smartd[1444]: Device: /dev/sdd [SAT], starting scheduled Short Self-Test.

This is part of the logs in the 14th reporting that indeed smartctl did not run the test once. It started a short test immedietely.

With Mom At VMMC

Image
Creatinine, uric acid and triglycerides are still above normal.

Prescriptions and medicines.


Donato Roque@Asus_Z00AD
SMS:639185721710

SSMTP Instead Of Postfix

I am using Ubuntu 16.04 LTS. I was trying to send email from the command
line to my Gmail address. So instead of monitoring tools sending info
and warning emails to root I want them to arrive in my proper email
address.

I tried Postfix but after a month of trying to make it work and looking
at mail logs, I give up. I removed it and installed ssmtp instead. The
configuration is very simple. Open the file:

#nano /etc/ssmtp/ssmtp.conf

and make sure these appears on the file:

mailhub=smtp.gmailaddress.com:587
Authuser=gmailaddress
Authpass=AppPassword
UseTLS=YES
UseSTARTTLS=YES

Close and save the file. Then test it with:

$echo "Test email for SSMTP" | mail -s "Test Email" gmailaddress.com

Check if you receive the email. If not then you could check the mail
logs with:

#tail /var/log/mail.log

Ordered A Hard Drive Online

I ordered a 3 TB internal hard drive from Lazada, an online shopping
website. I'm paying 4,699 cash on delivery for it. That places this
drive at 1.56 per GB. But it would stick out among the 2 TB Hard drives
I am already using. My last purchased hard drive is a Seagate 2 TB
costing 3,200 cash last July 2016. My oldest hard drive is a Seagate
Barracuda 1 TB at least 5 years old but has 31,100 hours on it according
to smartctl. If you want a complete information on hour hard drive just
type:

#smartctl -a /dev/sda

The command will print out SMART information gathered from monitoring
your hard drives.

The Simplest Explanation

After that accidental reboot a few days ago, I keep getting something from the logs. It's about the kernel unable to resolve /dev/sdd1
symlinks, about ata6 fails. This is a drive which is a member of
/dev/md0, a RAID5 array I use. I checked the RAID with:

$mdadm --detail /dev/md0

and the supposed 3 working devices making up this RAID5 array is now 2,
with 1 removed as reported in the logs.

This is happening for a couple of days now, sometimes more than once a
day. I would add the device back to the array but the kernel will
complain about ata6 (/dev/sdd) and remove it from the array. I already
checked this hard drive (/dev/sdd 1 TB). SMART marks this hardware OK
and I ran an extended self-test on it to satisfy my self. Is this a
software or a hardware problem?

I opened the desktop box panel so I can inspect the cables for the
drives. It's always the cables, it's always the loose connection.

Vice President Leni Robredo Resigns Cabinet

"I read the news today oh boy". VP Leni Robredo resigned her Cabinet job as Housing Secretary. She was sent an SMS from Malacanang that she is not to attend the Cabinet meetings starting December 5 anymore. Perhaps PDuterte figured she's the leak in the Marcos Reinstatement - Bato Call issue. In any case PDuterte cannot work with her anymore. Malacanang *just* sent an SMS to the Vice President. Bastos talaga.

Clearly, right from the start the President and the Vice President have differences. First, Leni says *Marcos Is Not A Hero* and PDuterte says by law he deserves a heroes burial. Second, Leni wants the EJK to stop, PDuterte want to intensify and prolong EJK. But I also believe that PDuterte wants another one to sit as Vice President - Bong Bong Marcos. PDuterte has behaved and shown publicly his preference. Leni has resigned the Cabinet but She is elected as Vice President, only the people can remove her from that position.

Accidental Reboot / Shutdown Causes Errors In The Hard Drive

I accidentally pressed the hardware reset because it's too close to the headphone jacks. I've got big fingers what can I say. So it's a couple of seconds later that I noticed that the computer (the monitor) has restarted. Except that the initial restart sequence is throwing me to a console with a bad ata status:DRDY message. I've seen this before. It's a bad shutdown for one or more of the hard drives / raid device.
I checked the status of the RAID device and confirmed it. I've got an inactive array. So I issued:

#mdadm /dev/md0 --stop

to stop the array and restart it with:

#mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1

but no go, so again i tried this:

#mdadm --assemble --force /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1

I check the status of the array after I started it.

#mdadm --detail /dev/md0

root@desktop:~# mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Tue Sep  6 02:59:21 2016
     Raid Level : raid5
     Array Size : 1953260544 (1862.7…