Tag Archives: Apple

Mac OS X Mac OS X Server Mac Security

See How Long The Active User Has Logged In On A Mac

The following will grab you an integer of the number of hours an active user has logged into a computer:

user=$( ls -l /dev/console | awk '{ print $3 }' ) ; ac users $user | awk '{ print $2 }'

 

Mac OS X

Quick-Tip: Menu Items Modifier Keys In OS X

A modifier key is a key that when held in combination with another key, causes a unique behavior. For example, Command-c copies highlighted data to your clipboard. The Finder modifier keys are pretty well documented. But a number of menu items support modifier keys as well. For example:

  • Click on the Dropbox item in your menu, you’ll be able to see the status of files that have sync’d as well as a cogwheel with the typical settings for an app like Dropbox. Option-click on the Dropbox menu item, you’ll see the items under the cogwheel menu.
  • Option-click the Wi-Fi menu item to see extended Wi-Fi information.
  • Option-click Bluetooth, you’ll see version and MAC address information for your bluetooth interface (note that the extended options are usually greyed out/informational).
  • Option-click on the sound menu item and you can switch input and output devices (these extended options are actually shown as you can switch between things).
  • Option-click AirPlay and you get, well, the same menu. So not all support extended information and options.
  • Option-click Go to see Library.
  • Option-click the Menu menu to see shift modifier keys to access All options (this actually works on a lot of menus such as Finder, File and Edit, but even within some apps).
  • Option-click on the Notifications menu item and you disable Notification Center.

Screen Shot 2014-12-01 at 8.15.03 PM

But my favorite, for Apple apps, if you command-click on items, you can just drag them out of your menu. This saves you from firing up System Preferences and unchecking the box to remove them from the menu.

personal

What A Morning!

It’s a random Friday morning. I wake up ready to work and the radio on my AirPort stops working. I reset the device, do everything I know to do, but there is no SSID, no radio signal whatsoever. What to do? String a cable across the room so that it can get ripped out of a computer when the crazed, six year old invariably streaks through the office having watched Power Rangers and looking to chop me into pieces? Not a chance. I’ll just run out to the closest Apple store and grab a quick replacement.

So I hop in the car and drive to the mall. What is going on with parking? I finally find a spot out in no-mans-land, but wait – an 80-something year old woman in a brand new red Civic swings in front of me, practically clipping my bumper to steal my spot hanging me a bird and yelling “here’s my Holiday cheer” in the process. Wow. Wait, did that middle fingernail really have a picture of Santa painted on it?!?! Suburbs…

There’s another spot a little further out, but wait – again my life is put in danger! This time by a car load of 40-something year old women with shorter in the back than in the front, some with a little spike action in the back but all with at minimum two colors in their hair and at least 5 shades between them – which is less shades than the stitches on their bejeweled jean pockets… After wondering whether my car would fit in the back of their Yukon, I think I’ll find another spot!

After a quick scan, much akin to a running back trying to figure out where that linebacker and free safety are, I see a carload of nuns and orphans, with hate and fear in their eyes, about to take a spot. I slam on the gas, flip right in front of them and gently rest my car between those beautiful golden lines. I hear a scream as their tires scream to a halt and see poor Tiny Tim’s face writhe as his crutch smacks him in the back of his head, knocking him out cold; but I am finally in a spot, after at least 15 minutes of searching and at least 2 near death incidents. As I sit, heart pounding, I wonder at how I was able to get caught up in the craziness. But more importantly, what is the craziness about?

I exit the car and start making my way towards the mall entrance. After traversing the distance of a marathon, with a group of nuns seemingly chasing behind (my time was 3 hours and 2 minutes, theirs 3 hours and 1 minute – but they were slowed up by Tiny Tim until they left him behind) I finally approach the door of the mall. Just then, the Salvation Army guy pounces from behind a column, ringing the Vorpal bell so loudly that I can see the sound waves approaching and feel the 1d6+5 hit points of damage they do inside my temples. I pull a spin move, stiff arm his bucket dropping a buck in there and while I have no idea how he’s made it this far, this fast I see Tiny Tim lunging at me from my periphery. Recalling all those Georgia games, I hurdle Tim in a manner that Knowshown Moreno would be proud of and fall into the door of the mall, feeling the warmth already thawing out my semi-frost bitten feet. I sigh.

