Sasikumarp’s Weblog

Archive for February, 2008

apache web server enabling gzip in linux

Posted by sasikumarp on February 29, 2008

Enable the below mentioned modules in Apache

1. Enable the module in httpd.conf
a. LoadModule deflate_module modules/mod_deflate.so
b. Include the lines in httpd.conf
i. SetOutputFilter DEFLATE
ii. AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css             text/javascript application/x-javascript
iii. BrowserMatch ^Mozilla/4 no-gzip
iv. BrowserMatch bMSIEs7 !no-gzip
v. BrowserMatch bMSIE.*SV !no-gzip
vi. BrowserMatch bOpera !no-gzip
vii. Header append Vary User-Agent

2. Enabling the expire header
a. LoadModule expires_module modules/mod_expires.so
b. Include the lines in httpd.conf
i. ExpiresActive On
ii. ExpiresDefault “access plus 10 years”

3. Installing the Xcache
a. I have already informed about the implementation of xcache.

Posted in Linux, Uncategorized | Leave a Comment »

check dsl speed test and

Posted by sasikumarp on February 28, 2008

Below links are useful to check speed test in dsl connection

http://www.dslreports.com/speedtest?flash=1

Analyze

Posted in Linux, Uncategorized, Windows | Leave a Comment »

Simple steps to configure CVS in Linux

Posted by sasikumarp on February 23, 2008

Linux setup a Concurrent Versioning System

(CVS) howto

var tf_clickURL = ‘http://a.tribalfusion.com/h.click/avmyJdWHfXmPYZdncvnodfD3aBk2tim3AfKpFfZd0G3P1sv2XGJvma7V3FQ2Vb7GVPQ2REn1QcUoPWJx0tZbuVAry4sMU0b3DT6im5ABcR6bI4HYsXW3AmHEx3P3V3sngUVQlWVnlS6UMTdJ3YG7h8F9vZcg/http://ad.in.doubleclick.net/clk;182319871;24411341;z?http://www1.ap.dell.com/content/products/productdetails.aspx/inspnnb_1525?c=in&cs=indhs1&l=en&s=dhs&~ck=mn’; var tf_flashfile = ‘http://cdn5.tribalfusion.com/media/1102796/dell1525_300x250.swf’; var tf_imagefile = ‘http://cdn5.tribalfusion.com/media/1102796/dell1525_300x250.jpg’; var tf_width = 300; var tf_height = 250; var tf_background= ‘#ffffff’; var tf_click_command = ‘CLICK’; var tf_ignore_fscommand_args = 0; var tf_use_embedded_flash_url = 0; var tf_append_fscmd_args_to_click = 0; var tf_use_flash_wrapper = 1; var tf_id = ‘2131460576’; var tf_click = ‘http://a.tribalfusion.com/h.click/avmyJdWHfXmPYZdncvnodfD3aBk2tim3AfKpFfZd0G3P1sv2XGJvma7V3FQ2Vb7GVPQ2REn1QcUoPWJx0tZbuVAry4sMU0b3DT6im5ABcR6bI4HYsXW3AmHEx3P3V3sngUVQlWVnlS6UMTdJ3YG7h8F9vZcg/’; var tf_wmode = ‘transparent’; var tf_frame = ‘http://cdn5.tribalfusion.com/media/common/flash/frame2.swf’; var tf_button = ‘http://cdn5.tribalfusion.com/media/common/flash/button2.swf’; function TFclick2131460576_DoFSCommand(command, args){ if (command == tf_click_command2131460576 && tf_use_embedded_flash_url2131460576 == 1) { window.open(tf_click2131460576+args,’_blank’); } else if (command == tf_click_command2131460576 || tf_ignore_fscommand_args2131460576 == 1) { window.open(tf_clickURL2131460576,’_blank’); } }

