Jumat, 15 November 2013

Xathrya Sabertooth

Xathrya Sabertooth


Installing SQL Server 2012 on Windows Server 2012

Posted: 14 Nov 2013 11:51 PM PST

Microsoft SQL Server, also called as SQL Server only, is a relational database management system (rdbms) developed by Microsoft. It is used to store and retrieve data as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). SQL Server use structured query language (SQL), technically they are T-SQL and ANSI SQL.

Some applications are likely high-coupled with Microsoft SQL Server. In simple term, they are works with SQL Server around. This is normal for Windows applications.

In this article we will discuss about how to install Microsoft SQL Server 2012 on Windows Server 2012. SQL Server 2012 has four editions: Enterprise, Standard, Developer, and Express edition. We will use Microsoft SQL Server 2012 Developer edition. This edition only suitable for development process. However this is enough, as the installation process is roughly same for any edition.

Another Extra Info

SQL Server Standard and Enterprise Edition usually used for production, while Developer Edition used for development. If we use one of them, we can also install another tool set beside SQL Server DBMS, for example: SQL Server Reporting Service, SQL Server Analysis Service, and SQL Server Integration Service.

Stage 1: Add New Username to Active Directory

If you have installed Active Directory, you should add new username in your active Directory. This username is used for SQL Server and also this step is always done if you want to create a bigger service such as SharePoint. The username for SQL Service is service and different with other username, so we will create it to new Organizational Unit (OU). Let name it as WINDEV (My machine’s NetBIOS name) so our username would be WINDEV\SQL_Service.

Open “Start screen” and choose “Active Directory Users and Computers“. Right click to your domain controller, in my case it is “windev.xathrya.web.id”. Navigate to New > Organizational Unit. Then create the name you prefer.

create-new-ou

create-new-ou-2

Then, create new user under WINDEV, SQL_Service

create-new-user

Click Next and set the password. Don’t forget to uncheck “User must change the password at next logon” and check “Password never expires”.

Stage 2: SQL Server Installation

If you have the DVD, insert it to tray. If you have the ISO, mount it. Either way, you should have opened and see a setup executable file.  Run it and wait until the installation window appears.

sql-server-1

Click on “Installation” on left pane. Then, click on “New SQL Server stand-alone installation or add features to an existing one”. Wait for next page.

sql-server-2

SQL Server installer will do some checks. It will be decided whether your machine is fulfilling the prerequisites or not for installation.

sql-server-3

Next, enter the product key. As said before, we are using SQL Server 2012 Developer Edition.

sql-server-4

The next screen prompts us to accept the license terms. We can also opt to send anonymous feature usage data to Microsoft.  It is recommended to do this as Microsoft actually uses this data to qualify and prioritize future development efforts.

sql-server-5

SQL Server also checks for updates. However we can exclude the update for now.

sql-server-6

Setup then checks for conditions that may interfere with the installation of setup support files:

sql-server-7

On above window, I would install the SQL Server on same machine as my Domain Controller. In the real world, actually we don’t do this. We have separate machine for Domain Controller and SQL Server.

Next select the setup role in the installation process. We choose "All Features With Defaults,"

sql-server-8

Click next to continue to the Feature Selection. The content would be populated based on our machine. We also install it to default path, so we won’t lay our finger there.

sql-server-9

Setup next checks installation rules.

sql-server-10

Next we determine the instance ID. This is the ID for SQL Server in our machine. It should be unique if it is used in production level when more than one SQL Server is used. In our case, we are only using it for developing so we won’t mess with it.

sql-server-11

Setup will calculate the disk space. Roughly 7GB is required when we install all the features (default features).

Next we do service account configurations. We use WINDEV\SQL_Service for all account, and remember to set the password.

sql-server-12

Database engine configuration includes Authentication Mode and SQL Server Administrators. You can accept the defaults if you want. We use Mixed Mode Authentication (combined with very strong passwords) for my installations. Clicking the Add Current User button adds me to the SQL Server administrators

sql-server-13

Next we have Analysis Services setup. I mostly work with Tabular Model these days.  As before, I click the “Add Current User” button to add this account to the Administrators:

sql-server-14

Accept the defaults for Reporting Services configuration:

sql-server-15

Click on “Add Current User” button.

sql-server-16

Give DRC (Distributed Replay Client) a name. In this case, I use XathWinServ2012Sql:

sql-server-17

Next we have Error Reporting page. Just click on Next.

Then, Installation configuration rules are checked for consistency and readiness.

sql-server-18

Next we will be presented by a confirmation page. When you decided to accept the configuration, click Install to begin installation.

sql-server-19

Installation will take some times. You should grab some food or doing something else.

sql-server-20

When the process come to end, it’s time to celebrate it. You have installed the SQL Server 2012.

Installing DNS Server on Windows Server 2012

Posted: 14 Nov 2013 10:24 AM PST

Domain Name System (DNS) is a hierarchical distributed naming system for computers, services, or any resource connected to the Internet or a private network. It associates various information with domain names assigned to each of the participating entities. Most prominently, it translates easily memorized domain names to the numerical IP addresses needed for the purpose of locating computer services and devices worldwide. By providing a worldwide, distributed keyword-based redirection service, the Domain Name System is an essential component of the functionality of the Internet.

Windows Server 2012 use it’s own DNS server program, named Microsoft DNS. This is the default on any Windows Server.