But just then I see a shopping cart barreling down on me at a break-neck pace. I roll away just in time and see who I guess to be Large Marge from Pee-Wee’s Big Adventure wearing a bedazzled Green Bay Packers sweater and shrieking with laughter. Before I can contemplate what in tarnation is wrong with people the group of nuns flings the door open just behind me, with a bloody stump of an arm still clasping his bell waving over their heads. They lock their eyes on me and hurl the stump in my direction. I sprint into the mall, juking right, then left and then an old school swim move to get past the thin, pale, faux-hawk toting/director glasses wearing college kid who for some reason is foaming at the mouth and snarling at me. Once past, I look back and see him lock onto the nuns. I smile just as he gets beamed in the head with that bell arm. I can’t help but think, maybe the Cowboys should bring her in to replace Romo… (too soon, I know).

Like a northstar, I see the Apple logo over the heads of seemingly rioting hipsters. The skinny jeans apparently got so tight, they’ve cut off circulation to those Fluevog-laden feet. There isn’t a pair of uncracked Gucci glasses amongst them as these lumbersexuals (it is Movember ya’ll) battle it out for who gets to complain about the coffee at the Caribou in the middle of the mall. I get an idea! I pull the crossbow from my computer bag (you do take a crossbow everywhere, right?!?!), rip the knit cap from one of the hipsters, tie a piece of yarn to my bolt and fire it just right, so the yarn unravels as the bolt loops through all the gaged earholes tying them together  and parting hipster beards like the red sea. At last, the Apple store is in sight.

I see a father with his 3 children sitting on the floor eating ice cream. They are sitting in an aura of protection in front of the Apple Store. There is a nice young lady at the door of the Apple Store. As I cross the threshold of the store I notice the number of people inside. The nuns, Large Marge, the ladies from the Yukon, Tiny Tim (apparently he found a supercharged wheelchair and changed his name to Timmy 2000 – TIMMMAAAAAAHHHHHGGGG!!!!) and the poor one armed Salvation Army guy approach but slam into what is apparently a force field against crazy surrounding the Apple Store. Boob, relief!

I move to the back of the store, passing the Geico lizard, peaking from behind the genius bar (that would explain the angry cavemen in True Religions and a Favre jersey hovering outside the store). There, I see the AirPort that I am there for. But no, I have a question. Crap. It’s busy. A nice young lady (another nice young lady – after all the crazy it’s kinda’ hard to believe) approaches and asks if I need anything, seeing the furrow in my brow – or am i perma-furrowed?). Why yes, I respond. She knows more than someone her age should about 802.11ac but alas not the answer to my question, but wait here, I’ll be right back. Ya’ right?!?! Within a few seconds she appears again, with another nice young lady who actually does know the answer to my question. Well good grief, I guess I should get two of them then… She swipes my card, gives me a bag with my schwag in it and actually gives me the small business discount, apparently having remembered me from a previous ACN event. Wow.

