Sunday 18 December 2011

How to install ntop on RedhatLinux/Centos

ntop is a network and traffic analyzer that provides a wealth of information on various networking hosts and protocols. ntop is primarily accessed via a built-in web interface.
Following instructions are tested on 32/64 bit versions only:
a) RHEL Linux 5.x
b) CentOS Linux 5.x

Disk Quotas In GNU/Linux Explained


Have you ever encountered a situation where your children who are using your PC are hoarding music and video on the harddisk and filling up all the space ? In linux, there is a way for you to prohibit others from hogging all the disk space. This you do by using quotas. Here I will explain how to setup disk quotas in Linux.

Saturday 17 December 2011

More Deep Discovery on your Linux Server With /proc

/proc isn't just for getting information out of the system and into convenient text form. You can also use it to put information into the system, and thereby change it. The sys/ directory, which is where kernel variable information is kept, is where most of the things you might want to alter live. Changes made here will take effect immediately; no need to reboot



Deep System Discovery on your Linux Server With /proc

Live Processes
/proc is a virtual filesystem generated at boot and updated regularly by the kernel. With /proc you can investigate exactly what hardware your Linux kernel sees, what processes it is running, boot options, and also manipulate kernel events.

Easy Redirection of sudo Output

If you're using Sudo, you've probably already discovered that the increased privileges apply only to the first command typed and don't extend to any input or output redirection. For example:


sudo iptables -L > /etc/iptables


Testing Linux Mail Servers with OpenSSL


Testing POP3 TLS/SSL

Telnet does not support any encryption. If you are protecting your POP3 sessions with TLS/SSL then you need s_client, which is part of OpenSSL. You can query both local and remote mail servers, using your own server names of course. Commands that you type are in bold:
openssl s_client -connect localhost.com:995
openssl s_client -connect remotehost.com:995
You'll see a whole lot of lines about certificates and protocols, and eventually something like this:

Troubleshooting Linux Servers with telnet

Telnet is one of the older ways of doing business over a network: a network protocol running over TCP/IP, which allows a client to talk to a server remotely. Back in the day (such as when I first got online), telnet was the usual means to connect to a remote computer to get a console, and from there do server administration, check email, 

Charting and Graphing Logfiles for Linux Server Admins

Some Linux server admins are comfortable with wading through text logfiles, but why wade when you can create beautiful charts and graphs that highlight trouble spots? Try the excellent CairoPlot for beautiful, informative visual server log.



Increasing Limit of The Maximum Number Of Open Files in Linux

The ulimit command provides control over the resources available to the shell and/or to processes started by it, on systems that allow such control. The maximum number of open file descriptors displayed with following command (login as the root user).

ulimit and sysctl

The ulimit and sysctl programs allow to limit system-wide resource use. This can help a lot in system administration, e.g. when a user starts too many processes and therefore makes the system unresponsive for other users.

SUID,STICKY and CHATTR in linux


SUID, STICKY and CHATTR
( Advanced permissions )


Which Linux filesystem to choose for your PC?


If you’re a Linux user, you’ve likely been asked at some point if you want Ext3, Ext4, XFS, ReiserFS, Btrfs, or one of many other filesystem acronyms. This choice confuses new and old users alike, and like all software, the options change as technology improves. Many people probably don’t care what filesystem

Friday 9 December 2011

PHP Security Best Practices For System Admins

 PHP is an open-source server-side scripting language and it is a widely used. The Apache web server provides access to files and content via the HTTP OR HTTPS protocol. A misconfigured server-side scripting language can create all sorts of problems. So, PHP should be used with caution. Here are twenty-five php security best practices for sysadmins for configuring PHP securely.



Apache Configuration File Explanation


Apache is controlled by a series of configuration files: httpd.conf, access.conf. and srm.conf (there's actually also a mime.types file, but you have to deal with that only when you're adding or removing MIME types from your server, which shouldn't be too often). The files contain instructions, called directives, that tell Apache how to run. Several companies offer GUI-basedApache front-ends, but it's easier to edit the configuration files by hand.

.htaccess file explanation

The Apache Web server provides a feature called .htaccess file, which provides commands to control a website. This file is simply a text file containing Apache directives. Those directives apply to the documents in the directory where the file is located, and to all subdirectories under it as well. Other .htaccess files in subdirectories may change or nullify the effects of those in parent directories.

Apache .htaccess file configuration in Linux example

 This tutorial is designed to provide password protection of web directories on a UNIX/Linux server. If you have a directory that you do not want the general public to have access to, this simple procedure will produce a username and password prompt anytime someone tries to access the directory.

Apache .htaccess file configuration in Linux

. There are many ways you can password protect directories under Apache web server. This is important to keep your file privates from both unauthorized users and search engines (when you do not want to get your data indexed). Here you will see the basics of password protecting a directory on your server. You can use any one of the following method:

PuTTY Connection Manager

PuTTY Connection Manager was mentioned in the 12 PuTTY add-ons that we discussed a while back. One of the major missing features in PuTTY is the ability to display multiple sessions in Tabs.

PuTTY CM displays multiple PuTTY sessions in Tabs. In this article, let us review in detail the 5 powerful features of the PuTTY Connection Manager that will make PuTTY more enjoyable.

Turbocharge PuTTY with 12 Powerful Add-Ons


PuTTY is hands-down the best, free, and lightweight SSH client for Windows. I have provided list of 12 powerful PuTTY add-ons with screenshots, that will solve few shortcomings of the original PuTTY.  Play around with these add-ons and choose the one that suites your need.

Usage of awk command in Linux

Awk Introduction and Printing Operations
Awk is a programming language which allows easy manipulation of structured data and the generation of formatted reports. Awk stands for the names of its authors “Aho, Weinberger, and Kernighan”

How to Kill a Process in Linux

Kill process using kill command under Linux/UNIX


kill command works under both Linux and UNIX/BSD like operating systems.

ps command examples


ps command (process status) will display snapshot information of all active processes.
Syntax: ps [options]

Usage of the 'ps' Command in linux

Process is a running instance of a program. Linux is a multitasking operating system, which means that more than one process can be active at once. Use ps command to find out what processes are running on your system.
This article explains 7 practical usages of ps command and its options.

Thursday 8 December 2011

Linux: Delete / Remove User Account


You need to use the userdel command to delete a user account and related files from user account. The userdel command must be run as root user. The syntax is as follows:
 
userdel userName

Linux Add User To Group


useradd Example - Add A New User To Secondary Group

You need to the useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. The syntax is as follows:

Create Users in Linux / Unix

let us review how to create Linux users in 4 different methods using useradd, adduser and newusers command with practical examples.


Linux Create User Account

 To create a new user account under any Linux distribution use command called useradd. The system administrator is responsible for creating account. Login as root user (or use sudo command).

Linux Basics

Every user who has access to a Linux system needs a login and a password. Each user must belong to a primary group and for security or access purposes can belong to several secondary groups.
In order to create new logins, modify or delete users, you must already be logged in as root.