&amp;lt;A href=”http://a.tribalfusion.com/h.click/avmyJdWHfXmPYZdncvnodfD3aBk2tim3AfKpFfZd0G3P1sv2XGJvma7V3FQ2Vb7GVPQ2REn1QcUoPWJx0tZbuVAry4sMU0b3DT6im5ABcR6bI4HYsXW3AmHEx3P3V3sngUVQlWVnlS6UMTdJ3YG7h8F9vZcg/http://ad.in.doubleclick.net/clk;182319871;24411341;z?http://www1.ap.dell.com/content/products/productdetails.aspx/inspnnb_1525?c=in&amp;amp;cs=indhs1&amp;amp;l=en&amp;amp;s=dhs&amp;amp;~ck=mn&#8221; TARGET=”_blank”&amp;gt;&amp;lt;IMG src=http://cdn5.tribalfusion.com/media/1102796/dell1525_300x250.jpg WIDTH=300 HEIGHT=250 BORDER=0&amp;gt;&amp;lt;/A&amp;gt; <A href=’http://a.tribalfusion.com/h.click/avmyJdWHfXmPYZdncvnodfD3aBk2tim3AfKpFfZd0G3P1sv2XGJvma7V3FQ2Vb7GVPQ2REn1QcUoPWJx0tZbuVAry4sMU0b3DT6im5ABcR6bI4HYsXW3AmHEx3P3V3sngUVQlWVnlS6UMTdJ3YG7h8F9vZcg/http://ad.in.doubleclick.net/clk;182319871;24411341;z?http://www1.ap.dell.com/content/products/productdetails.aspx/inspnnb_1525?c=in&cs=indhs1&l=en&s=dhs&~ck=mn&#8217; TARGET=’_blank’> <IMG src=’http://cdn5.tribalfusion.com/media/1102796/dell1525_300x250.jpg&#8217; WIDTH=300 HEIGHT=250 ALT=’Click Here!’ BORDER=0></A>

Q. I am planning to use Concurrent Versioning System. I am using both Red Hat and Fedora Linux. How do I setup a CVS server?

A. Concurrent Versioning System (CVS) a widely used version control system for software development or data archiving solutions.

From the wiki page, “CVS keeps track of all work and all changes in a set of files, typically the implementation of a software project, and allows several (potentially widely separated) developers to collaborate”.

CVS Configuration – Install CVS

Use rpm or up2date or yum command to install cvs:# rpm -ivh cvs*OR# up2date cvsOR# yum install cvsCreate a CVS user# useradd cvs
# passwd cvs
Above command will create a user cvs and group cvs with /home/cvs home directory.

Configure CVS

Open /etc/profile and append following line:# vi /etc/profileAppend following line:export CVSROOT=/home/cvsSave the file and exit to shell promot.

Make sure your /etc/xinetd.d/cvs looks as follows:# less /etc/xinetd.d/cvsOutput:

service cvspserver
{
       disable            = no
       socket_type    = stream
       wait                = no
       user                = cvs
       group              = cvs
       log_type          = FILE /var/log/cvspserver
       protocol          = tcp
       env                 = '$HOME=/home/cvsroot'
       bind                = 192.168.1.100
       log_on_failure  += USERID
       port                = 2401
       server             = /usr/bin/cvs
       server_args     = -f --allow-root=/home/cvsroot pserver
}

Note: Replace 192.168.1.100 with your actual server IP address.

Restart xinetd:# service xinetd restartAdd users to this group (see this howto for more info)# adduser username -g cvs
# passwd username
Client configuration
Finally user can connect to this CVS server using following syntax:
$ export CVSROOT=:pserver:vivek@192.168.1.100:/home/cvs
$ cvs loginWhere,

  • vivek – username
  • 192.168.1.100 – CVS server IP

See also:

Posted in Linux | Leave a Comment »

set passwod in Apache using htaccess

Posted by sasikumarp on February 23, 2008

Implement User/Password-protected Directories

DeveloperSide.NET Articles

Important Notes

  • Make sure that directory C:\www\Apache2\bin is specified under the System Path variable (if you installed our Web-Server Suite package, this is set). We will use a program named htpasswd.exe, that is contained under the mentioned directory, to create a password file for the specified users.

Create the protected Directory

This section will show you how to create directory “private” outside the Web-Server’s webroot directory “C:\www\webroot” using the command prompt.

Open the Windows command-shell via Start » Run… cmd.exe <click ok>

Change to the drive letter of your Web-Server Suite’s root directory (this is the drive you installed the Web-Server Suite under; for this example we will use drive “C:”)…

