<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>macOS server &#8211; luke arms</title>
	<atom:link href="https://tech.lkrms.org/tag/macos-server/feed/" rel="self" type="application/rss+xml" />
	<link>https://tech.lkrms.org</link>
	<description>just a nerd with &#34;mild OCD tendencies&#34;</description>
	<lastBuildDate>Fri, 18 Aug 2017 01:01:00 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.6.12</generator>

<image>
	<url>https://tech.lkrms.org/wp-content/uploads/2016/06/cropped-Logo-Letters-WB-Circle-2-32x32.png</url>
	<title>macOS server &#8211; luke arms</title>
	<link>https://tech.lkrms.org</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">152348619</site>	<item>
		<title>OS X Server doesn&#8217;t cache iOS 8</title>
		<link>https://tech.lkrms.org/os-x-server-doesnt-cache-ios-8/</link>
					<comments>https://tech.lkrms.org/os-x-server-doesnt-cache-ios-8/#comments</comments>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Wed, 17 Sep 2014 23:40:03 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[macOS server]]></category>
		<guid isPermaLink="false">http://lkrms.org/?p=1128</guid>

					<description><![CDATA[<p>Based on my testing this morning, although the caching service on OS X Mavericks Server is supposed to cache iOS updates, and although it does a perfectly good job caching App Store content, it does NOT cache iOS 8 itself. For those of us who manage large iPad deployments (and would prefer iOS 8 to &#8230; <a href="https://tech.lkrms.org/os-x-server-doesnt-cache-ios-8/" class="more-link">Continue reading <span class="screen-reader-text">OS X Server doesn&#8217;t cache iOS 8</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/os-x-server-doesnt-cache-ios-8/">OS X Server doesn&#8217;t cache iOS 8</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Based on my testing this morning, although the caching service on OS X Mavericks Server is supposed to cache iOS updates, and although it does a perfectly good job caching App Store content, it does NOT cache iOS 8 itself.</p>
<p>For those of us who manage large iPad deployments (and would prefer iOS 8 to be installed by end-users), this is a problem. Potentially a multiple-terabytes-through-a-finite-pipe problem.</p>
<p>Thankfully the <a href="https://lkrms.org/caching-ios-updates-on-a-squid-proxy-server/">Squid hack I figured out during the iOS 7 launch</a> works with iOS 8 too. Otherwise we&#8217;d be in trouble.</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/os-x-server-doesnt-cache-ios-8/">OS X Server doesn&#8217;t cache iOS 8</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tech.lkrms.org/os-x-server-doesnt-cache-ios-8/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1128</post-id>	</item>
		<item>
		<title>PHP with FreeTDS on macOS Sierra</title>
		<link>https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/</link>
					<comments>https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/#comments</comments>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Sun, 17 Nov 2013 06:13:51 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[macOS server]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sql server]]></category>
		<guid isPermaLink="false">http://lkrms.org/?p=1060</guid>

					<description><![CDATA[<p>Need your macOS-hosted PHP code to talk to Microsoft SQL Server? Here’s the guide I couldn’t find when I needed it. Or you could just download my macOS-ready mssql.so (compiled for PHP 5.6.30 on macOS Sierra 10.12.6) and skip to the end. (18 Aug 2017) Previous versions are available below. Prerequisites Xcode with command line &#8230; <a href="https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/" class="more-link">Continue reading <span class="screen-reader-text">PHP with FreeTDS on macOS Sierra</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/">PHP with FreeTDS on macOS Sierra</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Need your macOS-hosted PHP code to talk to Microsoft SQL Server? Here’s the guide I couldn’t find when I needed it.</p>
<p><em>Or you could just download my <a href="http://delivr.lkrms.org/index.php?f=YJvofgVtKhBgO2It">macOS-ready mssql.so</a> (compiled for PHP 5.6.30 on macOS Sierra 10.12.6) and skip to the end. <strong>(18 Aug 2017)</strong></em></p>
<p><em>Previous versions are available below.</em></p>
<h3 id="prerequisites">Prerequisites</h3>
<ul>
<li>Xcode with command line tools (these are installed when you first run Xcode)</li>
<li>Latest autoconf source from <a href="http://ftp.gnu.org/gnu/autoconf/">http://ftp.gnu.org/gnu/autoconf/</a> <em>(or Homebrew installed)</em></li>
<li>Latest FreeTDS source from <a href="http://www.freetds.org/">http://www.freetds.org/</a> <em>(or Homebrew installed)</em></li>
<li>Source for the <a href="http://www.php.net/releases/">same version of PHP</a> that ships with macOS (5.6.30 on macOS Sierra 10.12.6; run `php -v` from a terminal if unsure)</li>
</ul>
<h3 id="buildandinstallautoconf">Build and install autoconf</h3>
<p>If you’re a <a href="http://brew.sh/">Homebrew</a> user, <code>brew install autoconf</code> is easier than the following.</p>
<pre>$ tar zxf autoconf-latest.tar.gz 
$ cd autoconf-2.69
$ ./configure 
$ make
$ sudo make install
</pre>
<h3 id="buildandinstallfreetds">Build and install FreeTDS</h3>
<p>FreeTDS is on Homebrew too: <code>brew install freetds</code></p>
<p>Alternatively:</p>
<pre>$ tar zxf freetds-patched.tar.gz
$ cd freetds-1.00.54
$ ./configure 
$ make
$ sudo make install
</pre>
<h3 id="buildandinstallmssql.so">Build and install mssql.so</h3>
<p>Don’t worry, unlike some of the Internets will tell you, there’s no need to rebuild PHP itself. Nor do you need to write an essay after <code>.configure</code>.</p>
<p><em><strong>Update (18 Aug 2017):</strong> phpize doesn&#8217;t seem to work out-of-the box anymore. If it can&#8217;t find the files it needs (you&#8217;ll see grep errors), try adding a symbolic link like this: <code>sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/php/ /usr/include/php</code>. <a href="https://www.imore.com/el-capitan-system-integrity-protection-helps-keep-malware-away">System Integrity Protection will need to be disabled first.</a></em></p>
<p>Here goes:</p>
<pre>$ tar zxf php-5.6.30.tar.gz
$ cd php-5.6.30/ext/mssql
$ phpize
$ ./configure --with-php-config=/usr/bin/php-config --with-mssql=/usr/local/
$ make
$ sudo cp modules/mssql.so /usr/lib/php/extensions/no-debug-non-zts-20131226/
</pre>
<p>If you have trouble with the final step, System Integrity Protection is probably enabled. <a href="https://www.imore.com/el-capitan-system-integrity-protection-helps-keep-malware-away">Disable it temporarily.</a></p>
<p>Finally, add this line to your <code>php.ini</code> (probably in <code>/etc/php.ini</code>):</p>
<pre>extension=mssql.so
</pre>
<p>And restart Apache if necessary.</p>
<p>Done!</p>
<h3>Previous versions</h3>
<p>If you&#8217;re running an old version of macOS, you might find one of these binaries helpful:</p>
<ul>
<li>mssql.so compiled for PHP 5.4.17 on OS X Mavericks 10.9 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=K50P3jASK8yhUDfA">here.</a> <strong>(17 Nov 2013)</strong></li>
<li>mssql.so compiled for PHP 5.4.24 on OS X Mavericks 10.9.4 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=6ib06l6EgW3287l4">here.</a> <strong>(6 Jul 2014)</strong></li>
<li>mssql.so compiled for PHP 5.5.14 on OS X Yosemite 10.10.1 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=8ZQu48VhUvw3l4ze">here.</a> <strong>(22 Dec 2014)</strong></li>
<li>mssql.so compiled for PHP 5.5.27 on OS X Yosemite 10.10.5 can be downloaded <a href="http://delivr.lkrms.org/index.php?f=g1pDzVAT_uF_psdi">here.</a> <strong>(16 Sep 2015)</strong></li>
</ul>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/">PHP with FreeTDS on macOS Sierra</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tech.lkrms.org/php-with-freetds-on-os-x-mavericks/feed/</wfw:commentRss>
			<slash:comments>23</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1060</post-id>	</item>
		<item>
		<title>Hacking Profile Manager on Mavericks</title>
		<link>https://tech.lkrms.org/hacking-profile-manager-on-mavericks/</link>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Fri, 08 Nov 2013 12:19:50 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[macOS server]]></category>
		<category><![CDATA[profile manager]]></category>
		<guid isPermaLink="false">http://lkrms.org/?p=1058</guid>

					<description><![CDATA[<p>Dear Fellow OS X Server Geeks, Just a heads up that I have updated my earlier posts about gaining access to Apple&#8217;s Profile Manager PostgreSQL database. The commands therein now work on Mavericks. If you&#8217;ve upgraded from OS X Server 2.0 on Mountain Lion, you&#8217;ll have to open up remote access from scratch. Data is &#8230; <a href="https://tech.lkrms.org/hacking-profile-manager-on-mavericks/" class="more-link">Continue reading <span class="screen-reader-text">Hacking Profile Manager on Mavericks</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/hacking-profile-manager-on-mavericks/">Hacking Profile Manager on Mavericks</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Dear Fellow OS X Server Geeks,</p>
<p>Just a heads up that I have updated my <a href="https://lkrms.org/under-the-hood-os-x-servers-profile-manager/">earlier</a> <a href="https://lkrms.org/squid-authentication-via-os-x-profile-manager-and-active-directory/">posts</a> about gaining access to Apple&#8217;s Profile Manager PostgreSQL database. <em>The commands therein now work on Mavericks.</em></p>
<p>If you&#8217;ve upgraded from OS X Server 2.0 on Mountain Lion, you&#8217;ll have to open up remote access from scratch. Data is retained (flawlessly in my case), but the PostgreSQL instance has been moved and a new database (with a new name) created beside the old one.</p>
<p>Virtual hugs,</p>
<p>Me</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/hacking-profile-manager-on-mavericks/">Hacking Profile Manager on Mavericks</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1058</post-id>	</item>
		<item>
		<title>Squid authentication via OS X Profile Manager and Active Directory</title>
		<link>https://tech.lkrms.org/squid-authentication-via-os-x-profile-manager-and-active-directory/</link>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Mon, 26 Aug 2013 05:17:19 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[active directory]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[macOS server]]></category>
		<category><![CDATA[squid]]></category>
		<guid isPermaLink="false">http://lkrms.org/?p=975</guid>

					<description><![CDATA[<p>Updated on 6-Nov-13 for OS X Server 3.0 on Mavericks My last post was about getting access to OS X Server&#8217;s Profile Manager database; this post is about doing something useful with it. Hypothesis: given live access to data from Profile Manager and Active Directory, it should be easy to write a Squid external_acl_type helper &#8230; <a href="https://tech.lkrms.org/squid-authentication-via-os-x-profile-manager-and-active-directory/" class="more-link">Continue reading <span class="screen-reader-text">Squid authentication via OS X Profile Manager and Active Directory</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/squid-authentication-via-os-x-profile-manager-and-active-directory/">Squid authentication via OS X Profile Manager and Active Directory</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><em><strong>Updated on 6-Nov-13 for OS X Server 3.0 on Mavericks</strong></em></p>
<p>My <a href="https://lkrms.org/under-the-hood-os-x-servers-profile-manager/">last post</a> was about getting access to OS X Server&#8217;s Profile Manager database; this post is about doing something useful with it.</p>
<p>Hypothesis: given live access to data from Profile Manager and Active Directory, it should be easy to write a Squid <a href="http://www.squid-cache.org/Doc/config/external_acl_type/">external_acl_type</a> helper that maps incoming IP addresses to usernames. An optional check for group membership? Trivial. Amirite?!</p>
<p>I was half-right. The lookups weren&#8217;t hard, but getting the helper to terminate when Squid wanted it to, and to NOT terminate prematurely, required a little trial-and-error. Turns out Squid keeps its helpers alive by sending them empty lines, so terminating on empty input isn&#8217;t such a good idea.</p>
<p>Anyway, here&#8217;s the code that has our iPad fleet &#8220;authenticating&#8221; with our Squid proxy server transparently. It&#8217;s been tested on Linux (Ubuntu 12.04 LTS) and OS X. Yes, Python would have been better than PHP, but I&#8217;m more fluent in PHP, and the PHP CLI interpreter is efficient enough for this purpose.</p>
<p><em><strong>Update 23-Dec-2014:</strong> this script is now <a href="https://github.com/lkrms/extensions/blob/master/squid/external_auth.php">hosted on GitHub.</a></em></p>
<p>To use it in squid.conf (assuming you&#8217;ve pulled it down to /opt/git/extensions/squid/external_auth.php):</p>
<pre>
external_acl_type external_auth ttl=300 negative_ttl=5 children-startup=10 children-max=40 children-idle=10 ipv4 %SRC %MYPORT /opt/git/extensions/squid/external_auth.php

acl Apple_Devices external external_auth
acl Staff_Apple_Devices external external_auth staff
acl No_Filter_Devices external external_auth no_filter
acl No_Access_Devices external external_auth no_access
</pre>
<p>The &#8220;staff&#8221;, &#8220;no_filter&#8221; and &#8220;no_access&#8221; values map to $SQUID_LDAP_GROUP_DN in the configuration file &#8211; customise as needed (many groups may be defined).</p>
<p>Finally, use your new acls in some access rules, e.g.:</p>
<pre>http_access allow localnet Staff_Only_Websites Staff_Apple_Devices
http_access deny localnet Staff_Only_Websites Apple_Devices</pre>
<p>Questions? Errata? Do comment.</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/squid-authentication-via-os-x-profile-manager-and-active-directory/">Squid authentication via OS X Profile Manager and Active Directory</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">975</post-id>	</item>
		<item>
		<title>Under the hood: OS X Server&#8217;s Profile Manager</title>
		<link>https://tech.lkrms.org/under-the-hood-os-x-servers-profile-manager/</link>
					<comments>https://tech.lkrms.org/under-the-hood-os-x-servers-profile-manager/#comments</comments>
		
		<dc:creator><![CDATA[Luke]]></dc:creator>
		<pubDate>Mon, 19 Aug 2013 04:13:41 +0000</pubDate>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[macOS server]]></category>
		<category><![CDATA[profile manager]]></category>
		<guid isPermaLink="false">http://lkrms.org/?p=972</guid>

					<description><![CDATA[<p>Updated on 6-Nov-13 for OS X Server 3.0 on Mavericks Let&#8217;s say you&#8217;re running the MDM software Apple ship with OS X Server, Profile Manager. (You&#8217;ve chosen this because you don&#8217;t really need the fancy features of Casper and friends.) Let&#8217;s say you&#8217;re also running other services that would benefit from live access to Profile &#8230; <a href="https://tech.lkrms.org/under-the-hood-os-x-servers-profile-manager/" class="more-link">Continue reading <span class="screen-reader-text">Under the hood: OS X Server&#8217;s Profile Manager</span> <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/under-the-hood-os-x-servers-profile-manager/">Under the hood: OS X Server&#8217;s Profile Manager</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Updated on 6-Nov-13 for OS X Server 3.0 on Mavericks</strong></p>
<p>Let&#8217;s say you&#8217;re running the MDM software Apple ship with OS X Server, <a href="https://www.apple.com/au/support/osxserver/profilemanager/">Profile Manager.</a> (You&#8217;ve chosen this because you don&#8217;t really need the fancy features of Casper and friends.)</p>
<p>Let&#8217;s say you&#8217;re also running other services that would benefit from live access to Profile Manager&#8217;s device metadata, e.g. a Squid proxy that implements MAC-based iOS authentication (because proper proxy authentication has been broken on iOS since forever). &#8220;An external_acl_type that could check enrolled device MAC addresses be super-awesome!&#8221; you say to yourself.</p>
<p>Where to start?</p>
<p>Turns out, Profile Manager data lives in an embedded PostgreSQL database, and opening it up for remote access is relatively straightforward.</p>
<p>First, you&#8217;ll need to modify <code>/Library/Server/ProfileManager/Config/PostgreSQL_config.plist</code> <em>(note: this path has changed in Server 3.0)</em> to enable access over TCP/IP (by default, postgres only listens on a UNIX socket). Edit the existing <code>listen_addresses=</code> entry, and add the last two lines:</p>
<pre>&lt;string&gt;-c&lt;/string&gt;
&lt;string&gt;listen_addresses=OSX_SERVER_LAN_IP&lt;/string&gt;
&lt;string&gt;-c&lt;/string&gt;
&lt;string&gt;port=5432&lt;/string&gt;</pre>
<p><em>Note: Server 3.0 creates multiple instances of PostgreSQL, one for each service that depends on it, all on different UNIX sockets. Just in case another instance opens PostgreSQL for TCP connections on localhost, I recommend binding the Profile Manager instance to a LAN-facing IP. Alternatively, you could use a non-standard port.</em></p>
<p>Then tell postgres that any host on your network is allowed to connect with an encrypted password, by adding a line like this to <code>/Library/Server/ProfileManager/Data/PostgreSQL/pg_hba.conf</code> <em>(note: changed in Server 3.0)</em>:</p>
<pre>host all all 192.168.0.0/16 md5</pre>
<p>Almost done! Now you just need to set up a postgres user to connect as. Start by opening a psql session:</p>
<pre>sudo -u _devicemgr psql -h /Library/Server/ProfileManager/Config/var/PostgreSQL devicemgr_v2m0</pre>
<p><em>(This entire command has changed in Server 3.0; note particularly the new database name.)</em></p>
<p>Then you&#8217;ll probably want to run a couple of commands like:</p>
<pre>CREATE USER squid WITH PASSWORD 'XXXX';
GRANT SELECT ON ALL TABLES IN SCHEMA public TO squid;</pre>
<p>If you want to create a more privileged user:</p>
<pre>CREATE USER dbadmin WITH PASSWORD 'XXXX';
GRANT ALL ON ALL TABLES IN SCHEMA public TO dbadmin;
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO dbadmin;
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO dbadmin;</pre>
<p>Reboot the server and test with pgAdmin or some other PostgreSQL admin tool.</p>
<p>Oh, and don&#8217;t blame me if you break your Profile Manager, or Open Directory, or your entire OS X Server.</p>
<p>The post <a rel="nofollow" href="https://tech.lkrms.org/under-the-hood-os-x-servers-profile-manager/">Under the hood: OS X Server&#8217;s Profile Manager</a> appeared first on <a rel="nofollow" href="https://tech.lkrms.org">luke arms</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tech.lkrms.org/under-the-hood-os-x-servers-profile-manager/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">972</post-id>	</item>
	</channel>
</rss>
