In order to download the source code of an existing package, first install the prerequisites:

sudo apt-get install build-essential debhelper

To get the source code of a package, run the following command:

apt-get source {name_of_package_interested_in}

Make changes to the source using an editor like geany or via terminal through nano. Edit the changelog file and add a record of your changes to build a new revision number. After you have made the changes, run the following commands to build the package which should include your changes.

dpkg-source --commit
dpkg-buildpackage -b

The updated package has been built. To install the package, simply use the below commands:

If grub fails to install on your RAID array in any version of Ubuntu, do NOT disable your BIOS RAID! The correct solution is at this blog entry. I'll summarize it below.

At the stage of the install where it is attempting to install GRUB it will detect as

/dev/mapper

This is incomplete! That's why the GRUB install fails.

You need the actual name of the RAID array to install to. So during that step, press ctrl+alt+F2 to drop to a busybox terminal, then enter

ls -l /dev/mapper

Pick out the name of your array from the list shown, then press ctrl+alt+F1 to switch back to the install (you can switch back and forth as much as you like with no problems) and enter it in the field as

/dev/mapper/{your array name}

Then GRUB installs perfectly and you're ready to go, with a proper BIOS RAID array intact.

System Won't Boot After Grub Failed to Install

If your system will no longer boot because you skipped installing or updating grub, you need to download an Ubuntu version that does support RAID, boot from the LIVE CD, drop to a terminal, and then run:

ls -l /dev/mapper
sudo grub-install /dev/mapper/{ARRAY_NAME_HERE}

Setting Up RAID Array During Ubuntu Install

If you are configuring a BIOS RAID array for the first time on Ubuntu, you should create a 1MB boot partition. Its partition type is "boot". If you do this, grub will always try to install there and will succeed every time without failing when upgrading or reinstalling grub.

Automating the installation of software via bash scripting on Linux can be difficult. However, in debian and its related distributions such as Ubuntu, you can simplify the installation of packages by using a few tools. One of these tools is called debconf-utils. If installation packages such as MySQL or PHPMyAdmin ask configuration questions, you can provide a default set of answers without being prompted. This is excellent for testing scripts or automating installation for users who may not know how to appropriately answer these questions.

Basically, with debconf-utils you can pre-answer these questions so that no prompts show up!

To install, run this command:

sudo apt-get install debconf-utils

To get a list of questions an installer might ask, first install the package on a test machine where you're writing the script normally. For example, let's install phpmyadmin:

sudo apt-get install phpmyadmin

Now, to retrieve a set of questions phpmyadmin may ask, you can run this command:

sudo debconf-get-selections | grep phpmyadmin

In your bash script, you can now pre-answer certain questions by including your preconfigured answer commands before installing the package. For example, when phpmyadmin installs, it asks for the MySQL root user password. You can skip this prompt and define what the MySQL root password should be by using this command in your script:

password defines the type and 1234 sets the password to 1234.
You can also suppress questions entirely by using the following command in front of your install command:

DEBIAN_FRONTEND=noninteractive sudo apt-get install phpmyadmin

Default configuration will be used during the installation of the phpmyadmin package, which means it may not work after being installed because some configuration options should be answered. So, use both combinations for various packages to fit your needs!

If you want your Linux installation to look like the original theme used in Windows XP, you can do that! This guide will walk you through the process of easily making any MATE or GNOME2 Desktop Environment look like the Windows XP GUI. The Luna Theme can be downloaded here and installed using our simple installation script. If you already have MATE installed or are already running GNOME2, skip to the Luna Theme install instructions.

Install MATE on Ubuntu:

Run the below commands for your matching Ubuntu version in a terminal to install MATE. To find out which version of Ubuntu you're running, use this command:

Our version of the Luna theme has been converted and ported over to GTK3, so it should work with all newer flavors of Linux running MATE while still working on older Linux installs running GNOME2.To install the Luna Theme which will make Linux look like Windows XP, run the following commands. The theme files will be downloaded and saved in your Downloads directory.

Next, Right Click on the Desktop, and choose "Change Desktop Background". Click on the "Themes" tab. Select "Luna". Click on the "Background" tab. If you want the default XP wallpaper set as your background, click on the "Add" button. Select your "Pictures" folder. Select "luna_background.jpg". Click "Open". Click on "Close" to change it.

Now, MATE or GNOME2 looks like XP! Enjoy! This theme was copied from Ylmf OS 3.0.

Posted in Guides, Ubuntu Linux | Comments Off on How to Make MATE Look Like Windows XP using the Luna Theme

Secure your Ubuntu Server from Flood and Other Attacks Using IPTables and WonderShaper

The following commands use IPTables to prevent common flooding and other miscellaneous malicious attacks. These commands can prevent a Linux server from lagging and spending resources on malformed packets. Some of these attacks can cause DDoS attacks, so it is best to use these filters and rules. Use at your own risk. A detailed explanation can be found here.

Limiting download and upload speeds globally does not make a server any more secure than before. However, it can aleviate network lag, which in my opinion ensures availability enhancing security. In Ubuntu, it's easy to limit the max download and upload speed that can be used on an interface. It wasn't always this easy, but thanks to a tool called wondershaper, you don't have to worry about any of the complexities. To install, run the following command:

