OS X: Difference between revisions

From Han Wiki
Jump to navigation Jump to search
add category
Shortcut keys
 
Line 1: Line 1:
= Shortcut keys =
<code>Ctrl+F2</code> Move the focus to menu
= Tunneling SMB mount through SSH =
= Tunneling SMB mount through SSH =



Latest revision as of 20:44, 16 October 2020

Shortcut keys

Ctrl+F2 Move the focus to menu


Tunneling SMB mount through SSH

  • Last tested on OS X El Capitan 10.11.5
  • Base reference: [1]

On one of the CLIs type the following. I'm assuming username (for connecting to my server) is "mhan" and the server address to be "pisteos.hanovate.com".

$ sudo ssh -p 2323 -l mhan -L 139:localhost:139 pisteos.hanovate.com

The above actually logs you in while forwarding the port. Optionally, you can add these parameters to suppress the log-in and only forward the port via SSH in the background. Make sure NOT to close the console.

$ sudo ssh -2qfNg -p 2323 -l mhan -L 139:localhost:139 pisteos.hanovate.com

Then on a separate terminal type the following:

$ mkdir /Volumes/sharename
$ mount -t smbfs //localhost:139/sharename /Volumes/sharename

Changing hostname that shows up on CLI

The hostname doesn't seem to change in spite of changing the computer name in Sharing preference, and NetBIOS names. This command has to be executed at the CLI to change the hostname.

$ sudo scutil --set HostName newhostname.local

Fixing App Store error: "Your device or computer could not be verified. Contact support for assistance."

  • Tested on: OS X 10.7.4 Lion
  • Difficulty: 2/10
  • Time: <10 minutes + your WPM


Once you type your credentials inside the App Store you get a red text message reading, Your device or computer could not be verified. Contact support for assistance. According to the links provided below, it seems that the OS X does a simple check of the ethernet identifier to determine whether or not "your device or computer" has been verified. The system-generated /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist contains an indicator value to tell you whether or not your ethernet card is "built-in."

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Interfaces</key>
  <array>
    <dict>
      <key>Active</key>
      <true/>
      <key>BSD Name</key>
      <string>en0</string>
      <key>IOBuiltin</key>
      <true/>
      ...

If the error message comes up your value for the key IOBuiltin is most likely set to <false/>. Here are the steps to solve this problem.


1. Get EFI string for your ethernet card

a. Find out the devicepath for the ethernet card

You can use a utility called gfxutil (GFX conversion utility) to find out. Version 0.71b can be downloaded from here.

Make sure the file is executable if it isn't already.

$ chmod u+x gfxutil

Then execute the file with a parameter "-f ethernet" for the devicepath. NOTE: Your devicepath will be different from mine.

$ gfxutil -f ethernet
DevicePath = PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)
$


b. Convert the plist from text to hexadecimals

Create a plist in your favorite text editor as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
        <dict>
        <key>PciRoot(0x0)/Pci(0x1c,0x1)/Pci(0x0,0x0)</key>
                <dict>
                <key>built-in</key>
                <string>0x01</string>
                </dict>
</dict>
</plist>

Save it as ethernet.plist. Then convert into hexadecimal format using gfxutil.

$ gfxutil -i xml -o hex ethernet.plist ethernet.txt

Open ethernet.txt and copy the content of the file into the clipboard.


2. Update the boot plist file

Your boot plist may be different depending on the bootloader. Mine is called org.chameleon.Boot.plist and it is found under /Extra folder. Open it up with a text editor and paste in the hexadecimal value as a device-properties pair. CAUTION: Don't insert it between other key/string pairs. NOTE: Your hexadecimal string may look different.

...
<key>device-properties</key>
<string>4b00000001000000010000003f0000000100000002010c00d041030a0000000001010600011c0101060000007fff0400160000006200750069006c0074002d0069006e0000000500000001</string>
...


3. Delete all network interfaces

Go into your Network settings and delete (click on -) all of the network interfaces you have listed there. It's possible you may only need to delete the Ethernet.

Delete */Library/Preferences/SystemConfiguration/NetworkInterfaces.plist*. Yes, delete it. It's auto-generated by the system during the boot process.


4. Reboot

And enjoy.


References

(all accessed on July 19, 2012)

http://www.insanelymac.com/forum/index.php?showtopic=114349

https://discussions.apple.com/thread/3175514?start=0&tstart=0

http://www.macbreaker.com/2012/01/how-to-fix-mac-app-store-error-your.html