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?"
Is there any good documentation on how to use all the network services Unix has? Like using nfs with other Unix/Linux boxes. Sharing stuff not only with Apple Talk. Using printers over the network. All the stuff you want to do when you have more than one computer at home but with different systems. It really is annoying when you try and try to figure out how something works. Not everybody is a nerd.
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
you could use NFS...
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!"
I found Phil's Sysdox to Thin OS X Clients to be quite useful.
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...
Is Active Directory. All the users are entered into the AD, then Samba grabs authentication information from Winbind, which grabs the user and password info from the AD box. With a bit of Pam configuration, it wasn't much work at all to authenticate any service. Coupled with a small bat script on the Windows boxes, and a bash script on the linux machines, we used SMB file transfers to sync a web directory, ftp directory, and all common file locations.
Plus, you get a nice to administer LDAP server running on the Win2k, which can sync with an OpenLDAP server on Linux.
The cost of Win2k server, even with a of client licenses, really has come down quite a bit.
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.
You're confusing terms. You want NFS. NFS is what you use to export the files from the server and have them automatically mounted on the client when the computer boots up.
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)
Hello,
We run a small office with 8 macs and 1 server. Our computer are all networked with Directory Service, even our laptops! It works great! Except for M$ stuff. There's a 15% chance that when you quit out of Word, excel, powerpoint, entourage, or explorer that it will cause a kernal panic and crash the local computer. We run a full suite of software from open source stuff to adobe photoshop, illustrator, etc. Only M$ stuff really crashes. Besides that, OS X Server is the way to go! It took only two hours to completely format the hard drives (650GB), install the OS, setup all the users, setup mail services, FTP, Web, DNS, DHCP, Samba, and NFS. System runs through a gigabit switch, thus no noticable difference in speed between network & local accounts. If it wasn't for the power-outage a month ago, the server would not have been rebooted since we put it into service 9 months ago. I know, the $1000 price tag is pretty steep for stuff I can get for fee through a Linux Box. But hell, I'm clueless when it comes to setting up all that we need, and that was easy, no brainer, it just does it for you. Well, if you know exactly what you're doing great, otherwise save yourself the headache and get OS X server, it's worth every penny!
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).
I just upgraded my new PB G4 to OS X v10.2 and want to file and maybe print share with my little NT4 network at home. I'm not doing Linux, LDAP, Samba or NFS, just some ethernet cables, a router, hub and DSL modem. I've tried (and read) everything I can think of but the PB won't see anything else and the NT4 machines won't see the PB. So, what's the deal with "Jaguar -- easy file sharing?" And where's the v10.2 documentation? Does Apple rely exclusively on third party publications and good Mac people for how-tos? I do know how to read, but one of the reasons I bought a Mac (which is fabulous, so far) is so I don't have to spend the rest of my days futzing and tweaking. For me it's a means, not an end. I need to get something done.
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.
just use NFS and set the mount directory to /home/~user/
/* oops I accidentally made a comment, sorry */
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.
Automounter is your friend. I have done this at work we Netapps serving up our home directories and I have pushed out automount maps to all of the Macs running 10. Cfengine is good to do this with. I have also created a few perl scripts to sinc our Unix password file with our NetInfo server. And so we have just one password for our Mac 10 machines and our Unix machines.
Now I did have to modify some of the start up scripts, but nothing any Unix sysadmin would be uncomfortable with.
-Scott
It is said that a child learns wisdom from the parent,
but the truly wise parent learns joy from the child
Two years ago, did any of us think we would be debating about which type of many networking services we should be using on a Mac? Not only that, but discussing it in the Apple section of Slashdot? What a great time to own a Macintosh. Seriously.
assuming your home directory is on a machine called homehost and your user directory is /home/buba..
/mounts
/Users/buba
/Users/buba. Obviously, this works for other mountpoints and nfs shares in a similar fashion.
From NetinfoManager
Click the padlock to authenticate
Choose
from the directory menu select add directory. change the name of the new directory to homehost:/home/buba
This entry will need the following properties and values:
vfstype nfs
opts nfs
name homehost:/home/buba
dir
This cause homehost:/home/buba to be automounted at
Happy mounting
I have a second sig, I call it sig#2.
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.
http://www.bresink.de/osx/nis.html
i have used this document before to integrate a 20 seat maya lab into an existing IRIX maya envoroment. its really well documented. this is from the guy who writes Tinker Tool, among other things.
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.
This may not be as sophisicated as others but it works. /System Perferences/Login, add the file /Users//Library/Favorite/ so that OSX opens it at login.
To do this:
- In the go menu, add the server to your favorites folder. There is a button at the lower left to do this
- If you want, add the username and password to keychain.
-Go to
Viola! everytime you login to the computer it will mount the home directory. I agree this not very clean but it is easy to do.
You don't have to be smart to use a Mac, you just have to be smart enough to buy one
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.
BE WARNED: THIS INVOLVES MESSING AROUND IN NETINFO AND COULD FORCE A RE-FORMAT AND RE-INSTALL. Don't blame me if it hoses your system.
Login with that username and it should automatically mount your home directory.
(Since I use this from my Windows box too, I made a symlink from My Documents to Documents in my home directory.
I got most of this info from http://aldebaran.armory.com/~zenomt/macosx/network _homedir.html
Also with this solution you have to do something else to keep your passwords the same for both systems. Since I'm doing this at home I haven't looked into this that much.
What, me worry?
I gotta say my part here, I am in the UK and really bored of Apple treating us like 2nd class citizens here. The SysAdmin course for Mac OS X Server is still not even released here for 10.1.x!!! How can this be acceptable??? The company Apple UK are using for their training were unable to tell me when this course was starting, as they had still not received the training materials for the 10.1.x course, and this is at a time when this course is now not even worth the paper it is printed on. I went to the Apple Server Essentials and Mac OS X Admin courses and they sucked!!! I knew more when I walked through the door on day 1 than the trainer, I learned nothing, and wasted loads of my time and my companies money. In fact I ended having to show the trainer how to create the parent and child domains and the nfs or afp exports, and setting the automounts for network home dirs for OS X clients as I had done this work already. I was hoping that the course might shed some light on some of the other areas of the server OS, but no... And so now I am faced with having to teach myself again now that Apple have decided to move to LDAP, which while it is a technology I have wanted to get to grips with, I am now forced into a situation where I HAVE to learn it as my boss wants us to be using this when we rollout 10.2 server, all this without any real support from Apple. Now I think Apple have the best products in the marketplace, and I work for a company that is using 99% Apple technology in both the backroom as well as on the desktops. Also we are in an area that Apple are directly targeting at the moment (especially my company as we are rather prominent in our particular marketplace and known for using Apple products), but there is still SO much for them to do... and they are failing, and all because we are not in the USA!!! I am not a professional Apple beater by any means, in fact I have spent most of my professional life promoting Apple and encouraging people to use their products, but when the question of training comes up my blood starts to boil. Apple have released a whole new OS in X and moved the goal posts on Mac IT depts, we are left having to learn a whole new OS, UNIX, and a whole raft of new issues, I am glad to have the stability that X brings, but the support from Apple has been pathetic to non existent. All the emphasis has been on developers, which I can see is needed but why nothing for sysadmin's and why nothing or so little outside the USA? I love the features that X and now Jag brings, it is so cool that I happily spend my time digging around finding ways to get all these new features to work, but some useful pointers from Apple is not asking too much. I am the lead sysadmin for a company that spends nearly a million pounds sterling per annum with Apple in hardware and software, and even the professional support from Apple is awful. They do seem to be trying just now, but even the people selling the support don't seem to be aware that what they are offering isn't in place yet (the sales team that came to see us told me that the OS X SysAdmin course was in place and that the 10.2 docs were being worked on and should be in place for the end of September but as you can see I called their training centre and was told that there was no course as yet even for 10.1.x), or if it is you have to be in the North American continent. It is just not good enough! Now if you want to know how to get this working then I have it working on my test system, I need to work some more on it to be sure that it is working properly, as it has been a little buggy and I want to be sure that I am not telling you something that screws your systems as it has a couple of times here!!! :)
I'll post back on Wednesday with some useful info...sorry for the rant but like I said it does make my blood boil!