Friday, September 17, 2010

Disable Autorun for USB Pen drives and CD Drives

Disabling autorun for USB drives prevents a lot of virus from jumping into the system as most of the "small" guys use the AutoRun feature to trigger themselves. There is a way to disable it completely.

Click "Start / Run" and type "gpedit.msc". It should open a windows like the one below

(Click on it to open a bigger image).


In that go to the branch on the left hand side frame following the below path

"Local Computer Policy / Computer Configuration / Administrative Templates / System"

Clicking on "System" will list lots of items on the right window. One of them is "Turn Off Autoplay".

Double click on that, make sure to select "Enabled" radio button and on the list box below, select "All Drives".

This should disable Autorun in all usb and cd/dvd drives on the system.

Rebooting Mac

Mac has the uncanny habit of screwing itself up (atleast mine does) and then not telling the user what happened. Let me explain. All of a sudden, the initial grey screen comes up with the loading "rotator" thingy. And thats about it. Nothing more happens. And when I force shutdown and restart, it does not actually start from the beginning, meaning it does not do a "CHUNNNGGG" chime sound when restarting.

And again, the cloud was the Good Samaritan (who else is there). Pressing the keyboard combination of "Command(Apple)-Option-P-R" and holding it like that (NB: it needs some skill to hold this key combination) until the chime sounds twice should resolve the issue. But, my machine seems to be a bit more adamant than that. Even though I have "CHUNNNG"ed it, it still stops are the rotator screen. :-( Will update the post as and when I find a solution.

Source: TUAW

Thursday, April 29, 2010

Control characters in source file after ftp

<p align="justify">My friend had a problem with a Linux file. he had ftp'd a file from windows into Linux. Now, every line in that file has a ^M at its end. He wanted a way to avoid it, and/or remove the control characters from such files.

Browsing thru the web, there were multiple answers provided.

1. While uploading via ftp, use the ASCII mode, not the binary mode. This will translate the line ends properly. Binary mode is to be used for programs and archive files only (like zip, tar, etc..)
2. dos2unix (and its complementary unix2dos utility)
3. cat file | tr -d "\r" > newfile
4. sed 's/.$//' infile.txt > outfile.txt
5. col -bx < oldfile > newfile

Disclaimer: I have not tried this in any of the ways mentioned. I am just listing it for easy access only.</p>