...> C:Change to the path of your Web-Server Suite’s root directory (for this example we will use path “\www”)…

C:\...> cd \wwwCreate the directory you want to restrict access to with a user/password prompt (we will create directory named “private”)…

C:\www> mkdir privateChange to your newly created directory…

C:\www> cd private

Create user/password file

Continuing from the previous section, we are now ready to use htpasswd.exe to create a file named “.htpasswd”: this file will contain user names with their respective passwords (the passwords will be encrypted before placed under the file).

This 1st line (with switch “-c” — that will not be repeated in the following lines) will create a file named .htpasswd under the current directory (C:\www\private). The password given will be encrypted by the htpasswd.exe program (due to the “-m” switch — MD5 encryption).

User named “user1” with password “passuser1” is specified 1st…

C:\www\private> htpasswd -cmb .htpasswd user1 passuser1Add user named “user2” with password “passuser2” to the .htpasswd file…

C:\www\private> htpasswd -mb .htpasswd user2 passuser2Add user named “user3” with password “passuser3” to the .htpasswd file…

C:\www\private> htpasswd -mb .htpasswd user3 passuser3

Configuration — httpd.conf

We can now edit Apache’s httpd.conf file to bring everything together.

Edit file C:\www\Apache2\conf\httpd.conf

Make sure that the following two ‘LoadModule’ lines are uncommented, by removing the beginning “#” character…
(These ‘LoadModule’ lines should already be uncommented, by default)

LoadModule access_module modules/mod_access.so
LoadModule alias_module modules/mod_alias.so
Uncomment the following two ‘LoadModule’ lines, by removing the beginning “#” character…
(The 1st line is required for directive ‘AuthUserFile’)
(The 2nd line is required for directive ‘Options Indexes’: to display the index of a directory)

LoadModule auth_module modules/mod_auth.so
LoadModule autoindex_module modules/mod_autoindex.so
Insert code…

<Files ~ "^\.ht">
   Order allow,deny
   Deny from all
</Files>

Alias /private "/www/private"

<Directory "/www/private">
   Order allow,deny
   Allow from all

   Options Indexes
   AuthType Basic
   AuthName "Private Access"
   AuthUserFile "/www/private/.htpasswd"
   Require valid-user
</Directory>

Save file and Restart Apache…
(from the command prompt type the following)

> net stop Apache2
> net start Apache2

Test protected Directory

Access http://localhost/private/

Enter one of the user/password combinations…
You should now see either the directory structure, or (if you have an index.html\php file under the accessed directory) your index file.
To [truly] logout as the user, you must close the browser window.

Advanced Configurations and Features

You can also grant/restrict access to the user/password protected directory with IP addresses…

Replace the original “<Directory “/www/private”>” block with this updated version…
(or simply replace the first two lines of the original block)

<Directory "/www/private">
   Order deny,allow
   Deny from All

   Options Indexes
   AuthType Basic
   AuthName "Private Access"
   AuthUserFile "/www/private/.htpasswd"
   Require valid-user
</Directory>

Below the line…

Require valid-user

..add the following code…

Allow from 127.0.0.1
Satisfy Any

…if you access the protected area from your local system (IP address — 127.0.0.1), there will be no need to enter a user/password combination.
(Note that you can add multiple “Allow from ip-address” statements to grant access)

…by using the following code instead…

Allow from 127.0.0.1
Satisfy All

Posted in Windows | 1 Comment »

Show Hidden Files and Folders not working?

Posted by sasikumarp on February 22, 2008

Go to registry editor by running regedit in the run box.
Go to this key:
HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Explorer\Advanced

In the right hand area, double click hidden and change the value to 1.

Posted in Windows | 1 Comment »

Vmware Converter can convert the windows machine as vmware image

Posted by sasikumarp on February 21, 2008

