Wednesday, February 29, 2012

Using find command in Unix with prune option

http://stackoverflow.com/questions/1489277/how-to-use-prune-option-of-find-in-sh

Thursday, February 23, 2012

Forcing Windows 7 to connect to SAMBA using old authentication method

For Windows 7 Pro
  1. from the run command or from a cmd window run secpol.msc
  2. go to “Local Policies” -> “Security Options” -> “Network Security: LAN Manager authentication level”
  3. change to “LM and NTLM – use NTLMV2 session security if negotiated”
  4. Press the OK button

For Windows 7 Home
Browse to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LsaCreate a new DWORD value with the following properties: NAME: LmCompatibilityLevel VALUE: 1

Monday, December 12, 2011

Certificate error when redirecting http://localhost to https://localhost

On IE, after the certificate error page is shown, clicking "Continue ..." link doesn't work.



  • "http://localhost" is by default is assigned to "Locked-down Local Machine Zone" by Windows (later than XP SP2)
  • When "http://localhost/" is redirected to "https://localhost/", IE detect server SSL certificate error and shows an error page. 
  • This error page is internally has URL "res://ieframe.dll/invalidcert.htm?SSLError=50331648#http://localhost/" and is considered to be in "Internet Zone".
  • "Locked-down Local Machine Zone" by default doesn't allow navigation into its zone from a less privileged zone (e.g. "Internet zone"). Thus clicking continue button is ignored.


Workaround for this problem

  • Acces "https://localhost/". "https://localhost" is by default considered "Local Intranet zone" thus navigating from "res://ieframe" is possible.
  • Access "http://127.0.0.1/". "http://127.0.0.1/" is by default considered "Internet zone" thus navigating from "res://ieframe" is possible.
  • Add "http://localhost" to "Trusted Zone". "Trusted Zone" allows navigation from "Internet Zione" thus navigating from "res://ieframe" is possible. 
  • Using Group policy editor (gpedit.msc), edit User Configuration - Administrative Templates - Windows Components - Internet Explorer - Internet Control Panel - Security Page - Locked-down Local Machine Zone, and set "Web sites in less privileged Web content zones can navigate into this zone" to Enabled (don't forget to set the Options part inside the dialog to "Enabled" too).


Notes: Adding "http://localhost" to "Trusted zone" (or any other zones) internally remove it from "Locked-down Local Machine Zone". If "http://localhost" is afterwards removed from "Trusted zone", it will no longer explicitly bound to any zone and will be considered to belong to "Internet zone". Thus the problem reported here won't reappear after the removal.