Using Networked Home Directories with Mac OS X?
trouser asks: "I work in a small office using Macs running Mac OS X and PCs running Linux (Debian). There's no problem sharing files between the machines using Samba, Netatalk, and FTP. However, we want to set the Macs up so that at login they mount home directories from one of the Linux boxes so that we get the same home directory no matter which machine we login on. I've read a little about doing this using NetInfo but I gather with LDAP being included with Jaguar that there might be other options now. Any clues?"
The MacOS X Server Guide from Apple answers some of you questions...
c /w ww.apple.com/server/pdfs/Mac_OS_X_Server_v10.2.pdf
http://a320.g.akamai.net/7/320/51/1739d12419ef7
LDAP = Lightweight Directory Access Protocol
I already have "mount magrathea:/huge/mp3 ~/Desktop/mp3" run when I log in to my 10.2 box. The server is Linux 2.4.17 based. What does Suse do to their kernel that is causing your problem? From what I can see the NFS client implementation in 10.2 works perfectly well.
While you don't need Mac OS X Server to do this, the same resources will apply. I would recommend the OS X Server mailing list, or the X Server Admin Guide. Both are good sources of info for doing just this kind of thing.
Also take a look at some non-Apple resources: AFP548.com is consistently the most current, and has a question and answer bulletin board; there's also StepWise, an oldie but goodie.
Hope that helps, and good luck.
--
$tar -xvf
I believe you are looking for 'amd'. It's an automounter for NFS filesystems. It is included on my 10.2 install, not sure about 10.1.5. I would think if you set up /Users/* for automounting you'ls be all set.
-Rusty
The Master (Angelo Rossitto) in Mad Max Beyond Thunderdome, "Not shit, energy!"
If you do this, automount and use NFS. OS X Server sharing AppleTalk to the Macs and NFS to Linux would be more ideal.
However, from my experience, I have to recommend against network-mounting the *entire* home directory. There is a bit much in your typical OS X home directory which you don't need cluttering up your Linux desktop environment ( Library folders and such ) and probably vice versa. Having a separate shared directory, or mounting your Linux home dir as a sub-directory of you OS X home dir is probably a better option.
When we tried automount-ing home dirs we had problems with the mount not happening before OS X wanted the files and you'd find yourself with no home dir ( of course, it'd be there if you logged out and logged back in, but what a pain. )... it could be that we were just a bit clueless, but if you are also just a bit clueless...
Warning: Shameless Plug! :-)
:-) O, the training is good stuff, meaty and chock full of technical information. Almost everyone who goes through these courses says something like, "Wow, that's a lot of good, useful information."
:-)
Apple provides for-fee technical training that covers this and other very useful topics. The courses are generally a week long and involve instructor-led, hands-on training in setting up a network with Mac OS X and Mac OS X Server. IMNSH (and quite biased 'cause I helped write it!
We're working on the revisions for Jaguar right now, and expect to go live with the first course deliveries in a month or so. Go to the Apple Training website for more information.
--Paul
Paul Suh
Curriculum Developer
Apple Technical Training
(Help me keep my job! Buy training from Apple!
macosxlabs.org is a good site to visit. Several universities are trying this, including the one I work at.
We've got a lab with both XP Pro and OS X computers who have their home directories mounting of a network attached storage device. Account info is pulled from a Samba server for the PCs and an NIS server for the Macs. Marcel Bresink has a nice utility for placing the NFS mount info into Netinfo's database with the right syntax. He also has thorough documentation on getting Mac OS X to speak to an NIS server.
One thing I'd like to see is better documentation for OS X Server 10.2. OS X Server 10.2 is supposed to be do "NFS resharing over AFP" making it easier to have home directories stored on an NAS device. That gets NFS mounted to the OS X Server which looks at that as the home directory location for all the users. That mountpoint then gets shared to users over AFP. It has not been successful and the nice thick server admin guide isn't very clear on the resharing feature except to say that it is there.
On 10.1, I hacked NetInfo to keep my home directory on a linux NFS share. Lots of stuff broke. Lots of stuff, even good stuff like Mozilla, doesn't work because the filesystem isn't transparent to Carbon on non-HFS+ volumes. Even local UFS doesn't work.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
Just curious, is there a way to have Roaming profiles similar to Windows, where it logs in using the server profile, but if it's offline, it uses a local cached copy. Once it's back on the same network as the server, it updates the cache.
This would be nice on a laptop for example that might just be away from the home network at any time.
For those that were using the following format for fstab: /dev/disk### /Applications hfs rw 1 2
/Application and /Users mount points under Jaguar like it did for before. The correct format for your fstab entries should be:
/Volumes) /Users|/Applications|/Whatever hfs rw 1 2
You may have noticed that automount refuses to mount partitions on your
LABEL=(partition name as mounted under
Instead of spaces between the items use tabs -- I haven't verified if spaces work yet.
I'm not a mac user myself but my roommate struggled with this issue for quite a few hours before hitting on the solution. I figured I'd pass it along in case anyone else was struggling with it.
Of note, using NIS at the LoginWindow has been broken in 10.2 (it worked in 10.1), but a fix is in the works and expected soon.
Also, he notes that Apple is bring BSD's AMD to OS X (finally!) so that NFS mounting won't be quite as quaint as it has been till now.
(I've been using NFS/NIS on iMacs in our previously Solaris-only lab - worked almost like a champ).
Since I maintain my own machine, I get put on the semi-trusted network, which means that I can't directly mount my smb share. On my Linux box, I work around this by tunneling SMB through an ssh tunnel, but on my OS X machine, I can't find a way to override the SMB port to the tunneled port (sure, I could use smbclient, but that's just not lickable). I've tried a few variations on the URL from the Finder's cmd-k dialog:
R OU P=wkgp
P OR T=tunnelport
smb://username@localhost:tunnelport/share?WORKG
smb://username@localhost/share?WORKGROUP=wkgrp;
and many variants, but not seems to work. Any suggestions? Has anyone figured out how to override the SMB port?
My whole home directory is automounted from a NetApp Filer. My user info is in NIS, which actually proved to be a bigger problem.
Mac OS X works fine with NFS mounted home directories in general. Jaguar broke loginwindow getting username/password info from NIS, but I just made a local copy in netinfo for myself. No one else logs into my machine at the console. A few applications don't like the HFS+ emulation done on single-fork filesystems. In my experience only Adobe Acrobat reader bitched, and there all I needed to do was force the Finder to create a resource fork. Then all was well.
My suggestion. Pick a brave volunteer and try it.
That's the only way to know if the applications you use will function OK.
It's always nice to talk to people who have done it before..
"Belief means not wanting to know what is true." [Nietzche, The Anti-Christ, 1889]
Yes, OS X 10.2 should be able to automount an NFS volume from a linux box, deriving the required information from the an LDAP database. Yet, this isn't that easy. Over the last two weeks, my work has been attempting to do a similart task with a combination of Jaguar server and Linux. Basically, the issue of where your home directory is doesn't matter a whole lot. The problem is working with LDAP. Our issue has lied in getting the LDAP database setup wioth the proper base such that the fields exist. The LDAP server MUST accomidate all the fields. This includes regular Posix account information, plus special Apple fields such as MCX flags,etc. If you examine the apple.schema file that comes with 10.2 (/etc/openldap/schema/apple.schema), you will see all of these. The 10.2 documentation is good and bad, it says some stuff about this and leaves out a lot. Another problem is the generation of all of this information. I believe that it isn't all regular ASCII (mainly MCX flags). If you already have a netinfo database under Jaguard server, you can migrate the output from slapcat. The problem is, this doesn't work under the client verion, though this may be a matter of configuring the ldap.conf file properly. As another clue, check out the Unix RFC preset in the LDAPv3 section of the 10.2 Directory Access utility. This has additional information regarding mappings. In essence, we have yet to be able to maintain an OpenLDAP directory under linux that could authenticate OS X. However turning on slapd under 10.2 did work with LDAP authentication. It's all a matter of having a database with the proper fields and information. I'll post more as I remember more of the details, my notes are all at work.
Actually Samba is installed with Jaguar so you are using it. If you look in the Sharing panel in System Prefs on your Mac you'll find a new option called 'Windows File Sharing'. If you enable it Samba will start and your NT system should be able to see your Mac. Of course you also need to have file sharing turned on for the NT system, and you'll need to see a network workgroup name and select at least one directory on the NT system to be shared on the network. I don't recall how it's done but the Network settings in the Control Panel would be a good place to start. Also, you should set the Mac SMB workgroup name to match the workgroup name you use on the NT machine. This is set using the Directory Access utility in /Applications/Utilites. Select the SMB service on the Services tab and click 'Configure'. You'll be prompted for a workgroup name and a WINS server address. For the setup you describe you can leave the WINS address blank. Now if you select 'Connect to Server' from the Finder's 'Go' menu you should see the NT machine listed. Since upgrading to Jaguar my Mac lists all the Linux SMB and AFP shares and all the Macs on the network. I haven't tried it with a Windows machine yet but I'd reckon it would work as described.
Now wash your hands.
If you simply want to automount NFS/smb/afp /mounts/ directory in NetInfo:
/mounts .
/machines/
/Network/Servers/moroten/ /Network/Servers/moroten/home
enter this in the
[kaninen:~] morth% nidump -r
{
"name" = ( "mounts" );
CHILDREN = (
{
"vfstype" = ( "nfs" );
"name" = ( "moroten:/" );
"opts" = ( "net", "resvport", "rw" );
},
{
"vfstype" = ( "nfs" );
"name" = ( "moroten:/home" );
"opts" = ( "rw", "resvport", "net" );
},
(etc)
}
You might want to add the hosts in
These mounts will appear as
and
The "net" entry in opts is very important. automount ignores any entry without it.
The trick is to put the mount in NetInfo. Export the directory on the linux box and add the following to NetInfo:
/path/to/mt/point
/ -> mounts -> name: server:/export
dir:
opts: bg
this is from an OpenStep machine, but it ought to work on Mac OS X with minimal tweaking.
There should be a moratorium on the use of the apostrophe.
Max V.
NeXTMail/MIME Mail welcome
I think a really important key, is that Apple needs to be more proactive with training material and documentation.
I realize that Apple is moving along at the pace of a speeding bullet right now with OS X, and especially OS X Server, but the OS X Server 10.2 manual was only made available this past couple of weeks, and the 10.2 Server courses just went up this week.
So until the week before last when I printed out the 10.2 Server manual, I had no real technical idea of what stuff like Open Directory in real technical terms. Sure, there was marketing info, but that didn't tell me much about implementation.
Additionally, there's a real lack of technical info that system administrators need. It would've been helpful for Apple to say something like "Open Directory is based on OpenLDAP vx.x" and other such details. We need to PLAN ahead, and with the overabundance of marketing info at the expense of good technical info, that's pretty hard.
That said, I just got the 10.2 Server upgrade CDs in the mail yesterday, and installed it on one of our Xserves this morning and so far it looks great. The LDAP stuff might actually be the first solid implementation of OpenLDAP I've seen.
PLEASE! More technical information & training materials for sysadmins. PLEASE! Public betas or evaluations of server OS software, or at least good in-depth technical info ahead of time.
I would love to see a solution that lets you run a laptop hoem dir off a network share even when not connected to the network like Windows 2000 allows. Basically, Win2k lets you mark network directories like your home directory for offline access. It synchronizes and thus whether or not you are on the network is transparent to you.
NFS sucks ass, especially if your clients are laptops. The minute the network goes away, your system starts hanging.
My advice would be to stick with Apple' compatibility software, and forget Microsoft's. MacOS X will deal with SMB better than NT will deal with AppleTalk (not over IP).