VMware Converter provides an easy-to-use, scalable solution for migrations of machines, both physical to virtual and virtual to virtual. Optimized for mass migration, VMware Converter is equally effective for single-machine conversions. With its comprehensive and comprehensible wizards and task manager, VMware Converter imports virtual machines faster, with fewer manual steps required, and fewer source hardware limitations than other methods. With its ability to perform hot cloning, VMware Converter can import a virtual machine with no downtime on the source physical machine.

  • Conversion of VMware hardware version 6 products: Workstation 6.x, VMware ACE 2.x, VMware Fusion 1.x, and VMware Player 2.x
  • Conversion of an additional third-party disk image format: Acronis True Image 9
  • Experimental support for Microsoft Vista 32-bit and 64-bit operating systems
  • Ability to set speed and duplex settings on the network adapter while performing cold cloning migrations, by using the VMware Converter Enterprise Boot CD
  • Support for Symantec Backup Exec System Recovery 7.0

You can download the vmware converter by using the following link

vmware converter

Posted in Uncategorized, Windows | Leave a Comment »

Security considerations with password authentication in CVS

Posted by sasikumarp on February 21, 2008

The passwords are stored on the client side in a trivial encoding of the cleartext, and transmitted in the same encoding. The encoding is done only to prevent inadvertent password compromises (i.e., a system administrator accidentally looking at the file), and will not prevent even a naive attacker from gaining the password.The separate cvs password file (see Password authentication server) allows people to use a different password for repository access than for login access. On the other hand, once a user has non-read-only access to the repository, she can execute programs on the server system through a variety of means. Thus, repository access implies fairly broad system access as well. It might be possible to modify cvs to prevent that, but no one has done so as of this writing. Note that because the $CVSROOT/CVSROOT directory contains passwd and other files which are used to check security, you must control the permissions on this directory as tightly as the permissions on /etc. The same applies to the $CVSROOT directory itself and any directory above it in the tree. Anyone who has write access to such a directory will have the ability to become any user on the system. Note that these permissions are typically tighter than you would use if you are not using pserver.

In summary, anyone who gets the password gets repository access (which may imply some measure of general system access as well). The password is available to anyone who can sniff network packets or read a protected (i.e., user read-only) file. If you want real security, get Kerberos.

Posted in Linux | Leave a Comment »

CVS Access Control List Extension Patch

Posted by sasikumarp on February 21, 2008

CVSACL is a patch for CVS. It adds two new subcommands (acl & racl) to cvs for access control list management. It provides advanced ACL definitions per modules, directories, and files on branch/tag for remote cvs repository connections. Execution of all CVS subcommands can be controlled with eight different permissions.
ACL definitions works for only remote connections, local users can access and modify repository, if unix file system permissions allow. If you want all users to make remote connections to repository, and not allow local users to access repository, you have to set CVSServerRunAsUser keyword in aclconfig file (explained below). Still local users can use acl and racl subcommands to set permissions on directories or files if they have acl admin rights (p) on related directories or files.
So, in order to control all access to repository with this ACL extension, you should use CVSServerRunAsUser keyword and force all users to make remote connections. CVS repository administrator or project managers have to use acl and racl subcommands to manage permissions. But there is no gui client supporting these subcommands, so you have to use cvs client itself either locally or remotely. Download current version 1.2.5 (June 10, 2006)
sourceforge.net project page
cvsacl-announce mailing list
cvsacl-users mailing list
How to install
Permission types
ACL config keywords
Command line usage information
Command line usage samples

Installation

  • copy the file acl.c under src directory of CVS source distribution.
    cp acl.c /path/to/cvs-1.11.x/src/
  • copy the patch file cvsacl-patch-1.2.x under CVS source distribution directory.
    cp cvsacl-patch-1.2.x /path/to/cvs-1.11.x/
  • cd to CVS source directory.
    cd /path/to/cvs-1.11.x/
  • apply the patch.
    patch -p0 < cvsacl-patch-1.2.x
  • if you are initializing the repository after applying patch, related config files will be created with init command.
    cvs -d /path/to/repository init
  • if you already have a repository, you have to add the aclconfig file to your $CVSROOT/CVSROOT/. aclconfig.default is the default configuration file, you can rename it to aclconfig, and use it .
  • modify aclconfig file, if you need to change some options.
  • as the last step, you have to define yourself as acl administrator.
    cvs -d /path/to/repository racl yourname:p -r ALL -d ALL
    this command gives p (acl admin) rights to user (yourname), on all repository and tags/branches.

