Linux Servers

Fixing su: cannot set user id: Resources temporarily unavailable in Linux VPS

Last night when i login into my VPS, i found a weird issue in my VPS.
When i type a su command below it shows :

#su -
su: cannot set user id: Resource temporarily unavailable

After searching and googling few minutes, i found a quick resolution to fixing this issue.
This is all about VPS limit.

Edit limit.conf below or change if needed.

#vi /etc/security/limit.conf
#### add/change on these line below:
*    soft    nproc    2047

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 :
user : new
pass : newpassword123

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 Show Shared Directory from NFS Server Linux

First, we need to know what is NFS ?
NFS is a network file system something like a distributed file system protocol that allowing user on a client computer to access files over network.

For Example : we have few NFS server here and we want to know
how to see all exported file system from unix server using a command line linux

We can using showmount command to see the mount information from NFS server.

Example we have a NFS server named : media10 and the ip address :

How To Detect Rootkits in Your Linux Server

First, we need to know what is rootkits.
Rootkits is a program to control your unix terminals usually root access,
in Windows usually Administrator access without any authorization from the server owner.

So to securing your linux server 
We can using some software : Zeppoo , Chkrootkit or rkhunter

Zeppoo Software

Zeppo will detect rootkits on i386 and x86_64 architecture in linux using /dev/kmem and /dev/mem
this software also able to detect a hidden task, system call etc..

Cpanel SSL Problem Error Code : ssl_error_rx_record_too_long

I found this problem when i have install SSL Certificate via Cpanel WHM.
I belived my SSL already installed in the Cpanel properly.
but when i trying to accessing my web ex :

Mozilla show me something like below :

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

How to Run a CGI Scripts Using Fcgiwrap with Nginx in OpenSUSE 11.x

Why we need Fcgiwrap to work with Nginx ?
Because Nginx it self doesn't serve CGI / CGI scripts.

There are few ways to make Nginx to be able to open any CGI / PERL scripts.
we can using Thttpd and Fcgiwrap.

First, we need to know Fcgiwrap is a CGI wrapper that able to use for shared hosting
this is because Fcgiwrap allow each vhost to use it's own cgi-bin directory.

We also can't found fcgiwrap packages in OpenSUSE Repositories, so we will install it manually.

How To Setup PureFTPd With ClamAV Scanning in CentOS 6.x

This is a simple tutorial / how to setup your PureFTPd daemon to working with ClamAV Scanner.
So When you uploaded a files to your FTP server, ClamAV will automatically checking your files.
If your files contain an infected / malware ClamAV will delete it.

Preparing to Install PureFTPd

Login as root
#yum install pure-ftpd

Preparing to Install ClamAV

Next, We will install ClamAV
FYI, ClamAV is not available in the CentOS official repositories.
But We can enable it with the EPEL repository

Facebook Fans