Change Password for Active Directory Administrator on Windows Server 2016

The very first thing I do after installing Active Directory (AD) on Windows Server is to change the password of my AD Administrator. I do this because I use Amazon Web Services (AWS) EC2 as my servers and AWS automatically generates the password for my Windows Server.

The AD Administrator is a very powerful user for Active Directory as you can restrict or open capabilities to other users and computer, install/uninstall programs and can even shut down any member computer using the Admin user. That is why you should really keep your AD Administrator User password in a safe place.

Whatever the reason you have for wanting to change the password of your AD Administrator below is a step-by-step tutorial on how to change it.

Login to your Windows Server.

Click on the Window Icon on the bottom-left and click on Server Manager.

Click on Tools then Active Directory Users and Computers.

Click on the ‘>‘ sign beside your domain on the left sidebar. This will expand the tree. Continue reading Change Password for Active Directory Administrator on Windows Server 2016

Configure Active Directory on Windows Server 2016

Below are detailed instructions on how you can setup Active Directory on your Windows Server 2016.

Sections on installing Active Directory.

Note: You can only do the steps below if you are an Administrator of your Windows Server.

Change the Computer Name

This is an optional step, but I would highly encourage you to do this so that your computer name will not be like EC2AMAZ-3TVT1HF, but a more descriptive one.

In this case since I am going to use the computer that we will setup as an Active Directory Domain Contoller I shall name my Windows Server as DC01.

In fact, you will have a lot of problem if you rename your computer after installing Active Directory. So better do it now before continuing to the next step.

Follow the steps on my post to change the Computer Name of your Windows Server 2016.

For now check the System Information page of the Windows Server.

Note the Workgroup.

Install Active Directory Feature

Now that we have updated the Computer Name of our Windows Server we can now start installing Active Directory.

Click on the Window Icon on the bottom-left side of the screen. Click Server Manager from the Menu.

On the Server Manage Window click on Add roles and features. Continue reading Configure Active Directory on Windows Server 2016

Changing the Computer Name of Windows Server 2016

Every time I launch a Windows Server on AWS or Google Cloud it always provides a random Computer Name. As a good practice I always want my computers to be named descriptively.

In this case I would like to update my Windows Server 2016 Computer Name to DC01, which means Domain Controller 01, since I will be using this server for Active Directory.

Below is a step by step guide on how to rename my Windows Computers to a more descriptive name.

Renaming the Windows Computer

Right-click on the Window Icon on the lower-left of the screen. Then click on System.

On the System Information Window, under Computer name, domain, and workgroup settings click on Change settings.

Continue reading Changing the Computer Name of Windows Server 2016

Installing MySQLdb for Python 3 in Windows

My favorite Python connector for MySQL or MariaDB is MySQLdb, the problem with this connector is that it is complicated to install on Windows!

I am creating this article for those who want to install MySQLdb for Python 3 for Windows. Especially me, since each time I am doing a Python project that needs to connect to MariaDB or MySQL I always look on how to install MySQLdb.

If you are interested why I prefer MySQLdb compared to other MySQL connectors you may want to read the comparison of MySQL-connector and MySQLdb from Charles Nagy.

Problems with installing MySQLdb on Windows

You can actually install MySQLdb using pip. See pypi documentation here.

pip install MySQL-python

Unfortunately, the pypi documentation is already out of date with the latest release was on Jan 3, 2014. Continue reading Installing MySQLdb for Python 3 in Windows

Resizing Storage Volume for AWS EC2 Windows without Restarts/Downtime

Problem: You are running a critical Windows Server on AWS EC2 and the C: drive is almost full (storage volume) but it should zero downtime (No Restart, No Stop then Start). Is this possible on AWS EC2?

Yes, it is possible.

Check the instructions below.

Test Windows Server

AMI Microsoft Windows Server 2016 Base
Instance Type t2.micro
Storage 30 GiB – General Purpose SSD (gp2)

Storage Size

We are increasing the Storage size from 30 GiB to the target size of 50 GiB.

You can set any size that you want as long as it is bigger than the current size.

Resizing Storage