Like any service on Windows Server 2012, Microsoft DNS is implemented as server role. This article will discuss about how to install DNS service in Windows Server 2012.

Installation

Open “Server Manager” from task bar, if you have not opened it yet.

From “Server Manager” Dashboard, select “Add roles and features”. This will launch the Roles and Features Wizard allowing for modifications to be performed on the Windows Server 2012 instance.

install-ad-1

Select “Role based or features-based” installation from the Installation Type. Roles are the major feature sets of the server, such as IIS. Features provide additional functionality for given role.

install-ad-2

When asked for destination server, select the current server. It should be chosen by default. Click “Next” button to proceed.

install-ad-3

From the Server Roles, choose the option “DNS Server” by checking it. A notice will appear explaining additional roles services or feature are also required to install domain services.

dns-role-1

If you don’t set your machine using static IP address, you will get a warning message. Make sure you set your machine to static IP address so client can resolve your machine. However, you can always ignore it and go to next stage for installation.

dns-role-2

Now we will be brought to “Features” page. Review and select optional features to install during installation of DNS Server. You can check any features but we will leave it as is.

Review the information. Click Next.

dns-role-3

Review the installation. This page will show you information about what will be installed. When ready, press “install” button.

dns-role-4

Installation will take on. It should not be long, but that will depend on your machine. In installation process, a progress bar will be displayed on the screen. Once Active Directory role is installer, it will be displayed on the ‘Server Manager’ landing page.

dns-role-5

Disable Ctrl + Alt + Delt Prompt to Login Windows Server 2012

Posted: 14 Nov 2013 09:54 AM PST

By default, whenever we boot Windows Server 2012 we will be asked to press ctrl + alt + del on logon screen. Sometimes this is annoying and fortunately we can remove it so we can start typing the username and password without pressing ctrl+alt+del.

In this article we will discuss about how to disable Ctrl+Alt+Del prompt.

The Idea

Everytime we login we need to press Ctrl+Alt+Del. This policy is defined by Windows on “Local Security Policies” and can be disabled manually.

How to Enable

Open the “Start” screen, click “Administrative Tools”.

administrative-tool

Double click the “Local Security Policy” icon, expand Local Policies and click Security Options. In the right pane search and open”Interactive logon: Do not require CTRL+ALT+DEL” and choose “Enabled“. Save the policy change by clicking OK.

disable-ctrl-alt-del-1

Enable Sound on Windows Server 2012

Posted: 14 Nov 2013 09:04 AM PST

By default, Windows Server 2012 disables audio. This of course has a reason. Most servers won’t need it. However, you can always enable manually or make it enable by default.

In this article we will discuss about how to enable sound on Windows Server 2012.

The Idea

Sound is a service. Like any other service, it can be manually started or we can set it enabled automatically on every boot time.

How to Enable

Go to Services window. There are two ways to do that. First: Open the “Start” screen, click “Administrative Tools” and open the “Services” shortcut. Second: press CTRL+R (opening Run dialog) and type “services.msc“.

You will see a window for Services.

audio-1

Search for “Windows Audio” service and double click it (or press enter button on it). We will be presented by another window.

If we want it to enable for only this time, click on “Start” button. If you want it to run automatically, set its “Startup type” to “Automatic“. Repeate this process for “Windows Audio Endpoint Builder” service. If you want to use audio immediately, also click the Start button in the Properties window of both services in addition to changing the Startup type.

audio-2

Kamis, 14 November 2013

Xathrya Sabertooth

Xathrya Sabertooth


Installing Active Directory on Windows Server 2012

Posted: 13 Nov 2013 05:52 PM PST

Active Directory (AD) is Microsoft’s implementation of directory service for Windows domain network. It uses Lightweight Directory Access Protocol (LDAP) version 2 and 3, Microsoft’s version of Kerberos, and DNS.

Active Directory is used on Windows Server. Usually a dedicated server for Active Directory is referred as Domain Controller. A Domain Controller authenticates and authorizes all users and computers in a Windows domain type network. It also assign and enforce security policies for all computers and installing or updating software.

In a network, there should be only one Active Directory Domain Controller. Or, at least there is one master and only two slave Domain Controller at maximum for load balancing.

Like any service on Windows Server 2012, Active Directory Domain Service (AD DS) is implemented as server role. This article will discuss about how to install Active Directory in Windows Server 2012.

Installation

Open “Server Manager” from task bar, if you have not opened it yet.

From “Server Manager” Dashboard, select “Add roles and features”. This will launch the Roles and Features Wizard allowing for modifications to be performed on the Windows Server 2012 instance.

install-ad-1

Select “Role based or features-based” installation from the Installation Type. Roles are the major feature sets of the server, such as IIS. Features provide additional functionality for given role.

install-ad-2

When asked for destination server, select the current server. It should be chosen by default. Click “Next” button to proceed.

install-ad-3

From the Server Roles, choose the option “Active Directory Domain Services” by checking it. A notice will appear explaining additional roles services or feature are also required to install domain services.

install-ad-4

There are other options including, Certificate services, federation services, lightweight directory services and rights management. Domain Services is the glue that holds this all together and needs to be installed prior to these other services.

Now we will be brought to “Features” page. Review and select optional features to install during installation of Active Directory. You can check any features but we will leave it as is.

Review the information. Click Next.

install-ad-5

Review the installation. This page will show you information about what will be installed. When ready, press “install” button.

