I recently needed to restart tomcat on a JSS (my fault not theirs). Because I had other processes running on the same box, I used the jssutil command to restart the tomcat service, using jssutil along with the rt verb: jssutil rt Turned out I had screwed things up a little more than all that so tomcat didn’t come back on its own, to get the service to kick back on, use the same command along with the startTomcat verb: jssutil startTomcat
-
-
Auto-archiving in Outlook for Mac
One way to automatically archive objects from Outlook is to use rules. To do so, first create a folder on your local computer (e.g. Archived). Then, from the Tools menu, select Rules. Create a rule by clicking on the plus sign (let’s just call it Archiving) and then click Date Received in the “When a new message arrives: section. Configure the middle field as “is Greater than or equal to” and then configure the number of days (e.g. 90 or 180). In the “Do the following:” section, choose “Move message” and then choose the archive folder you created in the previous step. Finally, check the box for Enabled and you’ve…
-
Disable Finder Preferences
Finder Preferences allow users to change the sidebar, alter how searches work, show file extensions, configure label names, alter what devices show up on the desktop of a system and control the behavior of Finder windows. You can access Finder Preferences either using the Preferences menu (under the Finder menu) with the Finder as the active application or using the Command-, keystroke. There are a number of reasons I’ve seen people want to disable Finder Preferences, such as controlling user experience and easing support of the user experience for OS X. To do so, send a boolean ProhibitFinderPreferences key to com.apple.finder as TRUE (and kill the Finder): defaults write com.apple.finder…
-
Managing Core Dumps
The core dump is a memory image of a processes in-core state that is written to the /cores directory by default and is named core followed by a . and then the pid number. So if a process with pid 87 crashes a file is written by default at /cores/core.87. The feature can be turned off using sysctl, along with the kern.coredump MIB, setting it to 0 (by default it’s 1). sysctl kern.coredump=0 To turn it back on: sysctl kern.coredump=1 Additionally, you can change the path that the files are written into, using sysctl along with the kern.corefile MIB. The corefile is an expression that by defualt writes core.%P where…
-
MDSChannelPeerCreate and Shared Volumes
These two errors: com.apple.AppleFileServer[8123] MDSChannelPeerCreate: (os/kern) invalid argument MDSChannelPeerRef MDSChannelPeerCreate(CFAllocatorRef, CFDictionaryRef): (os/kern) invalid argument I see them frequently when we’re using dynamic or shared storage (e.g. Xsan or removable media) to share volumes between multiple computers and then share those shared volumes to clients through a network sharing protocol (e.g. afp or smb). They usually mean that the system doesn’t have enough permissions to do those MDSChannelPeerCreate processes. Therefore, we need to open those permissions up a little and then let the file sharing services restart. I usually do it this way: serveradmin stop afp serveradmin stop smb chown -R root:staff /Volumes/VOLUMENAME/.fseventsd chmod -R 770 /Volumes/VOLUMENAME/.fseventsd chown -R root:staff /Volumes/VOLUMENAME/.Spotlight-V100…
- cloud, FileMaker, Mac OS X, Mac OS X Server, Mac Security, Mass Deployment, Network Infrastructure, Time Machine, Xsan
Obtain Information From Watchman Monitoring Using a Script
Watchman Monitoring is a tool used to monitor computers. I’ve noticed recently that there’s a lot of traffic on the Watchman Monitoring email list that shows people want a great little (and by little I mean inexpensive from a compute time standpoint) monitoring tool to become a RMM (Remote Management and Monitoring) tool. The difference here is in “Management.” Many of us actually don’t want a monitoring tool to become a management tool unless we are very deliberate about what we do with it. For example, that script that takes a machine name of ‘rm -Rf /’ that some ironic hipster of a user decided to name their hard drive…
-
Is My Apple Computer Under Warranty?
Apple has a site used to check the warranty agreement of Apple hardware. You will need your serial number. To obtain that, click on the Apple menu and then click on About this Mac. From there, click on the greyed Version line until you see the Serial Number. You could also click on the More Info… button to see the Serial Number. Once you have the serial number, navigate to: https://selfsolve.apple.com/agreementWarrantyDynamic.do?newid=y. From there, enter the serial number to see the warranty status as can be seen here. You can also build this type of functionality into scripts or other systems. To do so, just inject the serial number as a sn= in…
-
Install Exchange From the Command Line
Exchange is becoming more and more command line oriented. This includes the powershell options for managing Exchange once installed, but can also include the initial installation. To install Exchange from the command line, one must first install Exchange prerequisites, which are broken down per role that is being installed on Exchange. This can be done using the Add-WindowsFeature commandlet. To install the Windows requirements for Exchange for the Client Access, Hub Transport and Mailbox roles, use the following command: Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Web-WMI -Restart For the Edge Transport role, use: Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Desktop-Experience -Restart For the Unified Messaging role, use: Add-WindowsFeature NET-Framework,RSAT-ADDS,ADLDS -Restart After the server restarts, also configure NetTcpPortSharing: Set-Service NetTcpPortSharing -StartupType…
-
Show All Files During Migration
When doing a data migration in OS X, you find that you often want to build a list of files on the source and the target media and then compare the two lists. When you do such a copy it’s important to verify that the data is all there. To find all the files on a drive, use the find command. If you’re in the working directory of the volume you’re transfering files from, the following command would show you all of the files on the volume: find . -name "*" To dump the contents to a file, use the > followed by the filename. So to list the contents…
-
A Little More About afctl in OS X Server
Awhile back I wrote an article on managing the Adaptive Firewall built into Mountain Lion Server at https://krypted.com//mac-os-x-server/managing-lion-servers-adaptive-firewall-from-the-command-line. It’s worth mentioning that when you use this command you’re basically editing some text files. These include the blacklist, blockedHosts and whitelist folders at possibly the shortest folder at this depth in the file system that I’ve ever had the good luck to need to use /var/db/af (okay, okay, I’m sure we’ve all made /a/b/c and that’s shorter, but this is pretty close). You should use afctl to add and remove machines from these lists. The -w option in afctl used to add a host to a whitelist will cause the host…