MarcoMC Tech, Cuisine, Traveling…my hobbies, my life

August 27, 2010

How-To change hostname in Mac OS X Server Snow Leopard with scutil

Filed under: Apple & Mac,How-To,IT — Tags: , — marcomc @ 10:05

scutil provides a command line interface to the “dynamic store” data maintained by configd. [from the scutil manual]

sudo scutil --set HostName hostname[.domain]

if the domain is not specified the hostname will be automatically configured as .local

August 19, 2010

Snow 303 Notebook

Filed under: Apple & Mac,IT — Tags: , , , , , , , — marcomc @ 19:25

My personal notebook made in preparation for the Snow 303 exam for the Apple Certified Specialist – Security and Mobility 10.6 certification on Mac OS X Server 10.6 Snow Leoaprd.

Mac OS X Mobility and Security v10.6

This notebook can be used complementary to the book Mac OS X Security and Mobility v10.6 by Robert Kite, Ph.D., Michele Hjörleifsson, and Patrick Gallagher published by Peachpit Press.

June 2, 2010

How-To backup and restore cydia packages

Filed under: Apple & Mac,How-To — Tags: , , , , — marcomc @ 15:32

When upgrading the iPhone or iPad firmware, if you own a jailbroken iDevice, you may want to make a backup of the list of installed Cydia (deb) packages to be able to perform a bulk installation of them after the firmware upgrade and jailbreak.

This procedure come from, and is suitable for, any deb (apt) unix system that need a bulk installation of packages, usually for deployment purposes, i.e. Mac OS X configured with Fink, GNU/Debian based Linux distributions like Ubuntu probably the ANDROID mobile phones too.

The following procedure will show you the necessary command-line instruction necessary to backup and restore the list of current installed packages on Cydia, please mind that the configuration of the installed packages will not be preserved, you need to follow other instruction to backup and restore your personalised configurations:

  1. Before upgrading or restoring the device firmware login to the console of you iPhone or iPad via a terminal application, possibly from an external computer and issue the following command:
    dpkg –get-selections > packages_list.txt
  2. Save the packages_list.txt file (and your packages personalised configurations) in an external location like your computer or a web site and then you can perform the upgrade or restore of the device firmware.
  3. After the iPhone has been reinstalled and jailbroken update the Cydia sources and then install OpenSSH to be able to remotely connect the the device in command-line.
  4. Copy the file packages_list.txt to the iPhone or iPad and from the console issue the following commands (you can copy and paste):

    apt-get update;
    dpkg –set-selections < packages_list.txt;
    apt-get -u dselect-upgrade;
    rm /private/var/mobile/Library/Caches/com.apple.mobile.Installation.plist;
    killall SpringBoard
  5. Restore your package personalised settings according to the backup method you used to save them.

May 23, 2010

Resetting the Firewall to the Default Setting in Mac OS X Server 10.6

A server can become unreachable for remote administration due to an error with the firewall configuration. In such a case, you must reset the firewall to its default state so Server Admin can access the server.

This recovery procedure requires you to use the command-line interface and must be done by an administrator who has physical access to the server.

To reset the firewall to its default setting:

  1. Disconnect the server from the Internet.
  2. Restart the server in single-user mode by holding down the Command–s keys during startup.
  3. Remove or rename the address groups file found at /etc/ipfilter/ip_address_groups.plist.
  4. Remove or rename the ipfw configuration file found at /etc/ipfilter/ipfw.conf.
  5. Force-flush the firewall rules by entering the following in Terminal:
  6. $ ipfw -f flush
  7. Edit the /etc/hostconfig file and set IPFILTER=-YES-.
  8. Complete the startup sequence in the login window by entering exit:
    the computer starts up with the default firewall rules and firewall enabled. Use Server Admin to refine the firewall configuration.
  9. Log in to your server’s local administrator account to confirm that the firewall is restored to its default configuration.
  10. Reconnect your host to the Internet.

Dead Men’s Switch with OS X Server

Filed under: Apple & Mac,IT — Tags: , , , , — marcomc @ 13:28

Dead men’s switch (name taken from the railroad industry) is a technique you can use to protect yourself against accidental lockout while configure firewalls.

A dead men’s switch enables a service but allows the administrator a temporary backdoor to remediate a temporary lockout.

i.e. on Mac OS X Server 10.6 Snow Leopard with bash in command line:

# sudo ls; sleep 90; sudo serveradmin start ipfilter; sudo server admin stop ipfilter

this process will enable the firewall and automatically disable the firewall in 90 seconds.

May 19, 2010

Snow 301 Notebook

Filed under: Apple & Mac — Tags: , , , , — marcomc @ 14:37

My personal notebook made in preparation for the Snow 301 exam for the Apple Certified Specialist – Directory Services 10.6 certification on Mac OS X Server 10.6 Snow Leoaprd.

Mac OS X Directory Services v10.6

This notebook can be used complementary to the book Mac OS X Deployment v10.6 by Arek Dreyer and Ben Greisler published by Peachpit Press.

April 16, 2010

Snow 302 Notebook

Filed under: Apple & Mac — Tags: , , , , — marcomc @ 12:01

My personal notebook made in preparation for the Snow 302 exam for the Apple Certified Specialist – Deployment 10.6 certification on Mac OS X Server 10.6 Snow Leoaprd.

Mac OS X Deployment v10.6

This notebook can be used complementary to the book Mac OS X Deployment v10.6 by Kevin M. White published by Peachpit Press.

April 13, 2010

SIU: Apply Computer Name and Local Hostname settings from a file

Filed under: Apple & Mac,IT — Tags: , , , — marcomc @ 04:14

Configuring a System Image Utility (SIU) Workflow you can include the Apply System Configuration Settings action.

This action includes few options, the most puzzling one is the one titled “Apply Computer Name and Local Hostname settings from a file” as there is no indication how the file should be formatted to be correctly interpreted by the workflow.

You can find a thread on the Apple Support page with few people discussing about it, there you will understand that the file format is composed by TAB separated elements in a mandatory order.

The order is MAC Address, hostname (fqdn or not), Computer name (optional), Bonjour name (optional).
If you don’t want to set a specific hostname, you can use -automatic- to “bypass” it.
The file content (plain text or Rich Text Format) will appear like:

00:2c:76:8d:28:3b -automatic- Computer 1 Computer 1
00:2c:76:8d:28:2b -automatic- Computer 2 Computer 2
00:2c:76:8d:28:1b -automatic- Computer 3 Computer 3

March 5, 2010

Snow 201 Notebook

Filed under: Apple & Mac — Tags: , , , — marcomc @ 14:04

My personal notebook made in preparation for the Snow 201 exam for the ACTC 10.6 certification on Mac OS X Server 10.6 Snow Leoaprd.

Mac OS X Server Essentials v10.6

This notebook can be used complementary to the book Mac OS X Server Essentials v10.6 by Arek Dreyer and Ben Greisler published by Peachpit Press.

February 17, 2010

Snow Leopard 64-bit kernel mode: secret disclosed

Filed under: Apple & Mac — Tags: , — marcomc @ 14:13

for the people who knows what a Command Line Interface is this is the command to startup automatically your Intel Core 2 Duo Mac (with EFI64 boot loader) in 64-bit mode

sudo systemsetup -setkernelbootarchitecture x86_64

or return to 32-bit mode

sudo systemsetup -setkernelbootarchitecture i386

Good for Mac Mini servers (EFI64 only) where a keyboards not connected and it’s not possible to press the ‘6’ and ‘4’ strokes at startup time.

« Newer PostsOlder Posts »

Powered by WordPress