<?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/"
	>

<channel>
	<title>Jeff's Place &#187; IT Notes and Tips</title>
	<atom:link href="http://www.jeff.com/category/it-notes-and-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeff.com</link>
	<description>Jeff's (New) Web Site</description>
	<lastBuildDate>Fri, 16 Oct 2009 17:09:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mac OS-X Snow Leopard breaks NIS Automount</title>
		<link>http://www.jeff.com/2009/mac-os-x-snow-leopard-breaks-nis-automount/</link>
		<comments>http://www.jeff.com/2009/mac-os-x-snow-leopard-breaks-nis-automount/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 03:24:01 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[IT Notes and Tips]]></category>

		<guid isPermaLink="false">http://www.jeff.com/?p=220</guid>
		<description><![CDATA[Apple breaks NIS compatibility in Snow Leopard.]]></description>
			<content:encoded><![CDATA[<p>I just had to upgrade the Mac server which I had previously set up as a NIS/Automount client, and found that suddenly automount no longer works right. It looks like this is genuinely broken in the new automountd, but of course I can&#8217;t tell for sure without source code access.</p>
<p>In an <a href="http://www.jeff.com/2009/mac-os-x-server-as-a-nis-client-with-automount/" target="_blank">earlier post</a> I detailed how to set up a Leopard server as a NIS client with automount. That procedure required editing a couple files in the /etc/ directory. The upgrade to Snow Leopard replaced those files (auto_master and autofs.conf) with new files, wiping out my changes. It should be easy enough to just put the changes back, right? Wrong.</p>
<p><span id="more-220"></span></p>
<p>Setting the &#8220;resvport&#8221; option in autofs.conf works fine, as before, to get the automountd to use reserved ports so it can mount NFS filesystems from non-mac servers.</p>
<p>The problem is /etc/auto_master. In my previous instructions I had to simply change &#8220;+auto_master&#8221; to &#8220;+auto.master&#8221; to get automountd to load the NIS auto.master map to pick up all the other auto-maps. Well, making that change in Snow Leopard DOES NOT WORK. The automount daemon does not load the NIS auto.master map, so nothing works.</p>
<p>In my case I need this machine to see only two direct maps, auto.home and auto.project, so I modified the /etc/auto_master file to reference them directly as if they were local:</p>
<p>#<br />
# Automounter master map<br />
#<br />
/home            auto_home    -nobrowse,hidefromfinder<br />
/project        auto_project    -nobrowse,hidefromfinder</p>
<p>Then edited the two files /etc/auto_home and /etc/auto_project:</p>
<p>/etc/auto_home:</p>
<p>#<br />
# Automounter map for /home<br />
#<br />
+auto.home    # Use directory service</p>
<p>/etc/auto_project:</p>
<p>#<br />
# Automounter map for /project<br />
#<br />
+auto.project    # Use directory service</p>
<p>Those two direct maps pull in the NIS maps, and both work. After making those changes run &#8216;automount -vc&#8217; as root to tell automountd to relaod its maps. I spoke with Apple support, and while they were friendly the response was that one has to pay them $695 in order to open a support case on something which is outside their normal support scope, whatever that is. Since I have a workaround I chose to just file bug feedback at <a title="Apple OSX-Server Feedback Form" href="http://www.apple.com/feedback/server.html" target="_blank">http://www.apple.com/feedback/server.html</a>.</p>
<p>Also changed in Snow Leopard is the Directory Utility, which no longer lives in the Applications-&gt;Utilities folder. Now it lives under a link in System Preferences, Accounts, there is a button on the middle right side of the pane to get to the Directory Utility, which at first glance appears to be about the same as in Leopard 10.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.com/2009/mac-os-x-snow-leopard-breaks-nis-automount/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Mac OS-X Server as a NIS Client with Automount</title>
		<link>http://www.jeff.com/2009/mac-os-x-server-as-a-nis-client-with-automount/</link>
		<comments>http://www.jeff.com/2009/mac-os-x-server-as-a-nis-client-with-automount/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 22:14:22 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[IT Notes and Tips]]></category>

		<guid isPermaLink="false">http://www.jeff.com/?p=160</guid>
		<description><![CDATA[How-To for convincing a Mac OS-X XServe box to play nicely with NIS and Autofs on a Unix network.]]></description>
			<content:encoded><![CDATA[<p>Many companies use NIS to distribute authentication data (username/password, group, etc) along with automount maps to make networks of servers all authenticate and mount shared NFS drives uniformly. I&#8217;ve built hundreds of these networks, often mixing linux, solaris, bsd, and usually a few windows systems. I recently was asked to set up a Mac XServe box on a network of Linux and Solaris machines, and integrate it to work alongside them. At first this was a bit baffling, and there was really very little useful info on the net for how to do this, but I eventually figured it out and it wasn&#8217;t that hard in the end. I have very little recent Mac experience so maybe someone more familiar with the Mac would have found this to be simple but I suspect there are really very few people around with recent Mac server experience outside of Apple itself.<br />
<span id="more-160"></span><br />
The goal in this project was two-fold:</p>
<ul>
<li>Make the Mac X-Serve box authenticate users against either NIS or Active Directory (NIS preferred).</li>
<li>Get automount to work using the NIS automount maps such that all the NFS shares are available, including per-user home directories, matching all the other machines on the network.</li>
</ul>
<p>I did this on an Apple X-Serve box running Mac OS-X Server 10.5.6 patched up to date as of today. Networking was already set up, using DHCP for IP address, default route, and DNS settings. I also distribute the NIS domain name and server and NTP servers via DHCP but it appears the Mac ignores those settings.</p>
<h3>First, set up a NIS binding:</h3>
<p>In the Mac GUI, Finder, Applications, Utilities, open the &#8220;Directory Utility&#8221;</p>
<ol>
<li>Click the lock to unlock</li>
<li>Services tab, click &#8220;BSD Flat File and NIS&#8221; and click the pencil to edit the settings</li>
<li>Enter the NIS domain name and servers (server hostname ok if DNS is in use, or put in the IP addresses if you&#8217;re using NIS for hostname resolution).</li>
<li>Check the &#8220;Use NIS domain for authentication&#8221; box.</li>
<li>Search Policy tab, Authentication</li>
<li>Set &#8220;Search:&#8221; to &#8220;Custom Path&#8221;</li>
<li>Drag the &#8220;BSD/&lt;domain&gt;&#8221; item up as high as it&#8217;ll stick</li>
<li>Apply everything and click the Lock when you&#8217;re done.</li>
</ol>
<p>This sets up and starts the NIS client (and appears to make it start at boot correctly). It also appears to set up the equivalent of nsswitch.conf to do the right things, although I wasn&#8217;t able to find the actual config file to confirm this. At this point from a root shell you should be able to &#8216;ypwhich&#8217; and see that it found your NIS server. You can test a map lookup, for example &#8216;ypmatch jeff passwd&#8217; should produce the password entry.</p>
<h3>Second, to set up Automount:</h3>
<p>If you&#8217;re using automount maps you&#8217;ll probably have to edit some files in the filesystem to make them work right. The Mac appears to use Solaris/BSD style automount maps by default (auto_home, auto_master etc.) so if you have a Linux infrastructure (auto.home, auto.master etc.) then you have to edit /etc/auto_master on the Mac to fix it. This may be as easy as changing the &#8220;+auto_master&#8221; to &#8220;+auto.master&#8221; and deleting the rest of the lines in the file. This will take auto.master from NIS and all it&#8217;s child maps get linked in from there. Make the auto_master file do the right thing based on your network setup, probably just copy one from another machine if yours is more complex or if you don&#8217;t distribute auto.master via NIS.</p>
<p>Most NFS servers require mount requests to come from &#8220;secure&#8221; ports (ports &lt;1024) but it appears the Mac NFS client does not adhere to this by default. So, to fix this edit /etc/autofs.conf and add &#8220;resvport&#8221; to the options line:</p>
<pre style="padding-left: 30px;">AUTOMOUNTD_MNTOPTS=nosuid,nodev,resvport</pre>
<p>Note you have to be root to edit that file. If you&#8217;re logged in as an admin user you can &#8220;su&#8221; or &#8220;sudo /bin/sh&#8221; to get a real root shell.</p>
<p>You can probably just send a HUP to automountd to make it re-read the conf file, but I rebooted the machine just to be sure everything came up correctly after all these changes.</p>
<p>Once rebooted, you should be able to see the automounted directories. For example, if you have an auto.home map with entries for each user you should see /home be taken over by automount:</p>
<pre style="padding-left: 30px;">sh-3.2# df -h /home
Filesystem      Size   Used  Avail Capacity  Mounted on
map auto.home    0Bi    0Bi    0Bi   100%    /home</pre>
<p>and a user&#8217;s home dir should be mounted:</p>
<pre style="padding-left: 30px;">sh-3.2# df -h /home/jeff
Filesystem                 Size   Used  Avail Capacity  Mounted on
homer:/disk/d2/home/jeff  2.7Ti  2.1Ti  299Gi    88%    /home/jeff</pre>
<p>You can also statically mount NFS drives, there is a tool in the Directory Services Utility to do it, just be sure to include the &#8220;resvport&#8221; option (-P in some systems) if your nfs server requires it (most do).</p>
<p>It appears that the mac NIS config doesn&#8217;t know about netgroups, or at least I couldn&#8217;t get sudo to work right using the netgroup-based rules I use on all the other systems. The system does see the map (ypcat on the map name does work for example) however either the OS doesn&#8217;t know about netgroup maps or whatever it uses as the equivalent of nsswitch.conf doesn&#8217;t get set up correctly to include NIS in the netgroup lookups. I use netgroups heavily with sudo, so I had to juggle things a bit to use groups instead of netgroups for this host. Luckily this is the only Mac on the network so that wasn&#8217;t a big deal.</p>
<p>The bottom line&#8230; the Mac X-Serve does work as a NIS client, user authentication and groups do work, as do automount via NIS automount maps. However it appears that NIS netgroups do not work on the Mac.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.com/2009/mac-os-x-server-as-a-nis-client-with-automount/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Serial Connector Pinouts</title>
		<link>http://www.jeff.com/2008/serial-connector-pinouts/</link>
		<comments>http://www.jeff.com/2008/serial-connector-pinouts/#comments</comments>
		<pubDate>Wed, 26 Nov 2008 01:14:10 +0000</pubDate>
		<dc:creator>jeff</dc:creator>
				<category><![CDATA[IT Notes and Tips]]></category>

		<guid isPermaLink="false">http://www.jeff.com/?p=128</guid>
		<description><![CDATA[From time to time I have to make serial connector adapters to get from DB9 to RJ45. Many devices (cisco, lantronix, etc.) use RJ45 connections for serial ports, many others use DB9 connections. This simple pinout works with an RJ45/DB9 connector to make the connection, these connectors are available at any decent electronics shop for [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I have to make serial connector adapters to get from DB9 to RJ45. Many devices (cisco, lantronix, etc.) use RJ45 connections for serial ports, many others use DB9 connections. This simple pinout works with an RJ45/DB9 connector to make the connection, these connectors are available at any decent electronics shop for about $3, you just have to push the pins into the right holes. The sweet thing about this is you can pick straight or null-modem by using either a straight cable or a telco-roll cable (not ethernet roll, telco-roll reverses all the conductors and usually is used with flat satin cable, just flip the cable over before putting on the rj45 head so on one end blue is on the left, on the other end white is on the left).</p>
<p>DB9 Pin -&gt; Color -&gt; Signal</p>
<p>1 -&gt; Orange -&gt; DCD</p>
<p>2 -&gt; Black -&gt; RX</p>
<p>3 -&gt; Yellow -&gt; TX</p>
<p>4 -&gt; Brown -&gt; DTR</p>
<p>5 -&gt; Red -&gt; SGND</p>
<p>6 -&gt; no connection</p>
<p>7 -&gt; White -&gt; RTS</p>
<p>8 -&gt; Blue -&gt; CTS</p>
<p>9 -&gt; no connection</p>
<p>- -&gt; Green -&gt; no connection</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.com/2008/serial-connector-pinouts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