sudo apt-get install wondershaper

Now, we need to tell wondershaper to start limiting our max download and upload rate on our particular interface. To see a list of interfaces, type the following command:

ifconfig

To determine what your max download and max upload speed should be, use SpeedTest to run a couple of bandwidth tests using your connection. With your results, convert the speeds from mbps to kilobits per second. Use this bandwidth calculator / converter to help you out. Then, I'd subtract 20-30% of each value, as you want to leave some room between your max speed so that bandwith will still be available to other computers / nodes on the network.

Once you have your speeds, start wondershaper (modifying the example below to fit your needs):

Make sure you change your max download and upload speed in both of the examples. Settings will now apply when the computer boots into Linux.

Exclude LAN from Speed Limits

WonderShaper does not differentiate between LAN traffic and external traffic by default. To prevent WonderShaper from limiting LAN network download and upload speeds, install this updated WonderShaper script:

Sometimes, you get stuck having to manually compile and install software, as no package is available for your Ubuntu distribution or one of the package sources has become broken. However, you should check the link below and search for the software you're looking for, as there MAY already be a pre-existing package for your version of Ubuntu. Typically, you download a software package, read the ReadMe, and are left asking, why doesn't this prerequisite package exist for installation? I've got the names right here! Unfortunately, each version of Linux can name their packages differently. As a result, there's a lot of confusion. However, say the ReadMe prompts you to install nfnetlink development packages. Great, so you try:

sudo apt-get install nfnetlink-dev

Only… the package doesn't exist. What do you do now? Rather than searching the internet, search ubuntu's packages by clicking on the below link:

Once you're on that page, scroll down to the "Search" section. Type in the name of the package you were given. In our example, it was nfnetlink and click on "Search". The first package listed is libnfnetlink-dev. This is exactly what we were looking for! So install it doing this:

sudo apt-get install libnfnetlink-dev

Repeat the process to locate the remaining missing packages.

Once all of your prerequisites have been installed, you should be able to successfully compile and install whatever software package you're trying to install.

I run my own personal dedicated server, and I choose Ubuntu to power my server. But, I don't just use any version of Ubuntu. I use Ylmf OS, a Windows XP GUI interface Ubuntu 10.04 distribution. Yes, the Chinese wrote it, but we can all trust the Chinese, right?

Why Do I Use Ylmf OS

I used to be a n00b to Linux a few years back, and I wanted something that looked like Windows XP. You should be able to tell by now that I love Windows XP and Windows XP x64 with a passion. Everything just works unlike in Windows 7 and Windows Vista.

Open Game Panel – An open source game server management panel software. Allows you and your customers the ability to start, stop, restart, and modify config files for gaming servers on the fly.

Mumble Client and Server – Great open source voice over IP client that resembles Teamspeak and has greater functionality. Install it using:

sudo apt-get install mumble-server

FreeNX – An open source remote SSH GUI login which allows you to remote desktop with encryption without having to learn those nasty ssh commands in the terminal (yes they're simple, but I like the GUI better thanks).

The following guide has been written to help you install and configure Aircrack-ng. It also includes a step by step guide which will help you crack wireless network WEP encryption. This guide should only be used for ethical purposes.

Installation:

Open a new terminal and use the following command to install aircrack-ng:

sudo apt-get install aircrack-ng

Ubuntu will now download and automatically install aircrack-ng.

Compat-Wireless Channel -1 Problem:

Newer versions of Ubuntu 10.04 and up have a problem configuring wireless monitoring devices to listen on a particular wireless channel. In fact, when attempting to create a wireless device in monitor mode, you will see that the channel is stuck on -1 [an invalid wireless channel number]. This is due to a bug in the packaged compat-wireless drivers built into the kernel of Ubuntu. The solution is to download, compile, and install the latest compat-wireless driver by using this guide:

Open a terminal, change to the peerguardian source directory, and run the configure file to generate the makefile.

./configure --sysconfdir=/etc

If you get an error stating that looks like this:

checking for ZLIB... configure: error: Package requirements (zlib) were not met:
No package 'zlib' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ZLIB_CFLAGS
and ZLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To do this, just change to the directory of the extracted zlib folder, run:

./configure
sudo make
sudo make install

Now, go back to the peerguardian source directory, and re-run ./configure

You will not receive this error anymore. Why does this happen in the first place? Installing zlib1g-dev should have been enough to satisfy this requirement, but for some reason it doesn't work sometimes and could be a bug.

Errors Post Installation:

BELOW ISSUE (BOTH Bricking your System and Resolv.conf Issue) APPEARS TO HAVE BEEN FIXED IN MAY of 2013I'm going to leave this here though in case someone needs it.

As of 3/17/13, I've noticed that installing Peerguardian Linux from the latest SourceForge source causes a number of serious problems that could brick your Linux install. You must run the following commands after "make install" is completed to avoid running into problems.

If your gksudo or sudo commands no longer work after installing because of a "Unable to copy the user's .Xauthorization file" error message, your .Xauthority file may no longer exist. To fix this issue, run the following commands: