Posts Tagged ‘macos’

Chrome and Brave – Your connection is not private.

Here a nice trick to get around the seemingly impossible “Your connection is not private” page when you try to access a site with a self signed certificate. I really don’t understand why nobody comes up with a better way to deal with this. We need the transport on our LANs to be encrypted using https. It should be easier to get this done.

Anyway, this is how you get the screen:

This applies to the “Your connection is not private” that has the “NET::ERR_CERT_INVALID” message in it.

Click anywhere on the background of the page, and type “thisisunsafe” and hit Enter. Then, you will proceed to site.

Note: This happens in MacOS, and I seen this is the latest versions of Chrome on linux.

Adding a static routes in MacOS Mojave

To add a permanent static route in MacOS Mojave, open up a terminal session.

List all of your available network services. Services really just seem to be aliases for network interfaces.

$ sudo networksetup -listallnetworkservices
An asterisk (*) denotes that a network service is disabled.
USB-Serial Controller D
iPad USB
iPhone USB
Wi-Fi
Bluetooth PAN
Thunderbolt Bridge

You will be adding the route to a service, therefore, you will need to know which service to apply the route to.

In my case, I wanted to add the route to my wireless interface:

$ sudo networksetup -setadditionalroutes Wi-Fi network-destination destination-mask gateway-to-use
$ sudo networksetup -setadditionalroutes Wi-Fi 10.1.1.0 255.255.255.0 192.168.0.254

List all of your current routes:

$ sudo networksetup -getadditionalroutes Wi-Fi
10.1.1.0 255.255.255.0 192.168.0.254

To remove static routes from a network service just remove the parameters from the command you used to set the route:

$ sudo networksetup -setadditionalroutes Wi-Fi

Minicom + Ativa USB to serial adapter on a Macbook

Well, I finally broke down and went for a USB to serial adapter, because I was getting tired of creating computer rooms hazards by running console cables into the back of servers with serial ports. And I have had to do this quite a bit lately. My primary mobile desktop is an old MacBook (early 2008) running Mavericks.

I bought an Ativa adapter from Office Depot. The key to getting it work, is to make sure you use the correct driver. The Ativa adapter was easy. I downloaded the driver from http://nozap.me/driver/osxpl2303/index.html/. I downloaded NoZAP-Pl2303-10.9-installer.dmg, since I am running Mavericks. I mounted the DMG, and the ran the package in the mounted DMG.

Then, I downloaded and installed minicom from: http://pbxbook.com/other/mac-tty.html#minicom.

The next issue is finding the correct device file. My first guess at a newly created tty file in /dev did not work. Next time, I looked a little closer and found a file called usbserial. Too obvious.

I launched the minicom setup:

/opt/minicom/current/bin/minicom -s

Then, configure and save the configuration as outlined in http://jim-zimmerman.com/?p=916, except use /dev/usbserial for the serial device file. Permissions and Terminal settings were fine. I didn’t have to change them from the defaults.

Now, I can use my laptop to access my Cisco equipment.

How to create a Mavericks bootable USB drive.

I really don’t understand why Apple makes somethings so difficult for users. Since, Apple no longer distributes their OS upgrade installation media and they have no made an ISO/DMG easily available, we have had to figure out different ways to create a bootable media. For Lion and Mountain Lion it was pretty simple once you figured out how to find the DMG buried in the installation application. For Mavericks, it is different. You can find the DMG in the package, but using the same method does not produce a bootable media. Instead, you have to use createinstallmeda which is a program buried in the installation package.

You must be root to execute the program, so you su or sudo to gain root privileges. The volume is the name of you USB drive. It takes while to to create, but does work.

# /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia –volume /Volumes/SanDisk –applicationpath /Applications/Install\ OS\ X\ Mavericks.app –nointeraction
Erasing Disk: 0%… 10%… 20%…100%…
Copying installer files to disk…
Copy complete.
Making disk bootable…
Copying boot files…
Copy complete.
Done.

Here is the help output:

Usage: createinstallmedia –volume –applicationpath [–force]

Arguments–volume, A path to a volume that can be unmounted and erased to create the install media.
–applicationpath, A path to copy of the OS installer application to create the bootable media from.
–nointeraction, Erase the disk pointed to by volume without prompting for confirmation.

Example: createinstallmedia –volume /Volumes/Untitled –applicationpath /Applications/Install OS X Mavericks.app

Change a MacOS icon.

Annoyed by a link to an application that has the wrong icon? This is one of those things that seems so obvious once you do it, but you just don’t think to try it. Note: when I say “select”, I mean just click on it once. Also, when I say “menu”, I mean the one at the very top of your screen (Apple menu?). Get Info is usually under the File option.

Find something with the icon you want and select it.

From the menu, click on Get Info.

Select the icon in the top left corner, and hit Command+C.

Select the link you want to change.

From the menu, click on Get Info.

Select the icon in the top left corner, and hit Command+V.

Remove dead Favorites in Finder (MacOS)

Picked up a nefty little trick to remove those pesky Favorites in Finder that are dead. The ones you click on and nothing happens. Well, to get them back, you need to restablish the connection to the share/folder and drag them to your Favorites. However, sometimes this does not fix the dead ones. To remove those, hold down option+command and drag the dead Favorite to the Trash.

Disabling Gatekeeper in MacOS Mountain Lion

Well, it didn’t take long. I needed to install opensource software that is not in App Store. Goodbye Gatekeeper. I definitely don’t this direction Apple is taking with MacOS.

Go to System Preferences and select Security & Privacy.

If locked, unlock to make changes and enter your password.

Under “Allow applications downloaded from:”, select Anywhere.

Click “Allow From Anywhere” to acknowledge that you could be making your computer less secure.

Lock Security & Privacy.

MacOS – modify hostname from Terminal.

You can use the scutil command to change the hostname of a MacOS computer.

$ hostname
mycomputer.domain.com

$ sudo scutil –set HostName mynewcomputername.domain.com
$ hostname
mynewcomputername.domain.com

Likewise, you can change the ComputerName variable too:

$ sudo scutil –set ComputerName mynewcomputername.domain.com

How to create an ISO image from a CD/DVD in MacOS

I needed to create an ISO image from a CDR in MacOS Lion. Here is how I was able to do it:

Insert the CD.

Open the Disk Utility.

Click on the mounted CD in the Disk Utility.

Click New Image.

Select “DVD/CD master” for the Image Format.

Encryption: none.

Click Save.

This will create MacOS compatible .cdr image. To convert this image, so that it is Windows/Linux compatible:

Open Terminal and navigate to where you create your .cdr image.

Enter the following command:

hdiutil makehybrid -iso -joliet -o filename.iso filename.cdr

MacOS display network interface configuration (command line)

To display the network interface information for a particular network interface in Snow Leopard (not sure about other versions) use the following:

ipconfig getpacket interface

For example,
# ipconfig getpacket en0
op = BOOTREPLY
htype = 1
flags = 0
hlen = 6
hops = 0
xid = 446704316
secs = 0
ciaddr = 172.18.32.24
yiaddr = 172.18.32.24
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = 0:1e:c2:f:1b:45
sname = dhcp.domain.com
file =
options:
Options count is 8
dhcp_message_type (uint8): ACK 0x5
server_identifier (ip): 172.18.10.45
lease_time (uint32): 0x15180
subnet_mask (ip): 255.255.0.0
router (ip_mult): {172.18.10.1}
domain_name_server (ip_mult): {172.18.10.65, 172.18.10.66}
domain_name (string): domain.local
end (none):

This gives you much more information than a standard ifconfig command. The command above will display all the current options for the interface. You can narrow this down with the getoption parameter.

Return top

INFORMATION