Tuesday, September 01, 2015

Why and how we can bypass restricted paid WiFi's at public places such as airports, etc ?

            We might be wondering some times on how to bypass the restricted paid wifi in public places to access particular URL . To bypass some poorly configured WiFi's just append (without the double quotes)   " ?.jpg  " to end of your URL string. This should work in many instances where generally blocker is configured let images through.  Appending ?.jpg to the URL makes the blocker think that the URL is an image. On the other hand, anything after the ? doesn't change the actual webpage requested, it only changes the GET headers. (so http://google.com/?.jpg and http://google.com/ give the same page). Note that if there already is a query string in the URL (something after a question mark), then you must use &.jpg instead of ?.jpg, as only the first question mark is considered for making a query string


Friday, July 24, 2015

How to erase Filevault encrypted volume in case system fails to boot or you just want to format disk and re-install OSX on the system.

             There might be situation with FileVault where the OSX might not be booting normally or sometimes OS X does not allows you to erase or turnoff the encryption ( Performed using Disk Utility.app available with OS X installer ). This can be a problem with FileVault 2-encrypted volume which will not let you either unlock or decrypt it. In such cases the following method will help you in deleting the core storage( FileVault encrypted) volumes on the system.

To perform this :

  1. Connect the OS X installer USB/Disk to Mac.
  2. Power on the Mac.
  3. Hold option key on keyboard and boot into OS X Installer.
  4. Open the Terminal.app from Utilities in OS X installer application.
  5. Run the following command to get the details about the FileVault encrypted volume. 
          diskutil cs list

          This will show detailed information about the core storage volume available on the system.Unless you have more than one volume on the OS X system which is encrypted as well, you should have only one volume listed as core storage volume under Logical Volume Group(LVG). Please refer to the below screen shot volume for identifying the LVG information.

      6. Now run the below command to delete the Logical volume group from the system.

           diskutil cs delete LVG-ID

           Example : 

           The above command will delete the corestorage volume and reformat the disk as  plain HFS+ volume.
       7.  Quit the Terminal Application , Continue with the regular OS X installation steps. 


Tuesday, March 10, 2015

How to hide or show hidden folders in OS X

We can easily hide or show a hidden a folder in Mac OS X by using following command. 

To hide folder in finder :

1. Launch Terminal.app from /Applications/Utilities 
2. Run command "chflags hidden path-to-folder"

The above command will make the target directory hidden in Finder application.

To show hidden folder in finder :

1. Launch Terminal.app from /Applications/Utilities 
2. Run command "chflags nohidden path-to-folder"

The above command will make the target directory visible in Finder application.

Tuesday, January 13, 2015

How to reset password in single user mode in Mac OS X

To change the user password in Leopard(10.5.x) or SnowLeopard (10.6.x)

  1. Hold "Command + S" key on your mac keyboard to boot your mac into single user mode.
  2. Execute command "mount -uw /" in shell.
  3. Run below command "launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist"
  4. Execute command :  passwd
  5. change the password of root.

How to find a specific file belongs to which RPM or DPKG package on linux systems.

         On Linux systems ( RPM or Debian), We would often require to find out to which package the target file belongs on the system. This can be found by using following set of commands on the system.

On RPM based systems :

          When we execute the rpm -qf command to find out which package the file belongs ( as shown in the example below)

rpm -qf /etc/protocols 

The /etc/protocols file belongs to package "setup-2.8.14-20.el6_4.1.noarch" on SLES 11 Sp3.

On Debian based systems :

         When we execute the dpkg -S  command to find out which package the file belongs ( as shown in the example below)

#dpkg -S /etc/protocols
netbase: /etc/protocols

The /etc/protocols file belongs to package "netbase"  in ubuntu 14.04/
We can also use the below method to find the about the package information the file belongs on ubuntu (debian) systems.

apt-file search filename
apt-file search /etc/protocols
netbase: /etc/protocols
Note : To install apt-file use : sudo apt-get install apt-file and we need to update its database 
before you can use it by executing sudo apt-file update