Permission Types

  • no access
    Command line character: n
    If a user given n permission, it is not allowed for any action on repository.
  • read
    Command line character: r
    r permission gives only read access on repository. With r permission you are allowed to run cvs subcommands: annotate, checkout, diff, export, log, rannotate, rdiff, rlog, status.
  • write
    Command line character: w
    w permission allows only cvs commit/checkin action. With w permission, you are not allowed to add/remove any file to/from repository, other permissions should be defines for that.
  • tag
    Command line character: t
    t permission allows cvs tag and rtag subcommands to run, so you may control tagging and untagging operations. t permission includes r permission, since without reading you can not tag/untag a file. However t permission does not include write permission, you can not commit a file with only t permission.
  • create
    Command line character: c
    c permission allows cvs add and import subcommands to run. To add or import a file/directory to repository, you have to given a c permission. Again, c permission does not include write permission, thus you may only add or import files, but you can not modify any existing file. After issuing add subcommand, you have to commit the file to complete adding. This commit subcommand is allowed because you are adding file and not modifying existing one.
  • delete
    Command line character: d
    d permission allows cvs remove command to run. To remove a file/directory from repository, d permission have to set. It does not include write permission, so you can not modify contents of an existing file on repository.
  • full access except admin rights
    Command line character: a
    a permission gives all access (above permissions) to repository, but it can not modify permissions. Only acl admins may modify the acl definitions.
  • acl admin
    Command line character: p
    p permission means that user is an acl admin, so it is allowed to make anything on repository.

ACL Config Keywords

The administrative file aclconfig contains miscellaneous settings which affect the behaviour of ACL extension. Currently defined keywords are:

UseCVSACL=valueUse ACL definitions if set to yes. If you do not want to use ACLs for some repositories in a patched CVS server, set this keyword to no. The default is no.

UseCVSACLDefaultPermissions=value Value can be any combination of valid permission types (w,r,t,c,d,t,a,p). if there is no defined ACL and default permission in access file, or no access file at all, this permissions are used. The default is p (admin rights), if aclconfig file is created with cvs init.

UseCVSGroups=valueCVS does not have a CVSROOT/passwd file. However it can be created manually (format should be same as /etc/group). If value set to yes, CVS checks for groups in file $CVSROOT/CVSROOT/group The default value is no.

UseSystemGroups=valueGroup memberships for users are checked in file /etc/group, if value is set to yes. The default value is no.

CVSACLFileLocation=valueOriginally access file is put under CVSROOT/CVSROOT, if you want a different location, set value to a valid path. The default value is $CVSROOT/CVSROOT/access.

CVSGroupsFileLocation=valueIF UseCVSGroups is set to yes, CVS looks for a group file under $CVSROOT/CVSROOT. To use a different location for group file set value to a valid path to group. The default value is $CVSROOT/CVSROOT/group.

UseSeparateACLFileForEachDir=valueIf value is set to yes, a separate ACL file (access) is created for each directory in repository. If you have a really big repository (directories>10,000 and files>100,000), performance may drop due to a big acl file, access. Setting the value to yes, may increase performance. Normally, you will not need this. The default value is no.

CVSServerRunAsUser=valueSet CVSServerRunAsUser keyword to a valid system user.
Keyword iseffective only in PServer connections. When a user make a remote pserver connection to CVS, after successfull authentication cvs process switch to run as that user, or defined system user in $CVSROOT/CVSROOT/passwd. So, you also have to set unix file permissions accordingly.
A better solution:
Add a user and group such as both cvsadm.
Set CVSServerRunAsUser keyword to cvsadm.
Change unix file system permissions for your repository,
make cvsadm user and group owner, and read,write,execute permissions and setgid.
(chown cvsadm -R /path/to/your/repository)
(chgrp cvsadm -R /path/to/your/repository)
(chmod 2770 -R /path/to/your/repository)
Add yourself to cvsadm group (since you are ACL administrator).
Therefore, only users making remote connections will have access to repository if you give rights. Local users can not access to repository via a cvs client or directly.

Command Line Usage Information

