The writing is on the wall...
Amazon Web Services (AWS) has released their newest product: Amazon Linux 2
Find out all about it here: Amazon Linux 2
April Fools Day is Canceled!
For the first time in many years, I will not be playing any pranks on April Fools Day. I cannot come up with anything that can compete with all the craziness that is already happening in the real world.
BASH Cheatsheet/Reference
There is an excellent BASH cheatsheet/reference available online here: Click HERE
This reference was made for Vim 8.0: Click HERE
This reference was made for Vim 8.0: Click HERE
I Am A: True Neutral Human Ranger (7th Level)
Ability Scores:
Strength-11
Dexterity-10
Constitution-11
Intelligence-13
Wisdom-12
Charisma-12
Alignment:
True Neutral A true neutral character does what
seems to be a good idea. He doesn't feel strongly one way or the other when it comes to
good vs. evil or law vs. chaos. Most true neutral characters exhibit a lack of
conviction or bias rather than a commitment to neutrality. Such a character thinks of
good as better than evil after all, he would rather have good neighbors and rulers than
evil ones. Still, he's not personally committed to upholding good in any abstract or
universal way. Some true neutral characters, on the other hand, commit themselves
philosophically to neutrality. They see good, evil, law, and chaos as prejudices and
dangerous extremes. They advocate the middle way of neutrality as the best, most
balanced road in the long run. True neutral is the best alignment you can be because it
means you act naturally, without prejudice or compulsion. However, true neutral can be a
dangerous alignment when it represents apathy, indifference, and a lack of conviction.
Race:
Humans are the most adaptable of the common races. Short
generations and a penchant for migration and conquest have made them physically diverse
as well. Humans are often unorthodox in their dress, sporting unusual hairstyles,
fanciful clothes, tattoos, and the like.
Class:
Rangers are skilled stalkers and hunters who make their
home in the woods. Their martial skill is nearly the equal of the fighter, but they lack
the latter's dedication to the craft of fighting. Instead, the ranger focuses his skills
and training on a specific enemy a type of creature he bears a vengeful grudge against
and hunts above all others. Rangers often accept the role of protector, aiding those who
live in or travel through the woods. His skills allow him to move quietly and stick to
the shadows, especially in natural settings, and he also has special knowledge of
certain types of creatures. Finally, an experienced ranger has such a tie to nature that
he can actually draw on natural power to cast divine spells, much as a druid does, and
like a druid he is often accompanied by animal companions. A ranger's Wisdom score
should be high, as this determines the maximum spell level that he can cast.
Find out What Kind
of Dungeons and Dragons Character Would You Be?, courtesy of Easydamus (e-mail)
Ability Scores:
Strength-11
Dexterity-10
Constitution-11
Intelligence-13
Wisdom-12
Charisma-12
Alignment:
True Neutral A true neutral character does what
seems to be a good idea. He doesn't feel strongly one way or the other when it comes to
good vs. evil or law vs. chaos. Most true neutral characters exhibit a lack of
conviction or bias rather than a commitment to neutrality. Such a character thinks of
good as better than evil after all, he would rather have good neighbors and rulers than
evil ones. Still, he's not personally committed to upholding good in any abstract or
universal way. Some true neutral characters, on the other hand, commit themselves
philosophically to neutrality. They see good, evil, law, and chaos as prejudices and
dangerous extremes. They advocate the middle way of neutrality as the best, most
balanced road in the long run. True neutral is the best alignment you can be because it
means you act naturally, without prejudice or compulsion. However, true neutral can be a
dangerous alignment when it represents apathy, indifference, and a lack of conviction.
Race:
Humans are the most adaptable of the common races. Short
generations and a penchant for migration and conquest have made them physically diverse
as well. Humans are often unorthodox in their dress, sporting unusual hairstyles,
fanciful clothes, tattoos, and the like.
Class:
Rangers are skilled stalkers and hunters who make their
home in the woods. Their martial skill is nearly the equal of the fighter, but they lack
the latter's dedication to the craft of fighting. Instead, the ranger focuses his skills
and training on a specific enemy a type of creature he bears a vengeful grudge against
and hunts above all others. Rangers often accept the role of protector, aiding those who
live in or travel through the woods. His skills allow him to move quietly and stick to
the shadows, especially in natural settings, and he also has special knowledge of
certain types of creatures. Finally, an experienced ranger has such a tie to nature that
he can actually draw on natural power to cast divine spells, much as a druid does, and
like a druid he is often accompanied by animal companions. A ranger's Wisdom score
should be high, as this determines the maximum spell level that he can cast.
Find out What Kind
of Dungeons and Dragons Character Would You Be?, courtesy of Easydamus (e-mail)
CompTIA Linux+ CE
Got my CompTIA Linux+ CE Tests (2) done, which fulfills the requirements for two more WGU Classes! Now I have completed 6/18 classes. One third of the way to graduation!
More Certs!
Two more certifications added to my collection. Why did I get these entry-level certifications? Because I am now a full-time student at Western Governors University! Some of the classes that are required for my bachelors degree program use industry standard certification exams as their final exam. So I will eventually end up with both a list of certifications, and a Bachelor of Science, Cloud and Systems Administration degree from an accredited university!
For more information on what can be accomplished at WGU, visit their website at http://www.wgu.edu
Show contents of a file without commented out lines and blank lines
A customer asked me how to display the contents of a text file, in
this case a configuration file, without showing any blank line, nor
any lines that started with a "#" character (commented out lines).
We can do this at the Linux command line, using sed,
if you know how to craft the regex:
For further reference: https://www.gnu.org/software/sed/manual/sed.html
this case a configuration file, without showing any blank line, nor
any lines that started with a "#" character (commented out lines).
We can do this at the Linux command line, using sed,
if you know how to craft the regex:
sed -e '/^ *#/d' -e '/^$/d' /dir/file.conf
For further reference: https://www.gnu.org/software/sed/manual/sed.html
There are thousands of resources online: GOOGLE
2018 Nebraska Cornhuskers Football Schedule
DATE OPPONENT RESULT/TIME
============ ============== =================
Sat, Sept 1 Akron Canceled
Sat, Sept 8 Colorado Loss 33-28
Sat, Sept 15 Troy Loss 24-19
Sat, Sept 22 @ #21 Michigan Loss 56-10
Sat, Sept 29 Purdue Loss 42-28
Sat, Oct 6 @ #5 Wisconsin 7:30pm
Sat, Oct 13 @ Northwestern 12:00 PM ET
Sat, Oct 20 Minnesota TBD
Sat, Nov 3 @ #4 Ohio St TBD
Sat, Nov 10 Illinois TBD
Sat, Nov 17 #15 Mich. St. TBD
Fri, Nov 23 @ Iowa 12:00 PM ET FOX
Source
============ ============== =================
Sat, Sept 1 Akron Canceled
Sat, Sept 8 Colorado Loss 33-28
Sat, Sept 15 Troy Loss 24-19
Sat, Sept 22 @ #21 Michigan Loss 56-10
Sat, Sept 29 Purdue Loss 42-28
Sat, Oct 6 @ #5 Wisconsin 7:30pm
Sat, Oct 13 @ Northwestern 12:00 PM ET
Sat, Oct 20 Minnesota TBD
Sat, Nov 3 @ #4 Ohio St TBD
Sat, Nov 10 Illinois TBD
Sat, Nov 17 #15 Mich. St. TBD
Fri, Nov 23 @ Iowa 12:00 PM ET FOX
Source
How to configure Postfix on CentOS 7 to relay email via Gmail
Postfix
is a flexible mail server that is available on most Linux
distributions. Although Postfix is a full feature mail server, it can also be
used as a simple relay host to relay email to another mail server or
smart host for processing. This tutorial will describe how to configure Postfix as a
relay through Gmail.
Simple
Authentication and Security Layer (SASL) is a standard authentication
framework supported by many services including Postfix.
Requirements
- CentOS 7
- A Valid Gmail account or Google App credentials (I recommend creating a credential just for this use)
Install Packages
Ensure Postfix, the SASL authentication framework, and mailx are all installed:
yum -y install postfix cyrus-sasl-plain mailx
Postfix will need to be restarted before the SASL framework will be detected.:
systemctl restart postfix
Postfix should also be set to start on boot:
systemctl enable postfix
Configure Postfix
Open the /etc/postfix/main.cf file in your favorite text editor (vi!) and add the following lines to the end of the file:
myhostname = hostname.example.com #The hostname of your server
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
The myhostname parameter is optional. If the hostname is not specified, Postfix will use the fully-qualified domain name of the Linux server.
Save the main.cf file and close the editor.
Configure Postfix SASL Credentials
The Gmail credentials must now be added for authentication. Create a /etc/postfix/sasl_passwd file and add the following line:
[smtp.gmail.com]:587 username:password
The username and password values must be replaced with valid Gmail credentials. The sasl_passwd file
can now be saved and closed.
A Postfix lookup table must now be generated from the sasl_passwd text file by running the following command:
postmap /etc/postfix/sasl_passwd
Access to the sasl_passwd files should be restricted:
chown root:postfix /etc/postfix/sasl_passwd*
chmod 640 /etc/postfix/sasl_passwd*
And finally, reload the Postfix configuration:
systemctl reload postfix
Test the Relay
Use the mail command to test the relay:
echo "This is a test." | mail -s "test message" user@example.net
Instead of user@example.net, use a valid email address. Check your email!
Troubleshoot Delivery Issues
Postfix will log to /var/log/maillog, and this file can
be reviewed if the test message is not successfully delivered. Open a
separate shell window to watch the maillog using this command:
tail -f /var/log/maillog
Now re-run the email test in the original terminal window. Watch the log entries.
If there are not enough details in the log to determine the problem, then the debug level can be increased by adding the following lines to the /etc/postfix/main.cf file:
debug_peer_list=smtp.gmail.com
debug_peer_level=3
The Postfix configuration must be reloaded after updating the main.cf file:
systemctl reload postfix
Do not leave those settings in the configuration file long term, or your log files will get excessively large, which can have a negative impact on server performance.
Quick & Dirty: How do I get Linux?
Someone recently asked me how they can get Linux, install it on something, and start learning how to use it. It's actually not that difficult to do these days. Here is the high-level view of what is going on:
Download a free CentOS Linux installation ISO file from here:
https://mirror.umd.edu/centos/ 7/isos/x86_64/CentOS-7-x86_64- Minimal-1804.iso
Save the file to your Windows Desktop or laptop.
Download Oracle VirtualBox from here: https://www.virtualbox.org/wiki/Downloads
Install VirtualBox on your Windows PC or laptop, following the instructions from their website. There's also a Mac version if you play like that. Once VirtualBox is installed, go back to your download directory and double-click on the Extension Pack to install it. You now have a free virtualization platform on your Windows machine! In the VirtualBox application, you can create a new Virtual Machine, which will run on your computer, and look/act like a real system. You can then install Linux using the ISO image file you downloaded earlier.
Instructions (with pictures) for installing CentOS 7 are available all over the internet. However, I think the person who blogs on this particular site, has done a very good write-up (with pictures):
https://www.server-world.info/ en/note?os=CentOS_7&p=install
The site also has many tutorials for installing and configuring many different things on Linux.
Go to Google, type in "Linux for beginners" and hit enter. There are tons of free online resources to learn more about Linux!
Download a free CentOS Linux installation ISO file from here:
https://mirror.umd.edu/centos/
Save the file to your Windows Desktop or laptop.
Download Oracle VirtualBox from here: https://www.virtualbox.org/wiki/Downloads
Install VirtualBox on your Windows PC or laptop, following the instructions from their website. There's also a Mac version if you play like that. Once VirtualBox is installed, go back to your download directory and double-click on the Extension Pack to install it. You now have a free virtualization platform on your Windows machine! In the VirtualBox application, you can create a new Virtual Machine, which will run on your computer, and look/act like a real system. You can then install Linux using the ISO image file you downloaded earlier.
Instructions (with pictures) for installing CentOS 7 are available all over the internet. However, I think the person who blogs on this particular site, has done a very good write-up (with pictures):
https://www.server-world.info/
The site also has many tutorials for installing and configuring many different things on Linux.
Go to Google, type in "Linux for beginners" and hit enter. There are tons of free online resources to learn more about Linux!
Check SUID/SGID program Audit rules
Here's an interesting BASH script that checks that all SUID/SGID files have a corresponding audit rule. Useful if you work in an environment where you are required to periodically perform this check, and like all good (lazy) sysadmins, wish you had a script to automate this task...
exit 0
#!/bin/bash
for i in `lsblk --output MOUNTPOINT | grep /`
do
for i in `lsblk --output MOUNTPOINT | grep /`
do
for j in `find ${i} -xdev -type f \( -perm -4000 -o -perm -2000 \)`
do
if [ "$(grep -c ${j} /etc/audit/audit.rules)" -ge 1 ]; then
# If there is a rule...do nothing?
do
if [ "$(grep -c ${j} /etc/audit/audit.rules)" -ge 1 ]; then
# If there is a rule...do nothing?
echo "" > /dev/null
else
echo "suid/sgid program ${j} - NO audit rule!"
fi
done
done
else
echo "suid/sgid program ${j} - NO audit rule!"
fi
done
done
Subscribe to:
Posts (Atom)