To resize the volume of the Windows Drive on AWS you can follow the steps below. Continue reading Resizing Storage Volume for AWS EC2 Windows without Restarts/Downtime

AWS Lambda Console: Accessing Environment Variables via Python

Editing configuration values inside the code is a high risk for error since there is a high chance that not only the values that you are changing you will change, you might even delete a letter or edit a line. In order to avoid this risk, you want your code to be able to accept configuration values at run time. This is extremely useful when developing codes on different environments like development, testing and production.

With AWS Lambda you can reuse your code on different environments using the Environment Variables.

Below is the way to use Environment Variables on AWS Lambda Console using Python 3.6.

Note: This is the same way to use Environment Variables on Python 2.7 and Python 3.7.

Environment Variables Setup

The Environment Variables section can be found under the Function Code section.

Environment Variables are Key/Value Pairs. The Key is what you will use on your Lambda Code, to access its Value. Continue reading AWS Lambda Console: Accessing Environment Variables via Python

Making an Off-Screen Window Appear in Windows 10

When opening a program in Windows, sometimes it would open itself in a position outside of the screen. Right-clicking the program on the taskbar does not work. Trying to move it to a new desktop is also futile. Using window key+arrow keys is also not making it appear. What to do then?

Below is a way to make the off-screen window appear again.

  1. Click the off-screen program icon on the Windows Taskbar to make it the active window.

    I selected Powerpoint as my active window (highlighted).

    Continue reading Making an Off-Screen Window Appear in Windows 10

Showing “Open with Atom” when right clicking File or Folder in Windows 10

When right clicking on the File or Folder in Windows Explorer, the context menu will not show “Open with Atom” as an option. Because of this a user would need to open Atom Text Editor then Add Project Folder to see the Folder Tree on the side bar. Quite a lot of steps really.

Having a “Open with Atom” would be a time saving feature.

Context Menu for Folders

 

Context Menu for Files

The Context Menu is the menu that you can see every time you right-click a file or folder in Windows Explorer or Windows Desktop.


Is there a way to add “Open with Atom” on the context menu when you right click on a file or folder?

Yes, there is. Follow the instructions below. Continue reading Showing “Open with Atom” when right clicking File or Folder in Windows 10

How to Format an SD Card after using it on a Raspberry Pi (Windows Disk Management)

Whenever you install a Raspberry Pi Operating System (Raspbian, Ubuntu Mint, etc.) on an SD Card you will get two drives. One is formatted in FAT32 and the other in Linux Filesystem Format.

On the photo above here the SD card has 2 drives. E: and F:.

E: FAT32 42.4 MB Max Size
F: Linux File System ????

Note: There is actually a way to know what specific file system and how big it is for the Drive F:. I am avoiding it on this post as it would complicate matters.

Note: You may get a different drive for your SD Cards with Raspberry Pi OS when you insert them on Windows.

You can read more about SD Card Disk Partitions when using it for a Rasberry Pi here.

Now when you want to use an SD Card back to like using it on your Android Phone or camera, you just cannot use it by simply inserting it on the SD Card slot and turning on your gadget. You have to properly format the SD Card.

Note: If this method does not work for you, I will be writing another method for Windows, Mac and Linux systems in the future.


Problem

If you format separately the two drives (E: and F:), you will end up with two drives instead of one that has the full capacity of the SD Card.

Continue reading How to Format an SD Card after using it on a Raspberry Pi (Windows Disk Management)

Arduino Uno Schmitt Trigger Voltage Logic Levels

I wanted to know the Schmitt Trigger Voltage Logic Levels for the Arduino Uno since I want to know on what voltage would the digital input pin detect a logic high or a logic low.

I know that the Arduino Uno uses the ATmega328 with a 5V as its voltage supply. I checked the ATmega328 specification sheet and since it was too long to read (TL;DR), I would rather check using a Signal Generator and an Oscilloscope.



The Setup

Here is the list of equipment that I used for doing this experiment

  • Arduino Uno powered via USB port
  • Laptop (Windows)
  • 2-Channel Oscilloscope (PicoScope)
  • Signal Generator

Continue reading Arduino Uno Schmitt Trigger Voltage Logic Levels