acl command is used on checked out files or directories. racl command is used on repository without a working copy. Usage information can be obtained with standard cvs –help command.
Output of cvs –help acl and cvs –help racl:

Usage: cvs racl [user||group:permissions] [-Rl] [-r tag] [directories...] [files...]
        -R      Process directories recursively.
        -r rev  Existing revision/tag.
        -l      List defined ACLs.

Usage: cvs acl [user||group:permissions] [-Rl] [-r tag] [directories...] [files...]
        -R      Process directories recursively.
        -r rev  Existing revision/tag.
        -l      List defined ACLs.

NOTICE: There is no more -d -f options for directory and files, acl/racl subcommands runs like other cvs subcommands.

You may directly set permissions for a user or group or add/remove permissions with + and – signs to/from existing permissions.
If you do not give the branch/tag information, default value of HEAD (main branch) will be used. You have to give branch/tag name with -r option. You may type ALL for branch/tag field.

While checking for permissions, it goes thorough the list below. So the highest significant permission is the first item in list.

  • permissions assigned to username for specific directory or file.
  • permissions assigned to group name for specific directory or file.
  • permissions as defaults for specific directory or file.
  • permissions as repository defaults.
  • permissions in aclconfig file.

Examples

     /cvs/
      |
      |
      +--projectA/
      |	       |
      |        +---CVSROOT/
      |        |
      |        +---lib/
      |        |     |
      |        |     +---gnulib/
      |        |     |
      |        |     +---zlib/
      |        |
      |        +---src/
      |        |     |
      |        |     +---main.c
      |        |     |
      |        |     +---server.c
      |        |     |
      |        |     +---client.c
      |        |
      |        +---gui/
      |
      +--projectB/

We have above directory structure for a cvs repository, and no defined permissions.

Setting main default permissions:

$ cvs -d /cvs/projectA racl cvsadmin:p -r ALL ALL
$ cvs -d /cvs/projectA racl ALL:r -r ALL ALL

User cvsadmin will be an acl admin, and all other users will have only read rights on all branches/tags in projectA repository. This is the default acl definition and it overwrites default permissions in $CVSROOT/CVSROOT/aclconfig file.

$ cvs -d /cvs/projectA racl ALL:r -r ALL ALL
$ cvs -d /cvs/projectA racl ALL:n -r ALL gui

After executing these two commands, all users will have read access on all directories and files except gui directory. Everyone will be denied to access to gui directory becase no access, n, permissions is set.

Setting permissions directly on a file or directory:

$ cvs -d /cvs/projectA racl userX:wcd lib
$ cvs -d /cvs/projectA racl group1:w lib

First command will set write, create, and delete permissions for userX on directory lib with branch HEAD (since no branch/tag information given, branch defaults to HEAD). Second command will set only write permission for group1 on directory lib with branch HEAD. Members of group1 will have only commit rights on lib directory, branch HEAD, they can not add or remove any file, just modify existing files.
If userX is also a member of group1, userX will have write, create, and delete permissions because it is specifically given these permissions.

$ cvs -d /cvs/projectA racl userY:wcd -r develStream lib
$ cvs -d /cvs/projectA racl userY:r -r integStream lib

These commands will give wcd permissions to userY on lib directory with tag develstream, and r permissions on lib directory with tag integStream.

$ cvs -d /cvs/projectA racl userZ:wcd src
$ cvs -d /cvs/projectA racl userZ:r src/main.c

First command will give wcd permissions to userZ on src directory, but only read permission on file main.c in src directory.

Using + and – signs to set permissions on a file or directory:

$ cvs -d /cvs/projectA racl userZ:+t src
$ cvs -d /cvs/projectA racl userZ:-cd src
$ cvs -d /cvs/projectA racl userZ:-wt src

Before the first command, userZ has wcd permissions on src directory, after issuing command it will have wcdt permissions. Tag permission will be added. UserZ has wcdt permissions, and we execute the second command to remove create and delete permissions. So userZ has wt permissions. In the last command we also remove wt permissions, finally userZ has no defined permissions left, and it will use the default permissions if set.

Listing permissions on a file or directory:

$ cvs -d /cvs/projectA racl -l src
$ cvs -d /cvs/projectA racl -l src
$ cvs -d /cvs/projectA racl -l src/main.c

