From owner-freebsd-questions@FreeBSD.ORG Mon Oct 15 19:29:44 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF9016A41B for ; Mon, 15 Oct 2007 19:29:44 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.77]) by mx1.freebsd.org (Postfix) with ESMTP id E75F613C44B for ; Mon, 15 Oct 2007 19:29:38 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from atlantis.dyndns.org (athedsl-305194.home.otenet.gr [85.73.239.200]) by kane.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l9FJTaxi024414; Mon, 15 Oct 2007 22:29:36 +0300 Message-ID: <4713BF9F.3050803@otenet.gr> Date: Mon, 15 Oct 2007 22:29:35 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.5 (X11/20070719) MIME-Version: 1.0 To: benfell@parts-unknown.org, freebsd-questions@freebsd.org References: <20071015054707.GA34948@parts-unknown.org> <47138DE7.80800@otenet.gr> <20071015190846.GB86225@parts-unknown.org> In-Reply-To: <20071015190846.GB86225@parts-unknown.org> Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: 7bit Cc: Subject: Re: Following directions doesn't seem to work: Adding users in NIS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2007 19:29:44 -0000 David Benfell wrote: > On Mon, 15 Oct 2007 18:57:27 +0300, Manolis Kiagias wrote: > >>> >>> >> The following comes from the handbook and works for me: >> >> copy your master.passwd to /var/yp, i.e: >> >> cp /etc/master.passwd /var/yp/master.passwd >> >> Edit the copy of master.passwd and exclude all "irrelevant" accounts >> (root,servers and so on) >> >> Then run: >> >> ypinit -m your-nis.domain >> >> > So the message I'm getting here is that the procedure used to initially > set up NIS is the same as that used to update NIS. Further down that page, > it claims that pw can be used to add users to an existing scheme Reinitializing the maps like this should cause no problem, and you will get all the new accounts. I have not tried the update procedure from the handbook, I got stuck with the linux client. > : > > > 27.4.8 Important Things to Remember > > There are still a couple of things that you will need to do differently now that you are in an NIS environment. > > * > > Every time you wish to add a user to the lab, you must add it to the master NIS server only, and you must remember to rebuild the NIS maps. If you forget to do this, the new user will not be able to login anywhere except on the NIS master. For example, if we needed to add a new user jsmith to the lab, we would: > > # pw useradd jsmith > # cd /var/yp > # make test-domain > > You could also run adduser jsmith instead of pw useradd jsmith. > > > This looks more or less similar to Linux procedures ( usually make -C /var/yp), but as I said I have not tried this on FreeBSD. >> My real problem with nis is the fact the freebsd maps are not compatible >> with linux clients, and I can't seem to get the Makefile right... >> > > Ouch! I'm ultimately planning to add a Linux client. In theory, I can get > by with just NFS for this particular application, but it would be better to > have NIS as well. > > > > Well I can tell you with certainty, it is not compatible out of the box, and I have not managed to make it work (though I must admit I did not put a lot of effort into this). Seems the exported master.passwd map needs a filename change + internal changes, thus the NIS Makefile needs to be modified. On the Linux side, the users are visible (e.g. you can run id and the user is there) but they cannot login. If you Google "FreeBSD NIS Server Linux Clients" you will get some patches for the NIS Makefile to make it Linux compatible. I was not however successful with this. If you do try it and get it to work, please report back. Manolis