Posts Tagged ‘featured’

How To Password Protect Directory Access Via Apache (HTTP)

I ran into a problem today, my team member asked me to password protect a directory in such a way that when someone access it via Web URL, it should first ask for password. Once user is validated then it should lead him/her to the actual web page.

Guess what is the most easy way to do it, I followed the following method and it worked perfectly. Since Apache is the web server and usually it is handling hundreds of websites on a single server so it is not a wise way to make changes in its configuration file often. We will achieve it via .htaccess.

Now go into the directory in which you wish to apply this restriction and create a .htaccess file (off-course if this does not exist already) and add the following lines with necessary modifications ( The only modification will be that you will need to change the path of the root directory of your applicaton).

AuthType Basic

AuthName “Admin”

AuthUserFile “/var/www/html/MYAPP/passwd”

require valid-user

Now create a file with name passwd at /var/www/html/MYAPP/ path and add the username and password in the following formate:

admin:K1/BaQTbqe0Eo

where admin is the username and the encrypted value after: is the password.

Restart apache service and you will be seeing the login prompt appearing on application launch.

Linux CD Ripping Utilities

CD Ripping with Linux doesn’t have to be the labor intensive task that it once was. No longer do we have the days of writing a hundred character command to rip a CD with the perfect options. Here are some utilities aimed at making your life of ripping your collection of CD’s to a digital format you can actually use.

Read Original Here…

» Read more

Create VPN In Linux Using PPTP (PoPToP)

VPN (Vitual Private Network)  is very much in the market now. VPN is fix to many problems with respect to network and many IT professionals are using it to overcome various issues. Lets see how we can create our own VPN in Linux using PoPTop (pptp) Protocol.

PoPTop is a utility which creates VPN. Simply run the following command to install poptop (pptp) on Linux based system:

yum install pptp

Once the installation is over, you will find its configuration files located in the /etc directory. There are four configurations which we need to take care in order to work with pptp. Here are they:

  • /etc/modules.conf
  • /etc/pptp.conf
  • /etc/ppp/options.pptp
  • /etc/ppp/chap-secrets

Lets see what each file contains and what settings are required in these configuration files.

/etc/pptp.conf

It contains the default configurations of the pptp, like the executable name ctc. The default settings of this file work and no change is required except any exceptional situation.

/etc/modules.conf

It contains the list of the installed modules w.r.t to poptop. So the default configurations of this file should be kept untouched.

/etc/ppp/chap-secrets

This is the one file which should be changed, here you actually create the users for accessing this VPN. Here you specify the username and password and then these username and password can be used to connect to this VPN. Here is my chap-secrets file. I have created one user with name aun and raza12 and here are contents of my chap-secrets file:

» Read more

LogRotate – A Great Built-In Linux Utility To Handle Large Log Files

Logrotate is the linux’s utility which lets you rotate or remove the large log file. If you monitor log files of mailserver or system logs then you might have noticed that after some particular time, old log file is renamed and compressed to something like .old etc. This is because most of the server level logs are configured to be compressed via logrotate utility.

» Read more

How To Find Working Directory Of Some Process In Linux

While monitoring your Linux server, you found that any particular process is causing load, what you will do? Kill the process to get rid of it.. Good but it is always better to identify the root cause of problem. Find out from which directory this process is running.

» Read more

Reset The Forgotten MySQL Password

If you already know the mysql password, then it is not a big deal to set a new password. Simply run the following commands in sequence and these will change your mysql password.

» Read more

Network Penetration Testing With Nmap

Network security is vital now-a-days and you can only ensure the secure network if you are able to identify any security holes. Now, think like a hacker and try to hack your own network, this technique is called penetration testing. Go no where, just try Nmap(Network Mapper). It is one of the best and most commonly used for network troubleshooting and scanning. Start checking from Ping and go to more advanced techniques to check that which hosts are up on the network and which ports are open. Nmap is a powerful, portable, user-friendly and very rich tool which lets you take full control of your network activities.

» Read more