install-ad-6

Installation will take on. It should not be long, but that will depend on your machine. In installation process, a progress bar will be displayed on the screen. Once Active Directory role is installer, it will be displayed on the ‘Server Manager’ landing page.

install-ad-7

Configuration

Once Active Directory Domain Service is installed on the server, we can start configuring our domain. I will assume that this is your first time configuring.

Open the “Server Manager”, if you have not opened it yet.

Open the Notification Pane by selecting the notification icon from the top of the Server Manager. It looks like a flag, and should have an exclamation mark on it. From the notification regarding configuring Active Directory, click “Promote this server to a domain controller”.

config-ad-1

From the Deployment Configuration tab select “Add a new forest” from the radial options menu. Insert your root domain name into the “Root domain name” field. For example, I will use “windev.xathrya.web.id”.

config-ad-2

Review and “select a Domain and Forest functional level”. Once selected “fill in a DSRM password” in the provided password fields. The DSRM password is used when booting the Domain Controller into recovery mode.

config-ad-3

We will be presented by a warning. Review the warning on the DNS Options tab and select Next. If you don’t have DNS server yet, this is the outcome, otherwise you are given option to add new DNS delegation. Either way, click Next after you have done.

config-ad-4

Confirm or enter a NetBIOS name and click Next.

config-ad-5

Configure the location of the SYSVOL, Log files, and Database folders. Click Next when done.

config-ad-6

Review the configuration options and click Next.

config-ad-7

The system will check to ensure all necessary prerequisites are installed. This would be done before moving moving forward to real configuration stage. Once the system passes the check, we will proceed by clicking “Install”.

config-ad-8

Once the server is done, reboot. Now we have successfully installing and configuring an Active Directory Domain Services on Windows Server 2012.

Senin, 11 November 2013

Xathrya Sabertooth

Xathrya Sabertooth


Install Drivers for Windows Server from Windows (Desktop Version)

Posted: 10 Nov 2013 12:14 PM PST

After installation of Windows Server, we should install appropriate drivers for it. In some case, we install Windows Server and Windows (desktop edition) in very same physical machine (for example, development phase). Instead of find and install all the drivers one by one, it is the best choice for us to install the driver from existing Windows desktop.

In this article, we will discuss about how to install drivers for Windows Server where the drivers are taken from existing Windows.

Note that I assume both Windows Server and Desktop are installed on same machine. A different machine might result in incompatibility of drivers or might result in not finding suitable drivers. Also, make sure that in Desktop version of Windows, all required drivers are installed and can running properly.

Matching Couple

Not all Windows version are perfectly matching with each other. Drivers for one version lower than other might have chance in incompatibility. We should choose the most compatible version as possible.

In my experience, there are some possible couple / match between Windows Server and Desktop:

  1. Windows Server 2008 <-> Windows 7
  2. Windows Server 2012 <-> Windows 8

Installation

It is not difficult to install the driver.

Go to Control Panel and search for Device Manager.

cpanel

You should see Device Manager. If you some component needs driver, you will see something like this:

devicemgmt

Theoretically, we can update driver manually. Just right click on device entry, click on “update Driver Software” and go to drive where our Windows desktop installed to. Navigate to \Windows\System32\DriverStore\FileRepository. Remember that when our Windows Server is loaded, the C:\ partition would point to current partition / drive used by Windows Server. The same goes when running Windows desktop. We should find the correct drive where our Windows desktop reside.

Things You Need to Install After Windows Server

Posted: 10 Nov 2013 11:33 AM PST

You have install Windows Server, so what’s next? Of course we need some “arms”, in our context its utility software. In this article, we will discuss about some application that might be need.

We classified the application into some categories. They are:

  1. File Archiver & Compressor
  2. PDF Reader
  3. Browsers
  4. Text Editor
  5. Office Suite
  6. ISO Tool
  7. SSH Server
  8. VNC Server & Client

File Archiver & Compressor

A file archiver is a computer program that combines a number of files together into one archive file, or a series of archive files, for easier transportation or storage. File archivers may employ lossless data compression in their archive formats to reduce the size of the archive.

There are many archive formats, such as: zip, rar, 7z, tar.gz, tar.bz2, etc.

We need file archiver for to create, open, extract, and modify an archive file. There are many solutions out there but my choice would be 7-Zip.

7-Zip is an open source file archiver. 7-Zip operates with the 7z archive format, but can read and write several other archive formats. The program can be used from a command line interface, graphical user interface, or with a window-based shell integration.

For downloading 7-Zip, you can go to 7-Zip official site.

PDF Reader

PDF or Portable Document Format is a file format used to represent documents in a manner independent of application software, hardware, and operating system. Developed by Adobe Systems, PDF now evolved into most popular document format.

Having PDF reader on our server can benefit us as some document might end in PDF, such as: datasheet, documentation, etc.

There are many PDF reader out there. Anyone should be no problem.

Browsers

Browser, or web browser, is a application for retrieving, presenting, and traversing information resources on the World Wide Web. In other world, enable us surf the internet.

The major web browsers are Google Chrome, Mozilla Firefox, Internet Explorer, Opera, and Safari.

Even though the Windows Server 2012 has shipped Internet Explorer as default web browser, but for some people, using some familiar web browser is comforting.

Text Editor

Windows Server has Notepad, so what’s wrong? No it’s not wrong, but it’s not enough!

