Quick little script to read the length of a string: #!/bin/bash echo "Enter some text"read mytextlength=${#mytext}echo $length
-
-
Backup A Mac With Acronis True Image
Acronis True Image is a cloud-based backup solution. Acronis True Image is available at https://www.acronis.com/en-us/support/trueimage/2018mac/. To install, download it and then open the zip. Drag the Acronis True Image application to your /Applications directory. Then open Acronis True Image from /Applications. The first time you open it, you’ll be prompted to access the licensing agreement. Once accepted, you’ll be prompted to create an account with Acronis. Provide your credentials or enter new ones to create a trial account. At the activation screen, provide a serial or click Start Trial.At the main screen, you’ll first want to choose the source (by default it’s the drive of the machine) and then click on the…
-
Export data from Open Directory for migrating users and groups
Before we have this conversation, I want to give you some bad news. Your passwords aren’t going to migrate. The good news is that you only do directory services migrations every decade or two. The better news is that I’m not actually sure you need a directory service in the traditional sense that you’ve built directory services. With Apple’s Enterprise Connect and Nomad, we no longer need to bind in order to get Kerberos functionality. With MCX long-dead(ish) you’re now better off doing policies through configuration profiles. So where does that leave us? There are some options. On Prem Active Directory. I can setup Active Directory in about 10 minutes.…
-
Episode 73 of the MacAdmins Podcast: Graykey and Securing iOS
-
Skip that privacy screen in MacOS
There’s a new MDM option to skip the privacy screen at setup for Mac. But, you can also skip that screen programmatically. Do so by sending a DidSeePrivacy boolean key into com.apple.SetupAssistant. This could be done via an MDM or through a simple defaults command, as follows: defaults write com.apple.SetupAssistant DidSeePrivacy -bool TRUE Note: Since writing this, Rich Trouton has published a script that includes the other options at https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/disable_apple_icloud_data_privacy_diagnostic_and_siri_pop_ups.
-
Lecture Your Sudoers
/etc/Sudoers is a file that controls what happens when you use sudo. /etc/sudo_lecture is a file that Apple includes in macOS that tells your users that what they’re about to do is dangerous. You can enable a lecture, which will be displayed each time sudo is invoked. To turn on the lecture option in sudo, open /etc/sudoers and add the following two lines (if they’re not already there): Defaults lecture=alwaysDefaults lecture_file = “/etc/sudo_lecture” Then save the file and edit /etc/sudo_lecture. Apple has kindly included the following Warning: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when…
-
New Page Explaining Apple MDM Even Further
Apple has published a new page that goes through all of the settings and commands available via MDM and explains many in much more detail. This is available at http://help.apple.com/deployment/mdm/. The new guide is a great addition to the work @Mosen has done at https://mosen.github.io/profiledocs/ in terms of explaining what each setting, command, and payload do. And let’s not forget the definitive MDM protocol reference guide, available at https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/1-Introduction/Introduction.html#//apple_ref/doc/uid/TP40017387-CH1-SW1. Overall, I’m excited to see so much information now available about MDM, including how to develop an MDM properly, what each setting does, and now what you should expect out of an MDM!
-
Apple Business Manager Documentation Publicly Available
Hey, who knew that the developer documentation for Apple Business Manager would be made publicly available? It’s at https://beta.business.apple.com/static/docs/beta.pdf. Or if it gets taken down, at Apple Business Manager Documentation. Note: I saw this pop up in like 4 different places. If anyone knows who I can attribute for realizing it was publicly available, please let me know so I can!
-
Install and Use Homebrew on macOS
Homebrew is a package manager for macOS. You can use Homebrew to install command line packages on a Mac, provided someone has written a formulae, which is a simple Ruby script that walks through the process for installing all the little bits required for a piece of software. Installing Homebrew is simple. Run the following command which is listed on the Homebrew homepage (not as root): /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" This will install the macOS Command Line Tools from Xcode as well as create the following directories (if they’re not already present): /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var Then the script will move all the required bits…
-
Move DHCP Services from macOS Server to Synology
The first step to moving services from macOS Server for pretty much all services is to check out the old settings. The second step is to probably ask if where you’re going to put the service is a good idea. For example, these days I prefer to run DHCP services on a network appliance such as a Synology. And so let’s look at how to do that. Here, we’ll use the serveradmin command to view the settings of the DHCP service: /Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin settings dhcp The output is an array of subnets with different settings per subnet. dhcp:static_maps = _empty_arraydhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_primary_server = ""dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_router = "10.15.40.1"dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:WINS_secondary_server = ""dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:net_range_start = "10.15.40.2"dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:net_range_end = "10.15.43.253"dhcp:subnets:_array_id:22217FF5-4DDB-4841-A731-EF5DA080E672:dhcp_domain_name =…