Ubuntu

Steps To Fixing Linux Crash Filesystem After Power Outage.

Sometime if we didn't properly shutdown a server that running linux, it will cause a crash for the filesystem.
We need a tool that able to repair it immediately, the tool is FSCK or file system consistency check.

Below is the fsck command :


Usage: fsck [-sACVRTNP] [-t fs-optlist] [filesystem] [fs-specific-options]

Example :

I have a drive /home or /dev/sda3
Then the next step is we need a root access to run the command.

How To FSCK Your Linux LVM Partition

Yesterday i have a problem when my computer can't booting up.
After checking more detail i found that i need to FSCK my partition.

The problem is my linux partition using LVM
Then after googling it for a while

I Found a simple steps to fsck Linux LVM Partition.

First We need to have a linux livecd / rescue cd
Then after reboot it into the livecd and we can see a linux prompt

Then type few lines below to fixed it.
$vgchange --ignorelockingfailure -ay
$lvscan --ignorelockingfailure
$fsck -y /dev/VolumeGroup/LVname

How To Moving All Websites Content Using Wget


Last Week i want to moving a large sites from one server to a new server.
There is a few method to moving all websites content to a brand new server,
First we can using RSYNC, FTP and WGET

In this tutorial i want to using WGET that will moved all sites content in a single line using FTP protocol

We need to prepare a FTP Login from an Old Server that currently host the websites
example :
ip new server :10.10.10.10
user : new
pass : newpassword123

How To Install Apache 2.x To Work With GnuTLS

There is another way to using ssl with apache 2.x
The common solution is using OpenSSL with Apache 2.x

But right now i trying to get Apache 2.x to work with mod_gnutls

FYI, GnuTLS support TLS 1.2 and TLS 1.1 that also supported by OpenSSL
But GnuTLS will not supported SSL 2.0

We need to prepare anything related to GnuTLS to work with Apache 2.x
First we need to install those packages below :

Login as Root

1. GnuMP


#mkdir /root/temp
#cd /root/temp

How To Solved Mysqldump: Got error: 1016: Can't Open file when using LOCK Tables

Today, i trying to dump my database but when the dump process begin,
MySQL shows error like below :

Example :

root@rainforest# mysqldump -u root -p mypassword --opt sampledb > backupdb.sql
mysqldump: Got error: 1016: Can't open file: './sampledb/xxx.frm' (errno: 24) when using LOCK TABLES
root@rainforest#

So after googling a way to dump it without any hassle

root@rainforest# mysqldump -u root -p mypassword --opt sampledb --lock-tables=fales > backupdb.sql

From the command above, i can dump my backupdb without any problem

How To Force User To Change Password in First Login


Here come to my attention when i want to automatically have my new linux/unix users to change the password when they login into the server.

Login into your server with root access

type chage command :
#chage -d 0 <username>

example i have a username : sentono

#chage -d 0 sentono

-d mean : we will force user to change password when they login into the server for the first time

How To Find a Hidden Process and Port in Linux and Unix Operating System


There are so many tools that able to check the hidden process and port, the tools are rootkits/lkms/unhide etc.
In this tutorial i will discuss something more simple to use and the tools is UNHIDE.

Unhide is a tool to find hidden processes and TCP/UDP ports by rootkits / LKMs or by another hidden technique. This tools works under both Linux / Unix, and MS-Windows operating systems.

It detects hidden processes using three techniques:

The proc technique consists of comparing /proc with the output of /bin/ps.
The sys technique consists of comparing information gathered from /bin/ps with information gathered from system calls.
The brute technique consists of bruteforcing the all process IDs. This technique is only available on Linux 2.6 kernels.

Automation Using Linux Crontab to Schedule Task


If you want to run some processes like backup , generate image thumbnail etc.. in the background.
The is an easy way to do this, we can using Crontab to handle this task so it will automatically do the job in your schedule task.

What is Crontab ?

Crontab is found in unix and unix-like O/S, cron derives from chronos greek time and it used to schedule command or execute it periodically.


How to Verify Crontab Running in The System ?

Login into your server and type this command below :

#crontab -l

How To Unlocked Brute Force System Cpanel

How To Unlocked Brute Force System Cpanel

Today i just updated my cpanel server to the latest version but the strange thing is i misstyped my email password account few times and this will automatically detected as brute force in cpanel system that handle by cphulkd.

If i trying to login into the WHM / Cpanel it will show like below :

How To Remove USB Pen Device MBR

How To Remove USB Pen Device MBR

What is MBR ?

MBR is master boot recorded.

The question is how can we remove the MBR for USB device?
in DOS environtment we can just simply type fdisk/mbr command
but this is different, in LINUX/ UNIX please follow this step below :

Login into your server and type command below

[code]$dd if=/dev/zero of=/dev/sdc bs=512 count=1[/code]

YOu will see the output like below

1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00308483 s, 166 kB/s

Facebook Fans