I look back at the door with the forcefield, Large Marge (now armed with a curtain rod from Macy’s, Tiny Tim (now armed with a bolo made from Bang and Olufsen speakers and speaker-wire), the Nuns (wielding torches made from burning t-shirts from Spencer’s) and of course the now one armed Salvation Army guy wielding fugly fashion victim white sunglasses from Louis Vitton with tight, pegged $900 jeans and a monotone rasta hat that makes Bob Marley roll over in his grave. I know I will survive though, as Apple has called in Bruce Campbell to escort us all to our cars. Finally, I think to ask. What is wrong with people today? Ash looks down at me and asks “what is wrong with you people, going to the mall on Black Friday?!?!”

I didn’t know what I was getting into. I just needed an AirPort. On Black Friday I was able to walk into the Apple Store at Rosedale Center and in less than 15 minutes, walk out the door with what I needed. The only good experience in the whole mall – even on Black Friday! Kudos to you Apple and to the whole team at Rosedale. Wait, I forgot, I needed a new Apple TV. I should go back in…

iPhone Mac OS X Mac OS X Server Mac Security

MacVoices Podcast With Chuck Joiner About The New Take Control Of OS X Server Book!

Yay, podcasts! Chuck Joiner was kind enough to have me on MacVoices. We did a show, now available at http://www.macvoices.com/macvoices-14223-charles-edge-helps-take-control-os-x-server

Or if you’d like to watch on YouTube or inline:

http://youtu.be/AeccoRqIrgc

Articles and Books Mac OS X Mac OS X Server Mac Security Mass Deployment

My Take Control Of OS X Server Book Now Available!

Thanks to all the awesome work from Adam and Tanya Engst, Tidbits announced today that my Take Control of OS X Server is now available! To quote some of the Tidbits writeup:

Some projects turn out to be harder than expected, and while Charles Edge’s “Take Control of OS X Server” was one of them, we’re extremely pleased to announce that the full 235-page book is now available in PDF, EPUB, and Mobipocket versions to help anyone in a home or small office environment looking to get started with Apple’s OS X Server.

As you’ll likely remember, we published this book chapter by chapter for TidBITS members, finishing it in early September (see “‘Take Control of OS X Server’ Streaming in TidBITS,” 12 May 2014). Doing so got the information out more quickly, broke up the writing and editing effort, and elicited reader comments that helped us refine the text.

Normally, we would have moved right into final editing and published the book quickly, but from mid-September on, our attention has been focused on OS X 10.10 Yosemite, iOS 8, and our new Take Control Crash Course series. We were working non-stop, and while we wanted to release “Take Control of OS X Server,” we felt it was more important to finish the books about Apple’s new operating systems for the thousands of people who rely on Take Control for technical assistance.

During that time, we had the entire book copyedited by Caroline Rose, who’s best known for writing and editing Inside Macintosh Volumes I through III at Apple and being the editor in chief at NeXT. Plus, we went over the book carefully to ensure that it used consistent terminology and examples, optimized the outline, and improved many of the screenshots.

The main problem with this delay was that Apple has now updated OS X Server from version 3.2.2 (Mavericks Server, which is what we used when writing the book) to 4.0 (Yosemite Server, which is all that works in Yosemite). Updating the book for Yosemite Server would delay it even longer. Luckily for us, veteran system administrators say that you should never upgrade OS X Server on a production machine right away. And even luckier, the changes in Yosemite Server turn out to be extremely minor (a sidebar in the Introduction outlines them), so those who want to get started now can use the instructions in the book with no problem. It’s also still possible to buy Mavericks Server and install it on a Mac running Mavericks, as long as you have the right Mac App Store link from the book. We are planning to update the book for Yosemite Server (which mostly involves retaking screenshots and changing the “mavserver” name used in examples) in early 2015 — it will be a free update for all purchasers.

Screen Shot 2014-11-24 at 7.59.44 PM

You can find out more about the book at http://www.takecontrolbooks.com/osx-server. An update will be due out in early 2015, so stay tuned for more!

Bushel iPhone Mac OS X Mac OS X Server Mac Security Mass Deployment Minneapolis

Bushel: The Device Enrollment Program (DEP) In Action

Apple’s Device Enrollment Program (DEP for short) allows you to automatically setup devices with the settings you need on devices that your organization purchases. In Bushel, we give you the ability to link an Apple DEP account up with your Bushel account. This allows devices to add themselves automatically to your Bushel when the devices are activated. We tend to think this is the coolest thing since sliced bread and so we want to make sure you know how to use the feature.

Setup Device Enrollment Program in Bushel

To get started, log into your Bushel and click on Devices. Here, click the button for Device Enrollment Program.

XcKrpO-M0gXF27l0exLKtVbNMLdI1itn8ThiXRqW3xQ

Download your certificate and go to deploy.apple.com and log into your Device Enrollment Program account. Click on Manage Servers in the Deployment Programs sidebar.

Screen-Shot-2014-10-14-at-2.12.49-PM

Next, click on Add MDM Server and provide the certificate we gave you and a name. Once Bushel has been added to your Device Enrollment Program (DEP) account, click on Assign by Serial Number to add your first device. Assuming the device is part of your DEP account, enter the serial number for the device and choose which server (the one you just added) that the device should reach out to on activation to pull settings from.

Screen-Shot-2014-10-14-at-2.13.53-PM

Once you’ve added the server, you’ll be greeted by a screen that says Assignment Complete. You can now wipe the device and upon reactivation the device will pull new settings from your Bushel.

Screen-Shot-2014-10-14-at-2.13.58-PM

The Device Enrollment Program in Bushel

Click OK and you can add more devices. Once your devices are added into the Apple DEP portal they will automatically appear in the DEP screen of your Bushel. Click on a device to assign a username and email address, if you will be using email.

xdWSZrVkYs6wWHgmzfmdkOdmZjSXVMDqrypOkqCaC3w-1

Good luck!

Bushel

Bushel Interview with Tech.mn

Slowly but surely information about what I left 318 to do has been leaking out. And I wouldn’t say leaking. More like being broadcast to the world. I’ve worked on a few little things here and there at JAMF Software since my arrival. But my core duty is to shepherd the development and strategy behind a new Mobile Device Management tool called Bushel. A little more about Bushel is available here, and I’ll likely post more about it here when the time is right:

http://tech.mn/news/2014/11/04/jamf-software-bushel-apple-device-management/

And to access the Bushel site:

http://www.bushel.com

And some of the writing that are now finding their way onto the Bushel blog:

http://blog.bushel.com

bushel-wordmark-dark@2x

Mac OS X Mac OS X Server Mac Security

qlmanage

QuickLook scans file contents before you open those files. Usually this just lets you view a file quickly. But you can also use this same technology from the command line to bring about a change to the Finder without actually opening a file. To access QuickLook from the command line, use qlmanage.

qlmanage -p ~/Desktop/MyTowel42.pdf

While open, click the space bar to go back to your Terminal session. The most notable use case here is that when you use qlmanage you don’t run the risk of changing the date/time stamp of the files.

Mac OS X Mac OS X Server Mac Security

Yosemite and statshares in smbutil

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):

