Tools that leverage the Xcode Command Line Tools might have a problem if you install the tools without agreeing to the license. Here, you can see IntelliJ complaining about just that: To agree to the license agreement, you can use xcrun along with the cc verb: sudo xcrun cc This is an interactive command line environment so in order to script it you’d need to use expect to feed in the correct parameters.
-
-
Mac Network Commands Cheat Sheet
After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and stay salty. Get an ip address for en0: ipconfig getifaddr en0 Same thing, but setting and echoing a variable: ip=`ipconfig getifaddr en0` ; echo $ip View the subnet mask of en0: ipconfig getoption en0 subnet_mask View the dns server for en0: ipconfig getoption en0 domain_name_server Get information about how en0 got its dhcp on: ipconfig getpacket en1 View some network info: ifconfig en0 Set en0 to have an ip address of 10.10.10.10…
-
Network Port Testing With Netcat
You can do some pretty simple testing of ports and network communications using strategies I’ve outlined in the past with tcpdump, trace route, telnet, curl, stroke and of course ping. However, netcat has a few interesting things you can do with it; namely actually run a port super-quickly to test traffic between subnets, forcing scans of ipv6 traffic, debugging sockets, keeping connections alive, parodying through SOCKS 4 and 5 and just checking for daemons that are listening rather than actually sending data to them. In this first example, we’re going to just check that Apple’s web server is accessible (adding -v for verbose output): /usr/bin/nc -v www.apple.com 80 The result would be pretty verbose…
-
Make iMovie Work With Network Volumes
I work with a lot of network storage and video world stuff. While most in the editorial world prefer FinalCut, Avid, Adobe and other tools for video management, I do see the occasional task done in iMovie. By default, iMovie doesn’t support using assets stored on network volumes. However, you can make it. To do so, just use defaults to write com.apple.iMovieApp with a boolean allowNV key marked as true: defaults write com.apple.iMovieApp allowNV -bool TRUE
-
DeviceScout
DeviceScout is a tool that leverages JAMF’s Casper Suite to show administrators vital statistics and show alerts on client systems. These alerts display some of the critical aspects of systems, from encryption to disk capacity to backups, there are a number of pretty cool aspects of DeviceScout. Using the device view, you can view serial numbers, device types, check-in status, boot volumes, memory, etc. It’s a lot of insight into what you have on your systems. I’m a huge fan of such visibility. You will need to be running Casper to leverage DeviceScout, but it provides a very simple interface for management and even techs to see what’s going on…
-
Password Hints and Retries in OS X
You can customize the number of times that you enter an incorrect password before you get the password hint in the loginwindow on OS X. To do so, use the defaults command to send a RetriesUntilHint integer key into com.apple.loginwindow.plist stored at /Library/Preferences using the following command: defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -integer 10
-
Install Fonts Using Apple Configurator
I guess someone asked for it, although it wasn’t me… But you can install fonts on Apple devices, using Apple Configurator. To do so, first open Apple Configurator and click on an existing profile or create a new profile for the font installation. Scroll down in the list along the left sidebar until you see Font. Click on Font and then click on Configure. You are then presented with a dialog box to select a font file. Browse to the font you’d like to deploy and then click on Select. Click on the plus sign (+) in the upper right corner of the screen if you’d like to deploy more…
- iPhone, Mac OS X, Mac OS X Server, Mac Security, Mass Deployment, Microsoft Exchange Server, Network Infrastructure, Ubuntu, Unix, VMware
Quick nmap Hacks
The nmap application is a pretty easy-to-use tool that can be used to port scan objects in a network environment. To obtain mmap in an easy-to-use package installer, for OS X check out the download page at http://nmap.org/download.html#macosx (use the same page to grab it for Windows or *nix as well). Once downloaded run the package/rpm/whatever. Before I scan a system, I like to pull the routing table and eth info to determine how scans are being run, which can be run by using the mmap command anong with the —iflist option: nmap —iflist Basic Scanning To then scan a computer, just use the mmap command followed by the host…
-
Disable Swap Files In OS X
Every now and then I need to reclaim that space in /var/vm or I need to stop a process from paging to swap files while I’m troubleshooting something else. I in no way endorse disabling swap files (which basically kills using swap files as a part of your overall virtual memory) for extended periods of time. However, it has saved me in the case of stability concerns long enough to get a system patched or something like that. To disable OS X swap files, all you need to do is stop the com.apple.dynamic_pager daemon and restart. Use launchctl to stop: sudo launchctl unload -wF /System/Library/LaunchDaemons/com.apple.dynamic_pager.plist Once restarted, you may need…
-
Easily Restore OS X To A Default Set Of Fonts
If you have corrupt fonts or install too many fonts in OS X you may find that applications load slowly or that menus can’t load properly. To fix, you may find the easiest path, rather than attempting to remember what the last font you used was, is to restore OS X to the default set of fonts installed with the OS installation. To do so, check out fontrestore. This handy little command uses the fontmover tool to move fonts from in /Library/Fonts, /System/Library/Fonts, and ~/Library/Fonts and to directories that say (Removed) at the end of the name. To run, simply run fontrestore with the default option: fontrestore default You’ll then…