Skip to content

Mac OS X Admin tips and tricks

Personal notes that maybe can be beneficial to others. Use them as they are and please think before you execute any commands you may find here.

ARD

The other day I found my self locked out of ARD (Apple Remote Desktop), while lucky I had a SSH service running on my box, so I SSH’ed in to my machine and executed the following:

<code>sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -configure -allowAccessFor -allUsers -configure -restart -agent -privs -all
</code>

http://ss64.com/osx/kickstart.html

SMB

New statshares Option in the smbutil command For OS X 10.9 Mavericks which also works with Yosemite.

In OS X 10.9 Mavericks, a new option for smbutil appears: statshares. The statshares option has an -m option to look at a mount path for showing the path to the mount (e.g. if the mount is called krypted this should be something like /Volumes/krypted):

<code>smbutil statshares -m /Volumes/krypted</code>

When run, you see a list of all the attributes OS X tracks for that mount path, including the name of the server, the user ID (octal), how SMB negotiated an authentication, what version of SMB is running (e.g. SMB_1), the type of share and whether signing, extended security, Unix and large files are supported.
Additionally, if you’d like to see the attributes for all shares, use the -a option after statshares:

<code>smbutil statshares -a</code>

Overall, this is a nice health check type of verb to the smbutil command that can be added to any monitoring or troubleshooting workflow.

hdiutil

I sometimes find my self wanting to convert a sparsebundle or sparseimage to a dmg or vice versa. This can be done using hdiutil

hdiutil convert -format <format> -o <output-file> <input-file>

Format can be the following:

  • Image Formats:
    UDRO – read-only
    UDCO – compressed (ADC)
    UDZO – compressed
    UDBZ – compressed (bzip2)
    ULFO – compressed (lzfse)
    UFBI – entire device
    IPOD – iPod image
    UDxx – UDIF stub
    UDSB – sparsebundle
    UDSP – sparse
    UDRW – read/write
    UDTO – DVD/CD master
    DC42 – Disk Copy 4.2
    RdWr – NDIF read/write
    Rdxx – NDIF read-only
    ROCo – NDIF compressed
    Rken – NDIF compressed (KenCode)

 

Published inAppleServer ServicesTroubleshooting

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *