Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
Networking (Apple) Businesses OS X Operating Systems Software Utilities (Apple) Apple Hardware

Dealing with Mac OS X and NetInfo Problems? 89

Posted by Cliff
from the losing-the-keys-to-your-iBook dept.
newkid would like some assistance getting to the core of this issue: "Apple likes to refer to its server software as an industrial-strength server based on Apple's modern OS. However, there are serious flaws in the authentication system (netinfo): I am locked out of four of my remote servers (even root has been disabled, and that is unacceptable), and the instability is well documented here, here and here. I have successfully reinstalled one server and replaced another one with FreeBSD, but I have not decided what to do in the long run. What is your experience? Should I completely forget OS X for my servers and switch to something else? Or should I move to Panther (it uses LDAP instead of NetInfo to control user accounts)? I would like to know about your experience with OS X Server and if your have made the switch to something else." What experiences have you had with NetInfo on your Mac OS X boxes, and do you have any other hints and tips on recovering the NetInfo database in the event that it does develops amnesia?
This discussion has been archived. No new comments can be posted.

Dealing with Mac OS X and NetInfo Problems?

Comments Filter:
  • by tiktokfx (699424) on Thursday November 13, 2003 @12:38PM (#7465558)
    I don't consider it flawed that root is locked down for anyone who doesn't have direct, real-life access to the machine.
    • if you're implying that it's unacceptable that root is disable while all others are as well; A) why would you want root to be enabled whether or not NetInfo is functioning? That would necessitate code in authentication unique to root, and would provide a needlessly vulnerable security hole in the operating system. B) servers should not have root accounts enabled remotely in the first place.
      • Nonsense! (Score:1, Funny)

        by Anonymous Coward
        Everyone I know uses the following...

        login: root
        password: password

        Why this is good:

        1) You never have to ask someone what is the root password...

        This avoids having to explain what you did to the server in the first place that requires a root account to fix.

        2) Hackers will never guess it...

        Come on, everyone knows the password as a password as a joke, no one is seriously going to think its going to be an actually root password somewhere.
    • Well, you can not even log on locally. The corruption of netinfo did remove all possible access to the four computers. Don't you think that this is a flaw? I have never seen this on Linux and BSD. If root is enabled, it always works.
  • don't use netinfo (Score:4, Insightful)

    by Anonymous Coward on Thursday November 13, 2003 @12:45PM (#7465628)
    wow, complaining about netinfo??? let me tell you my woes with farallon phonenet...

    Seriously, netinfo is OBSOLETE the only reason apple held on to it so long is because they were working on bigger, more user-visible things.

    Go with LDAP. Ditch Netinfo.

    and log in as root when you're at the machine, NOT remotely.
    • Ditching NetInfo entirely isn't a choice as local accounts in Mac OS X are controlled by NetInfo. I've encountered the same problems with the local.nidb as the original poster but the network.nidb has been extremely reliable for us. While network accounts on Mac OS X.2 Server can be managed via LDAP, the database that supplies the information to LDAP is still the NetInfo database. (I think there may be a Macintosh-based 3rd party solution besides using a non-mac LDAP server but you lose all Apple's shiny
    • Incorrect statements.

      LDAP by design does not serve the same criteria that NetInfo serves.

      The error is in Network Design, not NetInfo.

      Netinfo has been maturing over 14 years. One of the consistent flaws people labeled on NetInfo was they wanted NetInfo to provide functionality that it did not provide; hence it's an issue with design and one needs to determine what they are attempting to do is best served by Netinfo or by another Networking Service.

      Most issues regardless of it being LDAP or Netinfo or ta
      • LDAP on Mac OS X 10.2 does use the NetInfo database. Addition schema gets added to LDAP to accomedate the NetInfo data. Open NetInfo Manager on the client side and go to the parent and lo! still NetInfo. LDAP is just the messenger. I'm not sure about Panther but I believe it does this as well. LDAP isn't married to one database, it could use MySQL forinstance.

        % sudo cat /etc/openldap/slapd.conf

        ##
        # slapd.conf file for NetInfo bridge
        ##

        include /etc/openldap/schema/core.schema
        include /etc/open
  • by mithras the prophet (579978) on Thursday November 13, 2003 @12:45PM (#7465630) Homepage Journal
    A: Yes.
  • by gsdali (707124) on Thursday November 13, 2003 @12:46PM (#7465637)
    is that the Root account is disabled by default and you are encouraged to keep it that way. I can't shed much light on your problem except to say that Panther moving to LDAP is a good thing from the point of view of admin, maybe that is the way to go.
  • flame on. (Score:5, Informative)

    by seann (307009) <notaku@gmail.com> on Thursday November 13, 2003 @12:48PM (#7465664) Homepage Journal
    evil weblog [webweavertech.com]
    "DirectoryService: NetInfo connection failed for server 127.0.0.1/local."

    "The solution was to restore the Netinfo database."

    NO. the solution is to turn off "Net Info" in the Directory Access program located within /Applications/Utilities folder.
    If you are trying to athunticate to a non-existing netinfo daemon in your domain, your going to get problems.

    Turning off that option relieves the problems hinted at in this link. Please sirs, try this instead of blowing away your net info database, When I first got my powerbook 12" I had this same problem. I realized later on that I clicked "Net Info" in the Directory Access program, and it was trying to auth to a non-existant server.
    • well actually, no.

      by default os x stores it's machine specific information in a netinfo database. this is the way that NeXTSTEP did it.

      But you can set the mode your OS X machine uses for it's information stores. Directory Access tells the machine where to look for the information, ie in BSD Flatfiles or other locations.

      What's happening here is that his NetInfo database is getting hosed (since your os x machine runs this by default. hence the 127.0.0.1/local address for it)
      • Re:flame on. (Score:5, Informative)

        by trouser (149900) on Thursday November 13, 2003 @07:34PM (#7470128) Journal
        OSX does use Netinfo by default for local login but the previous poster is quite correct in saying the Netinfo should not be selected in the Directory Access utility. This checkbox is for enabling authentication using a remote Netinfo server and can cause authentication problems including fantastically long timeouts with no on-screen error message when logging in.

        I use LDAP authentication through OpenLDAP on a Linux box with local Netinfo as a fall back for a local admin account. It's been pretty flakey with previous versions of OSX, mainly authentication failures first thing in the morning on machines that have been left asleep at the login prompt over night. Directory Access used to have a lot of trouble working out what to do with itself when the machine woke up. Authentication failed but the Linux server logs tended to suggest that the LDAP requests weren't being made. Anyway, it all seems to work reliably as of 10.3
  • is this a troll? (Score:4, Insightful)

    by KH (28388) on Thursday November 13, 2003 @12:55PM (#7465758)
    I don't want to be overtly critical, but the question does not make much sense.

    Several questions:

    What are those remote servers? Why does one need to have access to four servers? Are they X serve or just regular Macs that share files? If the former was the case, they should be running OS X Server, which I am not very familiar, but I doubt that four of them got Netinfo database corrupted.

    Regardless of X-Serve or regular Mac, it does not seem very likely that one can install FreeBSD on them. Is there a FreeBSD distribution for PowerMacs? The last time I checked, OpenBSD was available, but not FreeBSD.

    Also, if the problem was Netinfo, why he didn't just restore the corrupted Netinfo database, as described in the linked documents?

    Why is root being disabled a problem? If one has a physical access to the machines, (s)he can always cmd+s to boot into the single user mode. sudo sh should work, too.

    Overall, the post does not make much sense, does it? At least I'm a bit confused.
  • by zulux (112259) on Thursday November 13, 2003 @12:56PM (#7465769) Homepage Journal
    NetInfo is beleaguered.

  • by Kalak (260968) on Thursday November 13, 2003 @12:59PM (#7465813) Homepage Journal
    If you've locked yourself out of root, you can boot from the System install CD. In the menu, IIRC, as son as you start the install process, you can select "Reset Password" utility. This is assuming that your NetInfo database is not corrupted. If it *is* corrupted, you can still get to data on the drives via single user mode (Command-S) on startup, to backup your data.

    You can also re-install with the option of creating a new NetInfo database, or follow the instructions indicated in the linked articles you cite for similar results.

    The fact that you have options already cited makes me think this article sounds more like a troll than anything else. If this were Windows and the Registry was gone, you'd be FUBAR as well. If your /etc/ directory was gone in *nix, you'd be FUBAR. The possibility for recovering from such a corruption is a matter of good backups and system administration and not the fault of the OS in this case. A corrupted NetInfo database is merely the way that Darwin shows this as a problem that you keep backups to avoid.

    Also, there is a manner (I forget what it is now) to get Jaguar (and I assume Panther) to read the /etc flat files instead of NetInfo. It was implimented as a complaint who preferr flat files to NetInfo (I'm one of them).

    Poor backups is not a reason for you to examine if this is a OS up to par. If there were no way to backup the NetInfo database, then you'd have a great case for this argument. There is, and you should be restoring from that database if you need it for server info.
    • Many things in Panther use flat files before NetInfo. If you want to check, do a 'lookupd -configuration'. 'man lookupd' will tell you how to change the lookup order, I believe. Don't forget to do a 'lookupd -flushcache' after you're done.
    • Fun Bonus Tip!

      Requires: Access to NetInfo network admin account and a NetInfo server broadcasting on DHCP.

      Macs ship with Directory Access set up to automatically look for NetInfo DHCP server and also have their root account disabled with no password. You can log in directly to such computers with the network admin account , enable root and set the password without using a boot disk.

      Lesson: Alway set a password for your root account, even if you never plan on using it. Turn off NetInfo in Dire
    • If your /etc/ directory was gone in *nix, you'd be FUBAR.

      Nonsense.. you can boot into single user mode, which doesn't require /etc to be present.

      You can delete everything except for stuff in /sbin and still be able to log in locally.
      • You could boot (you could do the same with single user mode w/o NetInfo), but without backups you'd be fubar, You could only grab the data that's left and reinstall. If this machine had backups NetInfo's database would be backed up as well, and so this would be a non-issue. Comes back up to the great rule of sysadmin - you can never have too many backups.
  • Maybe Apple knows? (Score:4, Insightful)

    by Bastian (66383) on Thursday November 13, 2003 @01:01PM (#7465841)
    Have you asked Apple yet?

    Slashdot probably isn't really the best forum for questions about OS X Server. It's not something people really need to buy for home use. Few businesses I know of run OS X servers. And most importantly, it is quite definitely not GNU/Linux.

    Also, are you sure having remote root access is a bug and not a feature? It's a huge huge security risk, esp. for a business setting.
  • by RalphBNumbers (655475) on Thursday November 13, 2003 @01:04PM (#7465877)
    This newkid managed to find all of 3 people out of millions of mac users who have had their netinfo database corrupted. All of which were fairly easily repaired, all of which managed to write constructive articles. (and at least one of which explicitly said they thought it was because of a pseudo-brownout while writing to disk, not some flaw in apple's software)

    And now newkid claims he's having the same problem on 4 servers at once (of which I'm somewhat dubious), and writes this flamebait article, implying that Apple's OS is horribly flawed.

    He then goes on to ask for the info he could have just read out of those 3 pages he linked to as documentation of his "serious flaws"; these problems are very rare, and fairly easily repaired by someone moderately cluefull.
  • Dear Cliff, (Score:5, Informative)

    by reiggin (646111) on Thursday November 13, 2003 @01:07PM (#7465894)
    Would you please stop turning apple.slashdot.org into a hints, tricks, and tips forum? You're 2 for 2 right now. This is "News for Nerds" not "Nerds helping Non-nerds."

    Thanks.

  • Everyone knows that as a server OS, MacOSX, linux, unix, AIX, xxxx, TRS-DOS are all perfect and windows is the only server OS in the world that sucks or has any problems at all. Problems with Mac OSX Server? What are you, a Pro Microsoft Troll or something?
  • Good resource (Score:5, Informative)

    by sld126 (667783) on Thursday November 13, 2003 @01:28PM (#7466099) Journal
    Especially for 10.2 servers:
    http://www.afp548.com

    and specifically to your question:
    http://www.afp548.com/Articles/system/n etinfobacku p.html
  • "should I move to Panther (it uses LDAP instead of NetInfo to control user accounts)?"

    I have yet to see this challenged, but my version of Panther uses NetInfo for user accounts, as it should.

    NetInfo is great! I don't understand all the belly-acheing.

  • by midifarm (666278)
    I've never experienced any problems at all with OSX Server, but then again my needs are on a small scale compared to a fortune 500 company. Peace
  • can be found here [macosxhints.com].
  • I'm running 10.2.4 and, by chance, I happened to run Check permissions (under Disk Utility) last night. I noticed one of the incorrect permissions settings was under Netinfo. I repaired it. You might want to try checking your permissions just to be on the safe side.
  • Anybody kind enough to tell me what is NetInfo.
  • ... if you think newkid should not be using computers?

    *raises hand*.

    All articles newkid pointed out mentioned this "issue" as trivial and/or easily fixable, don't seem to be directly related, all appear to have been found by doing a google search for netinfo, and do not make his little issue a "well documented fact". I can also google for just about any type of computing issue and dig out hundreds of articles on any particular subject.

    There are, furthermore, many ways one can corrupt a hard driv

  • Mark Crispin, is that you? This sounds just like comments that were littered all over comp.sys.next.advocacy years ago. Yah yah, we know you hate NetInfo just because you weren't the one to invent it.
  • We run a lab with 5 XServes running OS X Server (10.2). On the one hand, Netinfo has been a convenient way of sharing user accounts across the XServes. We store user accounts, NFS exports, and DHCP configuration information in the head node and it seems to work ok. DNS stuff is configured with traditional BIND text files.

    On the other hand, twice during configuration we managed to corrupt the root Netinfo database on the head node. Once we were able to recover from a backup; the other time we corrupted
    • If you are using 10.2 Server you do not need to have your network user's password hashes visible to anyone. All you need to do is use the Password Server that comes with X Server. In the ODA if you select 'This Server will provide authentication for other systems' or something much like that, then it will be enabled. Once you enable it and set users from Basic authentication to the Password Server, the password field of their user record becomes '********'. With 10.3 the Password Server can still be use
  • by plsuh (129598) <plsuh&goodeast,com> on Thursday November 13, 2003 @08:29PM (#7470492) Homepage
    Not to minimize your difficulties, but Apple runs NetInfo internally at a very large scale. In the NeXT days NetInfo was used for large-scale deployments and was quite stable.

    Any Mac OS X or X Server machine has a local NetInfo database, stored in /var/db/netinfo/local.nidb/. It serves as the local directory services store for user and configuration information for that machine only. In addition, a Mac OS X Server that is acting as a NetInfo master or LDAP server will contain at least one other NetInfo database usually named "network". This is stored at /var/db/netinfo/network.nidb/. It is used to provide user and service information for a larger network of machines.

    Clients can connect via the native NetInfo protocol which is based on the SunRPC portmapper, or via LDAP. In either case the data are taken from the network.nidb data store.

    The fact that you were "locked out" of four of your servers is very unusual. To properly diagnose this, more information is required. Which one (if any) of these four servers was a directory service server for the group. Was that one acting as an Open Directory password server? What measures did you undertake to re-gain access once the problem was detected?

    By the way, Panther still uses NetInfo as a local directory services store. Passwords are no longer stored as crypt hashes -- they are instead stored as shadowed MD5 hashes in a separate location.

    --Paul
    Technical Training and Certification
    Apple Computer
    psuh at apple dot com
  • by Permission Denied (551645) on Friday November 14, 2003 @12:26AM (#7471796) Journal
    You are using netinfo on MacOS X Server 10.2 to authenticate clients remotely. This is a bad idea; anyone on a network served by your netinfo server can obtain the password hashes on all accounts and then run a cracker against them. Basically, this is like broadcasting your password file to the world.

    To demonstrate: on any of your clients, type "niutil -readprop -t server_ip/network /users/username/passwd"
    Substitute "username" with any username or read all the usernames. Hell, I'll script it for you:

    #!/bin/sh
    IP=your_ip
    DB=your_db
    niutil -list -t $IP/$DB /users | while read i u
    do
    echo -n $u:
    niutil -readprop -t $IP/$DB /users/$u
    done

    The hashes are encrypted using the standard Unix crypt(3). You can then massage them into some format that Crack can read and let it go. Remember, any user with access to your network can do this.

    I really thought it was quite irresponsible of Apple to release this software and recommend this configuration to users. It took them a good long time to fix it.

    Panther (client) finally fixed this. You'll note that passwords are no longer stored in netinfo, but netinfo rather references a "guid" which in turn references a file that stores the password, readable only by root. This means that standalone Macs no longer give all users access to all password hashes. I understand netinfo will finally be fully deprecated in 10.3 server.

    You also asked if anyone has had other problems with MacOS X Server: I would strongly recommend against their mail server software. It does finally store messages as discrete files on the filesystem, so some munging can be fixed, but message flags are still stored in some opaque binary format that tends to get corrupted. In fact, whenever 10.2 server goes down ungracefully, all flags on messages are corrupted on our mail server, and thousands of deleted (and purged) messages re-appear in all the inboxes. The particular machine is on a UPS, so this doesn't happen very often, but it happens whenever the machine is purposefully rebooted without first explicitly stopping the mail server.

    The good thing about 10.2 server is that it stores the passwords using standard DES crypt(), which makes migrating from it very easy. A shell script like the one above can produce a password file readable by most any *nix flavor. 10.3 uses some bizaare format that I can't readily identify. Since a lot of the most important bits of MacOS are closed-source, you may have a very difficult time migrating away from 10.3 server if it uses something akin to the 10.3 client hashes (options are making all users create new passwords or spending lots of time reverse-engineering the hash and writing an equivalent pam module for another OS (I'm assumming this new hashing stuff is not in Darwin, as most things in MacOS where I needed the code were not in Darwin - but I haven't checked for this)).

    Anyway, your best bet is to drop netinfo and start using LDAP. MacOS X (client and server) uses OpenLDAP, which doesn't have these security issues, is easy to migrate onto other OSes, and is open source (with no modifications that I can identify), so you at least have the ability to fix your own problems if you're not scared of some coding. For example, the OpenLDAP version that ships with MacOS X 10.2 has a bug in that TLS_CACERTDIR directive does not work. I was able to identify and work around this since I had access to the code.

  • In regard to the original article's issue, most of the NetInfo timeout issues that I have ever seen relate to the the NetInfo server being configured to gather information from a NetInfo parent. If no valid NetInfo parent exists the issues that the poster described will occur. I have resolved all of these issues by one of two solutions. The first as a previous respondent indicated was to turn off the option for the comptuer ( client or server ) to look for directory information in NetInfo. The second is to
  • I saw this corrupted netinfo database problem right after installing jaguar the day it came out. i don't think the problem persisted past 10.2.2


    As for LDAP, i think it is probably more used and thus there is more literature on it's setup and use. I think it is probably ahead of Netinfo for the majority of users and will likely stay there in the near future.

    I do see some excellent potential in Netinfo, as i am one of those freaks who tweaks netinfo to get it to do things it was never intended for.
  • Please take the Networking Courseware offered by Apple Professional Services. Its crammed with documentation and hands on approaches to solving your woes.

    I asked the folks when I had to support Openstep/NeXTStep why we never published for sale a library on these, besides NeXTAnswers which myself and others maintained and well it was more of a resource constraint than lack of demand.

    If the demand for a professional publication volume set is there Professional Services will publish the works, but the deman

"Anyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin." -- John Von Neumann

Working...