First command will list the permissions for src directory.
Example output:
d src HEAD | userX:wcd group1:r | defaults:r
userX and group1 has assigned permissions, all other users will have default permissions, which is only read.

Second command will list the permissions for files in src directory.
Example output:
f src/main.c HEAD | userX:wcd group1:r | defaults:r
f src/server.c HEAD | userX:wcd group1:r | defaults:r
f src/client.c HEAD | userX:wcd group1:r | defaults:r

Third command will list the permissions for main.c file in src directory.
Example output:
f src/main.c HEAD | userX:wcd group1:r | defaults:r <!–

CVS server main site
WinCVS – a visual CVS client for Windows
jCVS – a visual CVS client, OS independent
–>

Posted in Linux | Leave a Comment »

Unable to Open Hard or USB Flash Drive with Windows Script Host Cannot Find Script File autorun.vbs Error

Posted by sasikumarp on February 21, 2008

n some situation especially when anti-virus program has cleaned, healed, disinfected or removed a worm, trojan horse or virus from computer, there may be error happening whenever users try to open or access the drive by double clicking on the disk drive icon in Explorer or My Computer window to try to enter the drive’s folder. The problem or symptom happens in hard disk drive, portable hard disk drive or USB flash drive, and Windows will prompt a dialog box with the following message:

Windows Script Host

Can not find script file autorun.vbs.

Sometimes you will be asked to debug the VBScript with error code of 800A041F – Unexpected ‘Next’.

or

Choose the program you want to use to open this file with:

In this case, the “Always use the selected program to open this kind of file” option is grayed out.

The symptom occurs because when autorun.vbs is created by trojan horse or virus. The virus normally loads autorun.inf file to root folder of all hard drive or USB drive, and then execute autorun.bat file which contains script to apply and merge autorun.reg into the registry, with possible change to the following registry key to ensure that virus is loaded when system starts:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
Userinit=userinit.exe,autorun.exe

Finally, autorun.bat will call wscript.exe to run autorun.vbs.

When antivirus or security software detected the autorun.vbs file as infected, the file will be deleted or removed or quarantined. However, other files (autorun.*) and registry value still referring to autorun.vbs, and this document no longer exists, hence the error when users double click to open a drive folder.

To correct and solve this error, follow this steps:

  1. Run Task Manager (Ctrl-Alt-Del or right click on Taskbar)
  2. Stop wscript.exe process if available by highlighting the process name and clicking End Process.
  3. Then terminate explorer.exe process.
  4. In Task Manager, click on File -> New Task (Run…).
  5. Type “cmd” (without quotes) into the Open text box and click OK.
  6. Type the following command one by one followed by hitting Enter key:del c:\autorun.* /f /s /q /a
    del d:\autorun.* /f /s /q /a
    del e:\autorun.* /f /s /q /ac, d, e each represents drive letters on Windows system. If there are more drives or partitions available, continue to command by altering to other drive letter. Note that you must also clean the autorun files from USB flash drive or portable hard disk as the external drive may also be infected.
  7. In Task Manager, click on File -> New Task (Run…).
  8. Type “regedit” (without quotes) into the Open text box and click OK.
  9. Navigate to the following registry key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  10. Check if the value name and value data for the key is correct (the value data of userint.exe include the path which may be different than C drive, which is also valid, note also the comma which is also needed):“Userinit”=”C:\WINDOWS\system32\userinit.exe,”If the value is incorrent, modify it to the valid value data.

Posted in Windows | Leave a Comment »

How to mount windows NTFS Partition in Linux

Posted by sasikumarp on February 21, 2008

To find out your kernel version use following command:

Code:
uname -r

Once downloaded driver use rpm command to install it:

Code:
 rpm -ihv kernel-ntfs*

Now to mount NTFS windows XP system partition use mount command:

Code:
mkdir -p /mnt/c
mount -t ntfs /dev/hdXY /mnt/c

OR

Code:
mount -t ntfs -o nls=utf8 /dev/hdXY /mnt

Use fdisk -l command to find out name of NTFS partion:

Code:
fdisk -l

Posted in Linux | Leave a Comment »