Speeding Up Share Viewing In Windows XP
December 10, 2007 at 7:06 am (Operating Systems, Tips n Tricks)
This is a great tweak. Before I found it, I was always smashing my head against the table waiting to view shares on other computers. Basically, when you connect to another computer with Windows XP, it checks for any Scheduled tasks on that computer – a fairly useless task, but one that can add up to 30 seconds of waiting on the other end – not good! Fortunately, it’s fairly easy to disable this process. First, navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Current Version/Explorer/RemoteComputer/NameSpace in the Registry. Below that, there should be a key called {D6277990-4C6A-11CF-8D87-00AA0060F5BF}. Just delete this, and after a restart, Windows will no longer check for scheduled tasks – mucho performance improvement!
Windows – Increasing options in add/remove programs
December 6, 2007 at 12:40 pm (Operating Systems, Tips n Tricks)
If you try to uninstall windows built in programs such as msn, media player etc. You won’t find them in add/remove programs. Here is a trick to get what you want.
just open the file C:\Windows\inf\sysoc.inf (where C: is the drive letter where Windows XP is installed) in Notepad.
You should see a section of the file something like this:
[Components]
NtComponents=ntoc.dll,NtOcSetupProc,,4
WBEM=ocgen.dll,OcEntry,wbemoc.inf,hide,7
Display=desk.cpl,DisplayOcSetupProc,,7
Fax=fxsocm.dll,FaxOcmSetupProc,fxsocm.inf,,7
NetOC=netoc.dll,NetOcSetupProc,netoc.inf,,7
iis=iis.dll,OcEntry,iis.inf,,7
com=comsetup.dll,OcEntry,comnt5.inf,hide,7
dtc=msdtcstp.dll,OcEntry,dtcnt5.inf,hide,7
IndexSrv_System = setupqry.dll,IndexSrv,setupqry.inf,,7
TerminalServer=TsOc.dll, HydraOc, TsOc.inf,hide,2
msmq=msmqocm.dll,MsmqOcm,msmqocm.inf,,6
ims=imsinsnt.dll,OcEntry,ims.inf,,7
fp_extensions=fp40ext.dll,FrontPage4Extensions,fp40ext.inf,,7
AutoUpdate=ocgen.dll,OcEntry,au.inf,hide,7
msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,hide,7
RootAutoUpdate=ocgen.dll,OcEntry,rootau.inf,,7
IEAccess=ocgen.dll,OcEntry,ieaccess.inf,,7
This is a list of all components installed at the moment. I’ve taken the example of MSN Messenger – the program entry called ‘msmsgs’, third-last line. You can see the word ‘hide’ highlighted – this is the string which tells Windows not to display the component in the Add/Remove Programs list. Fix this up by simply deleting the word ‘hide’ like so:
msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,hide,7
To this:
msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,,7
Now, after restarting, you should be able to see MSN Messenger in the Add/Remove Programs list. If you want to be able to quickly view and remove all components, simply open the sysoc.inf file and do a global find and replace for the word “,hide” and replace it with a single comma “,” and experience the difference
Kill/Block Ads Using Hosts File
October 4, 2007 at 8:00 am (General, Operating Systems, Tips n Tricks)
I know its annoying to face ads everywhere along the web pages. Here is a way to get par from it.
Hosts File: This is file which does the job of DNS for the host. example 127.0.0.1 is termed as localhost. This entry is there in the host file. You can find the host file at C:\WINDOWS\system32\drivers\etc\ This hosts file has an entry like
127.0.0.1 localhost
Online Ads : There are hardly any sites who place their own ads. Instead they take ads from a different ad server. The trick is to block the ip address of the ad server.
Trick : The trick is to make an entry of the ad server in the hosts file. And the ip corresponding to it will be the local loopback ip address. i.e. 127.0.0.1 Now, whenever request for the adserver is fired then the entry in the hosts file is checked first. Which checks loopback address(127.0.0.1 that return nothing).
Eg. I tried this for a site named http://www.vyomworld.com/
Watch out the ads on the top posted by google server. Right click on any of them and go for copy link option in the popup.
When pasted we get the link location as http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-4686307991865625&dt=1191484186718&lmt=1191484162&format=fp_al_lp&output=html&correlator=1191484186703&channel=0656107910&url=http%3A%2F%2Fwww.vyomworld.com%2F&cc=27&ga_vid=1692318819.1191484187&ga_sid=1191484187&ga_hid=1737865425&flash=0&u_h=600&u_w=800&u_ah=570&u_aw=800&u_cd=32&u_tz=330&u_his=1&u_java=true&u_nplug=14&u_nmime=52&kw_type=radlink&prev_fmts=728x15_0ads_al_s&rt=ChBHBJp5AA8pqAp6TA-renBrEgpTYW1wbGUgR1JFGggc7Nd7YCYnvCDm76gQKAFI5u-oEA&hl=en&kw0=Sample+GRE&kw1=Barron%27s+GRE&kw2=GRE+Application&kw3=GRE+Dates&kw4=GRE+Material&okw=Sample+GRE
So, make an entry in the hosts file and it looked as
127.0.0.1 localhost
127.0.0.1 pagead2.googlesyndication.com
Now, restart the browser and try the site again this is what I got..
Remove Shutdown Option From Start Menu
October 3, 2007 at 2:31 am (Operating Systems, Tips n Tricks)
Wanna play with your friends by removing the shutdown option from the start menu in their computer ? Here is the key to the registry hack…
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
“NoClose”=”DWORD:1″
Note: It works only on windows
Encrypting Files In Windows XP
October 2, 2007 at 2:49 am (Operating Systems, Security)
Windows XP supports an asymmetric key encryption which is collaborated with the working of NTFS file system. This makes the process of encryption extremely efficient and transparent.
The file/ folder is encrypted using public key and can be opened with only private key of the same pair. Since, user is not taken as aware of these techniques, the process is made transparent to user. Where keys are made automatically and encryption and decryption happens on simple key. There is absolutely no need to maintain keys.
You may think if I dont remember key than what is the use of encrypting… The answer is the file will not be available to any other instance of the operating system. This is good when you are on a network.
Procedure
Goto the folder you want to encrypt and make a right click.
Go to properties and select Advanced from General tab.
There is a check box asking for encryption process, check it.
The color of your folder will be changed if it is done.
Breaking Unix Root Password
September 30, 2007 at 8:23 am (Operating Systems, Security, Tips n Tricks)
Well if you come to the real sense, this is not exactly called as hacking. The trick is just removing root password without administrator login.
This is a way to clear the root password when you don’t have access to the vi editor.
Example
Flavors: AT&T, BSD
If no one has access to the root password on a system and it is a matter of urgency to get into that system, you can boot miniroot and clear the password out of the root account. This can be done even when the vi editor is inaccessible. To do this on a system using the /etc/shadow file, use the ed editor with 13 dots and your problems are solved:
# cp /etc/shadow /etc/shadow.bak # ed /etc/shadow 1p s/:………….:/::/ 1p w q
Line 1: While in the ed editor, go to the first line of the file.
Line 2: Switch the first occurrence of a field that has 13 characters with nothing. This is the password field.
Line 4: Quit.
You’re finished! You swapped out the 13 characters of root’s password field with nothing and cleared the password. You can now bring the system to single user and change the root password. The same basic commands can be used on the /etc/passwd file for those platforms that don’t support shadow passwords. The result is the same.
Remove the —- Dashes —- (Unix)
September 29, 2007 at 4:35 pm (Operating Systems, Tips n Tricks)
A method of removing files that begin with dashes “-”.
There will be times when you stumble on a file at the top of the directory that contains dashes. Many users sometimes “fat finger” the keys and accidentally create a file with dashes.
-rwxrwxrwx 4 root 512 Aug 24 21:01 -F -rwxrwxrwx 4 root 512 Aug 24 21:01 ---wow drwxrwxrwx 4 root 512 Aug 24 21:01 . drwxr-xr-x 19 root 7680 Jul 2 10:41 ..
If you attempt to remove them through normal methods, UNIX will attempt to use them as command-line options and the command will break out with an error:
# rm -F Illegal option – F Usage: rm [-fir] file… # rm ---wow Illegal option -- - Illegal option -- - Illegal option -- w Illegal option -- o Illegal option -- w Usage: rm [-fir] file…
So how do you get rid of these files? There are a few ways to perform this task. The files can be removed by a file manager, by hiding the dashes, by fighting a dash with a dash, or by deleting the directory.
Example One: Using File Manager
Flavors: Those with a GUI-based file manager.
Most GUI-based UNIX interfaces today are packaged with a file manager. The theory behind this interface is to simplify the life of a system administrator. Again, I said in theory—this isn’t always the case.
File manager programs are pretty intelligent. They recognize file types and remove this misnamed file without any problems. If you feel that critical files are in danger from removing this file manually then use the file manager to remove the file.
Example Two: Hiding in the Directory
Syntax:
rm "./file"
This example uses a method of hiding the dash from the rm command.
$ rm ./-F $ rm "./---wow"
By placing the ./ (dot, slash) in front of the filename, you hide the option and treat it as part of the file. The lines remove the file (not the option) from the current directory. Whenever in doubt, quotation marks (" ") help define the file and should be used.
Example Three: Fighting a Dash with a Dash
Syntax:
rm –- file
In this method you fight a dash with a dash.
$ rm -- -F $ rm -- ---wow
The double dash before the file will treat it as a file and not as an option. It is similar to example two. It treats what UNIX thinks is an option as a file.
Example Four: Brute Force—rm -r
Syntax:
rm -r directory
This is the brute-force approach to solving this problem and should be used only as a last resort. If the file in question is in a nonsystem partition or directory, you may be safe to use this.
$ mv /usr/people/jdoe /usr/people/tmp/jdoe $ rm -r /usr/people/jdoe # mkdir /usr/people/jdoe $ cp -pr /usr/people/jdoe/[A-Za-z]* /usr/people/jdoe
Line 1: Move all the contents of the directory, with the exception of the file in question, to another area.
Line 2: Go up one level and remove all the contents of that directory.
Line 3: Remake the directory.
Line 4: Copy the original data back.
Warning
You will destroy your system if you attempt to execute this procedure on a directory that the system uses, such as: /, /etc, /usr, /bin, /sbin.
Reason
The potential for deleting the wrong files exists for even the most experienced administrator. Use these methods and you shouldn’t have to rely on your backups to restore any unnecessarily deleted files. You will also not have to stay at work any later than you have to.
Real World Experience
There is nothing worse for an administrator than to be tested by your users. Every once in a while a user will attempt to play a practical joke and see whether you fall into the trap. Here is how it works.
While cruising around in systems and viewing the long listing of various directories with ls, I sometimes notice something very odd at the root level of the directory tree, a file called -r *.
-rw------- 1 root 147 Jan 19 1996 -r * drwxr-xr-x 22 root 1024 Aug 21 21:16 . drwxr-xr-x 22 root 1024 Aug 21 21:16 .. -rw------- 1 root 147 Jan 19 1996 .Xauthority -rw-r--r-- 1 root 366 Sep 30 1994 .Xdefaults -rw-r--r-- 1 root 260 Jul 24 1997 .cshrc
Some admins get sucked into this prank and do a rm -r * and wipe out their system. Examples one and two will remove this file, but remember to put quotes around the entire file.
# echo "" > "-r *" # rm ./"-r *" # rm – "-r *"
Create Shortcuts For Shutdown and Rebooting
September 26, 2007 at 5:33 pm (Operating Systems, Tips n Tricks)
Shutting down and rebooting are a way long process. Here is a trick that can help you. Right click produces a option to create a shortcut. In the option of setting the link, type shutdown and finish the process. You get an icon to shutdown your PC. If you want to restart, type shutdown -r -t 01 -c “Rebooting your PC” This will reboot with prompting of message in quotes at that time. Here are more options for the same job..
|
Switch |
What it does |
-s |
Shuts down the PC. |
|---|---|
|
-l |
Logs off the current user. |
|
-t nn |
Indicates the duration of delay, in seconds, before performing the action. |
|
-c “messagetext“ |
Displays a message in the System Shutdown window. A maximum of 127 characters can be used. The message must be enclosed in quotation marks. |
|
-f |
Forces any running applications to shut down. |
|
-r |
Reboots the PC. |
Converting Hard Drives To NTFS
September 22, 2007 at 3:56 am (Operating Systems, Tips n Tricks)
To use XP compression or encryption, you have to use NTFS. But if you instead have a previous filesystem, such as FAT32, you’re not left out you can convert it to NTFS. To convert a volume to NTFS, use XP’s convert utility. To convert a volume to NTFS, at a command prompt, type:
convert d: /fs:ntfs
where d: is the volume you want to convert.
You can also use a number of parameters along with the utility:
/v
This runs the utility in verbose mode, which provides information about the volume being converted.
- /nosecurity
- This sets the security privileges on the converted disk so that its files and folders can be used by anyone.
- /x
- Use this parameter if you’re on a network and want to make sure another user cannot disrupt the conversion process by trying to access the drive while you’re converting it. This parameter dismounts the drive from the network.
- So, enjoy better compression facilities with NTFS if you are working with windows XP…
End Task In Windows XP Automatically
September 21, 2007 at 6:54 pm (Operating Systems, Tips n Tricks)
Windows waits too long before killing a non-responsive task?
To remedy this, you can start automatic handling of end tasks. Wherein, the tasks will be implicitly terminated on a certain interval
Procedure -
1. In the Registry Editor , go to HKEY_CURRENT_USER\Control\Panel\Desktop\, change the value of “AutoEndTasks” key to “1“.
2. Change the “WaitToKillAppTimeout” key’s value to the number you want. The default is 20000 ms. This is the interval as the name specifies.