We need some text editor, but not only a text editor. We need text editor with extra capability, for example: syntax highlighting. Why we need that? Sometimes we are working with configuration or script files. Some are written in a certain programming language. Reading hundred or thousand lines of text in plain text editor will sure give us pain.

My choice goes to Notepad++ or SublimeText.

Office Suite

Yes, office suite. The popular one is Microsoft Office, Open Office, Libre Office, etc.

Any office is no problem. However, for more compatibility I use Microsoft Office.

ISO Tool

An ISO image is an archive file of an optical disc, a type of disk image composed of the data contents of every written sector of an optical disc, including the optical disc file system. ISO image files usually have a file extension of .iso. The name ISO is taken from the ISO 9660 file system used with CD-ROM media, but what is known as an ISO image might also contain a UDF (ISO/IEC 13346) file system (commonly used by DVDs and Blu-ray Discs).

ISO Tool enables us to create and mount an ISO image.

My choice goes to PowerISO.

SSH Server

The old-school guy should know this thing.

Secure Shell (SSH) is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers that connects, via a secure channel over an insecure network, a server and a client (running SSH server and SSH client programs, respectively).

As we know, Windows doesn’t ship SSH Server. Therefore we need third party application which will act as SSH daemon.

Like other softwares, there are many alternatives to SSH Server. But my choice goes to BitVise SSH Server or freeSSHd. BitVise SSH Server is a paid application, but it also offer free product for non-commercial personal use.

VNC Server & Client

VNC, or Virtual Network Computing, is a graphical desktop sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse events from one computer to another, relaying the graphical screen updates back in the other direction, over a network.

In simple words: it is used for remote accessing our Server, graphically.

My choice goes to RealVNC.

Basic Storage and Dynamic Storage in Windows

Posted: 10 Nov 2013 05:33 AM PST

From Windows 2000 onwards, Microsoft started introduce the concept of dynamic disks. The counterpart, basic disk, is used from the era of DOS onward. Both have their advantages and disadvantages.

In this article we will discuss about both disks concept. Our explanation would be as general as possible, in fact there is no instruction on specific platform.

Overview

Basic Disk

Basic Disk uses a partition table to manage all partitions on the disk on first sector of disk. It is supported by DOS and all Windows versions. A disk with installed OS would be default initialized to a basic one. A basic disk contains basic volumes, such as primary partitions, extended partition, and all logical partitions are contained in extended partition.

Basic Disks provide a simple storage solution that can accommodate a useful array of changing storage requirement scenarios. Basic Disks also support clustered disks, IEEE 1394 disks, and USB removable drives.

Basic Disks also use the same Master Boot Record (MBR) partition style as the disks used by Microsoft MS-DOS operating system. It can also support GUID Partition Table (GPT) partitions on systems that support it.

The following operations can be performed only on Basic Disk:

  • Create and delete primary and extended partitions.
  • Create and delete logical drives within an extended partition.
  • Format a partition and mark it as active.

Dynamic Disk

Dynamic Disk is supported in Windows 2000 and later operating system. Dynamic disks do not use a partition table to track all partitions, but use a hidden database (LDM) to track information about dynamic volumes or dynamic partitions on the disk. With dynamic disks we can create volumes that span multiple disks such as spanned and striped volumes, and can also create fault-tolerant volumes such as mirrored volumes and RAID 5 volumes. Compared to a Basic Disk, Dynamic Disk offers greater flexibility.

What is LDM database? LDM or Logical Disk Manager, is a hidden database which size is 1 MB at the end of Dynamic Disk. This space records all the information of the volumes on a single disk, and also holds some related information on each dynamic disk. The information including Drive Letter, Volume Label, the begin sector of Volume, Volume size, the file system of volume.

All disks are interrelated and will hold information mentioned above if there are several dynamic disk on computer. The relevance of each dynamic disk let we will see a "Missing" disk which is shown in Windows Disk Management if we remove a dynamic disk from your system. All this is saved in LDM database, so LDM database is vary important the same as Partition Table of Basic Disk.

Clearly, we can illustrate the Dynamic disk as following:

dynamic-disk

The blue area at the beginning of Dynamic Disk is the MBR which sabes the information of the Partition Table on the disk. However, this partition table is not the same as one of Basic Disk. Its main function is to make Windows and Other Disk Manager can know the disk is a dynamic disk instead of empty disk. The red one at the end of disk is the LDM database.

If you are familiar with Linux, Dynamic Disks system is similar to Logical Volume Manager (LVM).

The following operations can be performed only on dynamic disks:

  • Create and delete simple, spanned, striped, mirrored, and RAID-5 volumes.
  • Extend a simple or spanned volume.
  • Remove a mirror from a mirrored volume or break the mirrored volume into two volumes.
  • Repair mirrored or RAID-5 volumes.
  • Reactivate a missing or offline disk.

Differences

  1. Capacity – Once Basic Disk create a partition, its capacity cannot be change unless we modify the partition table (using gpart, fdisk, or similar software). Dynamic Disk however can expand the capacity of volumes without data loss.
  2. Disk space limitation – On Basic Disk, the maximum capacity of a partition (volume) can be limited to 2 TB. Dynamic Disks can well handle the large partition of more than 2 TB.
  3. Number of partitions – Basic Disk is using primitive MBR disk layout, so it support only 4 primary partition. At best, it use 3 primary partition and use the last primary partition as extended partition. In Dynamic disks, unlimited number of partition can be created.
  4. Volumes type – Basic Disks only can create any primary or logical partition. Dynamic disks can create simple volume, spanned volume, stripped volume, mirrored volume, and RAID-5 volume (software-based RAID).