smbutil statshares -m /Volumes/krypted

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:

smbutil statshares -a

Overall, this is a nice health check type of verb for the smbutil command that can be added to any monitoring or troubleshooting workflow. Other verbs for smbutil include lookup, status, view, and identity. All are very helpful in troubleshooting connections to smb targets.

Mac OS X Mac OS X Server Mac Security Network Infrastructure

Directory Utility in Yosemite. I’m not Dead Yet… Mapping Attributes 101

The Directory Utility application has moved to /System/Library/CoreServices/Applications. Once open, you can use it to bind to directory services, change search policies and even dink around with NIS if you still rock the flannel with your ripped up jeans. But, the thing that I tend to do in Directory Utility the most is look at user and group attributes. To do so, open Directory Utility and click on the Directory Editor tab. In the bar directly below, you’ll see Viewing and In Node. The Viewing option is what type of object you’re going to look at. The In Node option shows the directory domain you’re viewing. Below, we show the local users in /Local/Default. Screen Shot 2014-10-30 at 9.02.04 AM

Click on a user and you will see all of the attributes that exist for that user. Not all users are created equal when it comes to attributes, so if you’re looking for a specific attribute then you can go through different users to see what they have.

Screen Shot 2014-10-30 at 9.12.18 AM

Change the In Node option to /LDAPV3/127.0.0.1 (or the name of your directory service such as your Active Directory) to see all the attributes available there. You can then note the names and use them in scripts, etc.

Screen Shot 2014-10-30 at 9.04.11 AM

You can also access this information via dscl, but I’ve covered that enough times in the past to be bored with myself for even making the reference. Enjoy.