Sunday, November 8, 2009

Reflexology

Reflexology is the physical act of applying pressure to the feet and hand with specific thumb, finger and hand techniques without the use of oil or lotion. it is based on a system of zones and reflex areas that reflect an image of the body on the feet and hands with a premise that such work effects a physical change to the body.

Sunday, October 25, 2009

Send email from UNIX | Perl script

This will show you how to send an email from unix server using a perl script.

open (MsgFILE, "> $msgFile");
print MsgFILE "\n I am sending an email to all of you \n";

close(MsgFILE);
print "\n sending mail....\n" if $debug;

open (MAIL,"|(cat $msgFile ; uuencode $file $to_file_name) | mailx -r $from -c $MailCc -s \"$Subject\" $to") or die "Cannot open sendmail: $!";

close MAIL;

To set up SSH Keys - UNIX

The process of creating SSH - Version 2 keys in the destination server is given below.

Login to source server using the your user id
scp id_dsa.pub user@destination_server:./id_dsa.pub


Login to the destination server using the user name and password
cd .ssh
touch authorized_keys2
chmod 600 authorized_keys2
cat ../id_dsa.pub >> authorized_keys2
rm ../id_dsa.pub

Logout from the destination server and try to login from source server again using the following command,

ssh -2 -v user@destination_server
Or
ssh destination_server

vi editor is throwing error '5826'

This happens because of several reasons. If the same file is opened under the same user in a different system, this problem can occur. Never mind, never worry about this problem. You just need to update the env variable of the user.

export EDITOR=vi

Change Password in UNIX

To change password in UNIX ,

1. If you already know the old password,
then run the command 'passwd'.

2. If you dont remember, better you ask sysadm :)

Wednesday, April 1, 2009

Securing Role Authorization in ASP.NET 2.0

To protect the authorization cookie you need to encrypt and integrity check it, use SSL to protect the cookie over the wire, and do not persist the cookie on the client.
When using role caching securing the roles cookie is of prime importance. This is to stop users modifying the list of roles to which they belong, and to stop intruders from gaining information about the roles used by your application.
* Ensure the cookie is encrypted and integrity checked by setting the cookieProtection attribute to All.
* Ensure that the authorization cookie is only transmitted over HTTPS connections by setting cookieRequireSSL to true.
* Ensure that the roles cookie is not persisted on the client computer by setting createPersistentCookie to false.
* If you cannot use SSL, consider reducing the cookie lifetime by reducing the cookieTimeout value to minimize the time window within which an attacker can use a captured roles cookie to access your site with privileged rights.
* If you are in a scenario where you are concerned about cookie hijacking, consider reducing the timeout and setting slidingExpiration="false".

Here is a sample secured configuration


cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="true"
cookieSlidingExpiration="true"
cookieProtection="All"
createPersistentCookie="false">