Similarity

  1. Supported file systems – Basic Disks and Dynamic Disks support FAT, FAT32, and NTFS file systems.
  2. Have a partition table – Dynamic Disks have a partition table too, however this partition table is different from Basic Disks Its main function is to let Windows and other partition manager know the disk is a dynamic disk instead of an empty disk.
  3. Label and Drive Letter – On both Basic Disks and Dynamic Disks, every partition (volume) can be assigned to a unique drive letter (in operating system perspective). such as “System C:”
  4. Disk Layout Supported – Both Basic Disks and Dynamic Disks support MBR and GPT partition styles.

Volume on Dynamic Disk

On Dynamic Disk, the volumes are divided into several categories: Simple Volume, Spanned Volume, Mirrored Volume, and RAID 5 Volume. They have drive letter and volume label to differentiate.

Simple Volume

Simple volume only can be created on the single disk. This volume is similar as partition of Basic Disk, but its space can be inconsecutive.

Spanned Volume

It is created from free space that is linked together from multiple disks (up to 32 disks). The sequence of writing data for Spanned Volume is that the volume on the first disk is filled full and then turn to fill the next dynamic disk. Spanned Volume can allow the fragmentary free space of multiple disks is recomposed as one volume, so it can fully utilize the resources of multi-disk. However, it can not be fault-tolerant volume and can not improve performance of the disk.

Stripped Volume

It’s similar with Spanned Volume, and consists of two and more disks. However, the difference is that it can improve the efficiency and performance of disk, because when operating system writes data to Striped Volume, this data will be separated into many pieces of 64KB, and then concurrent writes a different data block to each disk. A striped volume cannot be mirrored or extended and is not fault-tolerant. The screenshot is below:

Mirrored Volume

We can simply understand that Mirrored Volume is a duplicate of Simple Volume. It needs two disks; one stores the data which is being used, and another keep a copy of previous one. When a disk fails, the other one can be used immediately.

RAID-5 Volume

A RAID-5 requires three disks at least; it not only can enhance the efficiency of the disk but also provide the best fault-tolerant. You could simply consider RAID-5 is a combination of Striped and Mirrored Volume. A RAID-5 volume is a fault-tolerant volume whose data is striped across an array of three or more disks. Parity (a calculated value that can be used to reconstruct data after a failure) is also striped across the disk array. If a physical disk fails, the portion of the RAID-5 volume that was on that failed disk can be recreated from the remaining data and the parity.

Minggu, 10 November 2013

Xathrya Sabertooth

Xathrya Sabertooth


Creating Dual Boot System with Windows 8 and Slackware64 on UEFI-based Machine

Posted: 09 Nov 2013 07:47 PM PST

This is short notes on how I create a dual boot machine with Windows 8 and Slackware64. Both are 64-bit operating system and will be installed on UEFI-based computer with GPT disk layout.

Actually I do this around in earlier year 2013, so this article might not up to date. However it should work because we use general method.

In this article, i use:

  1. Microsoft Windows 8 64-bit, installation disc
  2. Slackware64 14.0, installation disc
  3. Lenovo Ideapad Z480
  4. USB disk

Note that I do the scenario (would be) mentioned because my machine is fresh and I will do it from scratch.

About Machine

Lenovo Ideapad Z480 has following specification (main):

  1. Intel Core i7-3632QM
  2. RAM 4 GB
  3. HDD 1TB
  4. Video RAM NVidia GeForce GT640

However, I also give addition to RAM so in result I have 8GB RAM.

At default, it is not using UEFI so I activated UEFI capability.

I also convert the disk format from MBR to GPT, however I do this later.

General Overview

The problem arise before me is the fact that the Windows 8 installation DVD not support UEFI yet. Therefore I cannot boot the DVD in UEFI.And also, Windows 8 cannot be installed on GPT disk, yet. At that time Slackware also does not support UEFI, yet. But, it can be installed in GPT partition, good thing to know. Therefore I need a bootable USB disk to boot Slackware then create everything I need for installing Linux.

The scenario in this article:

  1. Create partition
  2. Install Windows 8 while the disk still use MBR layout.
  3. Install Slackware64 14.0 with GPT disk
  4. Finalizing, installing and configuring bootloader

Preparation

I use a companion Linux in bootable USB stick. I create a USB stick with UEFI capable. You can download it from here.

Make a partition for USB stick with FAT32 partition and boot flag enabled. You can use either gparted or gdisk (in Linux) to accomplish it.

Just extract what inside the archive to USB stick. Make sure there are two folders: EFI and Slackware64.

Step 1: Create Partition

Boot the machine from USB stick. I need to create a partition for MBR disk. In my case I create these primary partitions:

  1. boot partition, located on partition 1 with FAT32 file system, takes about 100MB.
  2. Reserved partition, used by Windows, create it for 350MB capacity.
  3. Windows partition, NTFS, I use 100GB
  4. Linux Partition, unallocated, I use 100GB

Those are the partition I need at the moment. The rest will be create at finalizing stage.

Restart and go to step 2.

Step 2: Installing Windows 8

