Kurinchi Blogger Scribbles …


Archive for the ‘Linux Server’ Category

Aug 15
2009

Permission denied: exec of failed in Apache Server

Last updated: August 11th, 2009

Apache Permission Denied Error can be caused due to one of many configuration mistakes listed below

Check the apache configuration settings

i) The first is the reference to folder where cgi or perl files will reside and its execute permission settings

 <ScriptAlias /cgi-bin/ /usr/local/cgi-bin/>
 <Directory "/usr/local/cgi-bin">
     AllowOverride None
     Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
     Order allow,deny
     Allow from all
 </Directory>

ii) The second is the proper add handlers that are set for the file execution

AddHandler cgi-script .cgi .pl
<Files ~ "\.pl$">
    Options +ExecCGI
</Files>
<Files ~ "\.cgi$">
   Options +ExecCGI
</Files>

Check the apache error log for any messages (/var/log/apache2/error.log).

Aug 10
2009

Configuring postfix to send mail via satellite system

Last updated: August 6th, 2009

Step 1: $ sudo apt-get install postfix

Postfix configuration screen throws you with the following options to choose from
i) No changes (no changes to configuration settings)
ii) Internet site (Mail sent and received using SMTP)
iii) Internet with smarthost (Mail sent to another machine called smarthost)
iV) Satellite system (All mail sent to another machine for delivery)
v) Local only (No network based mail system. Only applied to this local machine)
(more…)

Jul 27
2009

PHP Security: Preventing Session Fixation

Last updated: August 1st, 2009

Session Fixation is method by which an intruder creates a session id which gets carried on when a user comes with that path and continues his/her activity on a website.

For e.g. an intruder may create a link to a site called samplesite.com as <a href=”http://samplesite.com/cart.php?PHPSESSID=Ax23mDud” />Sample Site<a>

When a user clicks on this link the session id gets carried on to the site ‘samplesite.com‘. The intruder waits for the user starts to perform a transaction on the site and will take over vital details by intruding user’s activity on samplesite.com.
(more…)

Jul 26
2009

Linux: How to change the default Run Level?

Last updated: July 22nd, 2009

To list the current run level
$ who -r
run-level 5 2008-07-22 21:35 last=5

To change the default Run level edit /etc/inittab

You can also switch to another run level number by issuing
$ init

For example,
$ init 3

Now the system switches from Run level 5 to Run level 3

To list the current run level
$ who -r
run-level 3 2008-07-22 22:35 last=5

In the above result notice the last part which states “last=5″. This indicates that the last run level was 5

When the system is running and if we want to apply patches or alter certain configurations, the above command comes in handy.

The other option to change the current level is
$ telinit <run level number>

Jul 25
2009

Linux: How to find the current Run Level?

Last updated: July 25th, 2009

Default init level is set in /etc/inittab.

$ cat /etc/inittab (to display the init levels)

Inside that file, you can note a line which will state the run level number like
id:5:initdefault: (indicating run level 5 which means that the system is running with x windows)

To find the current run level you can execute the following commands

$ who -r
run-level 5 2008-07-22 21:35 last=5
which indicates that the system is in run-level 5

Other option to find the run level is
$ /sbin/runlevel
N 5

To find out what sub processes are associated with each run level you can go to
$ cd /etc/rcN.d/ (Where N denotes the run level number)

For example
$ cd /etc/rc1.d/
$ ls -l

This will list symbolic links to various processes associated with run level 1.

Jul 24
2009

Ubuntu Release Download checksum

Last updated: July 24th, 2009

A quick note on the links related where to find the ubuntu releases and how to do a checksum to ensure that the downloaded copy

If you are downloading Ubuntu from the official site, MD5/SHA1 checksum (ubuntu hashes) for latest releases may not be listed there.

If it is not there, you can visit the site http://releases.ubuntu.com/. This site lists a comprehensive list of ubuntu releases and their checksums. Checksums ensure that the download is complete without corruption and is 100% accurate. So, it is always advisable to do a checksum after each download.
(more…)

Jul 23
2009

Linux: How many Run Levels are there and what are they?

Last updated: July 22nd, 2009

Linux systems have 7 Run Levels and they are as follows.

0 – system halt
1 – single user mode (system maintenance mode)
2 – multiuser mode without network access
3 – full multiuser mode with network access
4 – not used
5 – multiuser mode with X windows
6 – reboot or restart

Each run level in linux has a very specific purpose.

Run level 1 is also known as system maintenance mode and at this level the system prompt appears without root level password. It should be used only when it is absolutely necessary for system maintenance.

Run level 4 is not used and it can be used by the user to customize his own level.

Note: Solaris Run Level is different from Linux run levels.

Jul 22
2009

Linux: What is Run Level?

Last updated: July 22nd, 2009

Run Level is a term to indicate your computer’s state of operation. When your computer starts it initially starts the the first process called the init process. Init process in turn starts associated sub-processes for that state of operation.

Run Level is the state of the machine – indicating the processes and sub-processes that needs to be started in order for the Operating System to be in that state.

Jul 20
2009

What is Kerberos Authentication System?

Last updated: July 24th, 2009

Kerberos Authentication is a means by which a communicating entity on a non-secure network can prove itself to another entity about its identity in a secured way.

In a system developed for a client-server model, it is inconceivable to identify the threat posed by the network users and the intruders.

Primary goal of Kerberos Authentication System is to prevent free text based transmission of passwords over the network.

Kerberos was created by MIT with a license similar to BSD and the current version is Version 5. It is implemented across various OS – Linux, Unix, Windows, MacOS.

Kerberos system is built on a symmetric key algorithm.
(more…)

Jul 17
2009

Apache: How to save configuration settings without disconnecting users from web server?

Last updated: July 15th, 2009

There are times when you would like to do some changes in your web server configuration file which might necessitate the server to be restarted in order for the changes to take effect.

Issuing a apache restart command will forcefully close all the connections made to the web server which will end any user related activity on the server.

If you would want to avoid such scenarios then issue the following command

$ sudo /etc/init.d/apache2 graceful (in ubuntu)


Valid HTML 4.01 Strict  Valid HTML 4.01 Strict