I insert the Windows 8 installation DVD.

Installation of Windows 8 is done in normal way and install it to Windows partition (point 3).

Restart and go to step 3.

Step 3: Installing Slackware64

I need to do some preparation first. Therefore, there would be some subsections for this.

Convert MBR to GPT

Boot the USB stick.

Conversion is inherently risky. For safety, I backup the original configuration before converting the disk. The MBR itself is stored on the first sector of the disk and can be backed up with dd by:

dd if=/dev/sda of=backup.mbr bs=512 count=1

Then I run gdisk for disk on /dev/sda

gdisk /dev/sda

Follow the option menu for conversion MBR to GPT, and I done.

Prepare the Installation Environment

Mount the USB stick. I accomplish this by invoking following command:

mkdir /src  mount /dev/sdb1 /src

Invoke setup and adjust the setting like normal installation until you reach installation media stage.

Press ALT+F2 to switch to another screen (or another tty).

Install temporary system using USB stick. Invoke these commands:

cd /src/slackware64  installpkg -root /mnt [az]*/* cd

Installation

Now, back to our main setup and choose install from CD/DVD. Also, I won’t use LILO, instead I use ELILO. So I don’t install LILO.

After installation is finished, I don’t restart the machine immediately. Instead, I go to last step: Finalizing.

Step 4: Finalizing

First, make sure we are still boot the machine using USB stick, then load following command:

modprobe efivars

Also, I need to mount the boot partition

mount /dev/sda1 /mnt/boot/efi

Add Bootstrap to Slackware

I invoke following command. Note that these commands should be invoked as is, even a dot matters. If you remember, the Slackware is installed on 4th partition.

mount /dev/sda4 /mnt/root  cd /mnt/boot/efi  cp -rvf /src/EFI /mnt/boot/efi  cd /mnt/boot/efi/EFI  mv BOOT Slackware  cd Slackware  mv bootx64.efi elilo.efi  cp /mnt/root/boot/vmlinuz-huge-3.2.29 .  vi elilo.conf

And I configure the elilo.conf:

prompt  image = vmlinuz-huge-3.2.29  label = Slackware  root = /dev/sda4

And register boot so that machine can boot Slackware.

cd /mnt  usr/bin/efibootmgr -c -L "XathryaSlackBoot" -l "\\EFI\\Slackware\\elilo.efi"

Add Bootstrap to Windows

Eject the Slackware installation disc and insert Windows 8 installation disc. I need to copy all files needed to boot EFI from Windows 8 disc.

cd /mnt/boot/efi  mkdir /mnt/disc  mount /dev/sd1 /mnt/disc  cp -R /mnt/disc/efi/microsoft /mnt/boot/efi

That will copy “microsoft” folder and whole of it’s content to /mnt/boot/efi (which is my mounted efi boot partition).

Now, to create a bootstrap we first need to restart the machine and boot with Windows 8 installation DVD. What we will do is repair the Windows 8 EFI bootloader.

I do normal installation sequence method until I was prompted with list of volumes / partitions. Now press [Shift] + F10. A new command prompt appear.

Now invoke following command, which will bring me to diskpart (disk partition) program:

diskpart

My disk is only one, so I will use disk 0.

sel disk 0

Because the EFI partition is the very first partition (/dev/sda1), it should be registered as earlier volume. However, it doesn’t have drive letter, so I will give it one.

diskpart

sel vol 1  assign letter b:

The attempt is successful and I’m prompted by a message which tell me that the volume has been assign to letter B. Now leave the diskpart with exit command. Go to the EFI partition and add the EFI bootstrap.

cd /d b:\EFI\Microsoft\Boot\  bootrec /fixboot  ren BCD BCD.bak  bcdboot C:\Windows /l en-us /s B: /f ALL

bootrec (boot recover) will fix the UEFI bootloader.

bcdboot will be used to recreate BCD store. The C:\Windows is path where Windows is installed and B: is drive of my EFI partition. The “/f ALL” parameter updates the BIOS settings including UEFI firmware/NVRAM while /l en-us is to localize for US locale (US English).

Add More Partitions

I need more partitions so I create them. I use gdisk for this.

Sabtu, 09 November 2013

Xathrya Sabertooth

Xathrya Sabertooth


Introduction to Microsoft SharePoint

Posted: 08 Nov 2013 08:00 PM PST

Microsoft SharePoint is a portal-based platform for collaboratively creating, managing, and sharing documents and Web services. SharePoint (SharePoint Server, in this case) enables users to create “SharePoint Portals” that include shared workspaces, applications, blogs, wikis, and other documents accessible through a Web browsers.

MOSS is used by many enterprises as a content management system (CMS). Partially as a result of the tight integration with Microsoft productivity applications included in Office, such as Word, many administrators have found SharePoint useful in organizing and aggregating an enterprise’s data into Web-based portal with defined taxonomies that structure the information.

The Idea

Before SharePoint, to build a site for business process, a System Administrator is required for preparing site, implementation, make content, and fill the content. However, there is big chance that System Administrator know what business need. Even if he know, there are many complicated tasks from design to implementation.

Microsoft SharePoint make the process easier and can be done by providing a platform which integrate all the needs. SharePoint also provide standard template.

SharePoint itself is not a software which we can used for every needs. As said before, SharePoint is a platform or framework. It is providing us with rich materials, but as every platform or framework does SharePoint only provide tools. Programmer needs to build application needed by business. In other word, customizations and even programming on top of it.

SharePoint Products

As now (November 9th, 2013) the latest version of SharePoint is Microsoft SharePoint 2013. However, when we say SharePoint, it can refer to one or more Microsoft SharePoint products or technologies, yet the term SharePoint itself is a family of technology brand.

According to Microsoft, there are some available technologies:

  1. SharePoint Online – Cloud-based service hosted by Microsoft for company or businesses.
  2. SharePoint Foundation – The underlying technology for all SharePoint sites. SharePoint Foundation is available for free on premises deployment—in previous versions it was called Windows SharePoint Services.
  3. SharePoint Server – A SharePoint version purchased for installed on dedicated server.
  4. SharePoint Designer – Free program for designing, building, and customizing web sites running on SharePoint Foundation and SharePoint Server.
  5. SharePoint Workspace – Desktop program for take SharePoint site content offline and collaborate on the content with others while disconnected from the network. The changes will then be synchronized back to the SharePoint site. However in SharePoint 2013, this is replaced with SkyDrive Pro folder sync.

In this article, we will talk about the technology in general. If we refer to some term, it might turn that we are using SharePoint server which is installed on dedicated server.

A Farm

A farm, in this case SharePoint Farm, is a collection of SharePoint servers or SQL servers that work in concert to provide a set of basic SharePoint services that support a single site. In this context, SQL server used is Microsoft SQL Server, of course.

A farm is installed on Microsoft Windows Server. As for SharePoint 2013, the prerequisite is Windows Server 2012 or Windows Server 2008 R2 SP 1.

There are many scenario for creating a farm. All farm component can be put on a single physical machine. Note that all the component are just services / roles. The other scenarios are put components on separated dedicated physical machine.

Container: Lists, Libraries

A container is a standard component for storing information. We divide the term information into two categories: data and document. In the backend, all of those information will be stored on SQL Server, but using different implementation.

Example of data: customer (name, member id, address, etc), product, etc.

Example of document: any document file in any format (ex: pdf, doc, xls, etc).

As we have two distinct information format, we use two different container for them. The data will be stored on List, and document will be stored in libraries.

Selasa, 05 November 2013

Xathrya Sabertooth

Xathrya Sabertooth


Finding Backdoor in a Hacked WordPress Website

Posted: 04 Nov 2013 07:01 PM PST

Every website is vulnerable to malware, trojan, and also viruses until it is safeguarded using the various technologies available. WordPress is no exception. Malicious code can be embedded inside pre-existing file or create a new file and put them on our server to get their ulterior motive fulfilled.

The reasons for such security issues can be many, ranging from a flawed plugin to an outdated version of WordPress. If WordPress is our CMS (Content Management System), then ensuring good health and safe from malicious hackers is our job.

In this article, we will discuss about how to detect whether there is a backdoor in our server. The term spoken here is as generic as possible so we won’t cover specific WordPress version.

Backdoor Definition

A backdoor is program or script or any executable file, which is used to bypass normal authentication and gaining the ability to remotely access the server while remaining undetected. This backdoor allows hackers to regain access even after we find and remove the exploited plugin. Backdoors often survive the upgrades, so our site is vulnerable until we clean this mess.

Some backdoors simply allow users to create hidden admin username. Whereas the more complex backdoors can allow the hacker to execute any PHP code sent from the browser. Others have a full fledged UI that allows them to send emails as your server, execute SQL queries, and everything else they want to do.

In all the cases, the backdoor was disguised to look like a legitimate WordPress file.

The Locations

Where is backdoor hidden?

The easiest way to locate a backdoor infection is to look for files in WordPress installation that should not really be there: the ones named php3.php or crucial-wp.php! However, sometimes backdoors may conceal themselves within an otherwise legitimate file. You can figure out by taking a look at your files, though often, encrypted/encoded backdoors are not the easiest to detect.

Mostly, backdoor are stored in the following location, so they are potential for checking:

  1. Themes – Most likely it is not in the current theme. Hackers want the code to survive core updates. So if we have the old theme sitting in themes directory, or another inactive theme, then the codes will probably be in there. This is why we recommend deleting all the inactive themes.
  2. Plugins – Plugins are a great place for the hacker to hide the code for three reasons. One because people don't really look at them. Two because people don't like to upgrade their plugins, so they survive the upgrades. Three, there are some poorly coded plugins which probably have their own vulnerabilities to begin with.
  3. Uploads Directory – For some bloggers, they never ever check uploads directory (are you one of them?). You just upload the image, and use it in your post. You probably have thousands of images in the uploads folder divided by year and month. It is very easy for the hacker to upload a backdoor in the uploads folder because it will hide among thousands of media files. Plus you don't check it regularly. Most folks don't have a monitoring plugin like Sucuri. Lastly, the uploads directory is writable, so it can work the way it is supposed to. This makes it a great target. A lot of backdoors we find are in there.
  4. wp-config.php – This is also one of the highly targeted files by the hackers. It is also one of the first places most folks are told to look.
  5. Includes Folder – /wp-includes/ folder is another place that we find backdoors. Some hackers will always leave more than one backdoor file. Once they upload one, they will add another backup to ensure their access. Includes folder is another one where most people don't bother looking.

In all the cases we found, the backdoor was disguised to look like a WordPress file.

For example: in one site we cleaned up, the backdoor was in wp-includes folder, and it was called wp-user.php (this doesn't exist in the normal install). There is user.php, but no wp-user.php in the /wp-includes/ folder. In another instance, we found a php file named hello.php in the uploads folder. It was disguised as the Hello Dolly plugin. But why the heck is in the uploads folder?

It can also use names like wp-content.old.tmp, data.php, php5.php, or something of that sort. It doesn't have to end with PHP just because it has PHP code in it. It can also be a .zip file. In most cases, these files are encoded with base64 code that usually perform all sort operations (i.e add spam links, add additional pages, redirect the main site to spammy pages, etc).

Now you are probably thinking that WordPress is insecure because it allows for backdoors. You are DEAD WRONG. The current version of WordPress has no known vulnerabilities. Backdoors are not the first step of the hack. It is usually the second step. Often hackers find an exploit in a third-party plugin or script which then gives them access to upload the backdoor. It can be all sort of things though. For example, a poorly coded plugin can allow user privilege escalation. If your site had open registrations, the hacker can just register for free. Exploit the one feature to gain more privileges (which then allows them to upload the files). In other cases, it could very well be that your credentials were compromised. It could also be that you were using a bad hosting provider.

Find and Clean Backdoor

If you suspect there is a backdoor in your WordPress, then it’s time to find and clean it (if found). Cleaning is as easy as deleting the file or code. However the difficult part is finding it.

Using plugins

There are lot of WordPress plugin for malware scanner can be used for this purpose: Theme Authenticity Checker (TAC), Exploit Scanner, Sucuri.

Theme Authenticity Checker is a free plugin that scans all of your WordPress theme files for potentially malicious or unwanted code. Often hackers target themes to inject links, so this plugin is a good way of checking for that.

Exploit Scanner is another free WordPress plugin that is much more robust than the Theme Authenticity Checker because it search all files and database of your WordPress install. It checks for signs that may indicate if your installation has fallen victim to malicious hackers.

But remember, base64 and eval codes are also used in plugins. So sometimes it will return a lot of false positives. You have to know what you are doing to see if the error is really malicious or if it is ok. If you are not the developer of the plugins, then it is really hard for you to know which code is out of its place in the thousands of lines of code.

Sucuri is by far the BEST WordPress security scanner out there. They have a very basic free site scanner, which checks your site to see if your site is doing ok. But the real value is in their paid version. In short, once you install Sucuri, it automatically monitors your website 24×7 against all threats. It audits all the activities that happen on your site to keep track of where things went wrong. If something looks fishy, Sucuri blocks the IP. They also send you alerts if they notice something going on with your site. Last but not least, they offer a malware cleanup service which is included in the price of their service (no matter how big or small your site is).

Also, this service is not just for beginners. Major publications like CNN, USAToday, PC World, TechCrunch, TheNextWeb, and others are recommending these guys.

Search the Uploads Directory

One of the scanner plugins will find a rogue file in the uploads folder. We can, actually, do it manually. If you are familiar with SSH, we can do some commands to search it. Assuming our server is UNIX (and its derivation):

find uploads -name "*.php" -print

There is no good reason for a .php file to be in your uploads folder. The folder is designed for media files in most cases. If there is a .php file that is in there, it needs to go.

Delete Inactive Themes

As mentioned above, often the inactive themes are targeted. The best thing to do is delete them (yup this includes the default and classic theme). But wait, we didn't check to see if the backdoor was in there. If it was, then it is gone now. You just saved your time from looking, and you eliminated an extra point of attack.

.htaccess File

Sometimes the redirect codes are being added there. Just delete the file, and it will recreate itself. If it doesn't, go to your WordPress admin panel. Settings » Permalinks. Click the save button there. It will recreate the .htaccess file.

wp-config.php File

Compare this file with the default wp-config-sample.php file. If you see something that is out of place, then get rid of it.

Database Scan for Exploits and SPAM

A smart hacker will never have just one safe spot. They create numerous ones. Targeting a database full of data is a very easy trick. They can store their bad PHP functions, new administrative accounts, SPAM links, etc in the database. Yup, sometimes you won't see the admin user in your user's page. You will see that there are 3 users, and you can only see 2. Chances are you are hacked.

If you don't know what you are doing with SQL, then you probably want to let one of these scanners do the work for you. Exploit Scanner plugin or Sucuri (paid version) both takes care of that.

Prevention

Prevention or removal of backdoors is easier than detection. You can minimize the chances of backdoor attacks by limiting access to your website's core files. Keep strong backups and start using a monitoring services.

Here are the recommended things to do:

  1. Use strong password – Force strong passwords on your users. Start using a password managing utility like 1Password.
  2. 2-Step authentication– If your password got compromised, the user would still need to have the verification code from your phone.
  3. Limit Login Attempts – This plugin allows you to lock the user out after X numbers of failed login attempts.
  4. Disable Theme and Plugin Editors – This prevents user escalation issues. Even if the user's privileges were escalated, they couldn't modify your theme or plugins using the WP-Admin.
  5. Password Protect WP-Admin – You can password protect the entire directory.
  6. Disable PHP Execution in Certain WordPress Directories – This disables PHP execution in the upload directories and other directories of your choice. Basically so even if someone was able to upload the file in your uploads folder, they wouldn't be able to execute it.
  7. Stay UPDATED – Run the latest version of WordPress, and upgrade your plugins.