From owner-freebsd-net@FreeBSD.ORG Sun Mar 14 01:49:51 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA98106564A for ; Sun, 14 Mar 2010 01:49:51 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9EF8FC19 for ; Sun, 14 Mar 2010 01:49:51 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so702540qwi.7 for ; Sat, 13 Mar 2010 17:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=srK3Kh/PnyqPZb1D68MVmq1HG3WvGYoWI/5yb+WUL+U=; b=LJiZQHsbfex0aDx+fC1p5vzsdv2zGf3J0DKlY4HFFGzyaqvua9lp6ogK8qYuihY6xx XomdLrGhS1TGHGaVKQ3Vtn9WEzcuQRee/BrSFjdvRxPy0aVGsyhN++YGBuyEsTcVgGeP DkYSFsF3dGyylCYYPIqj11o96KlPdAvEtty04= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=P2nUhRHr50ZkERmpfpCtE1b5d1bUii5jncQ654uYyVKAYyBSoBTSsdowLYqwO5F5iW bsli7pTpXFI/7TRa3IfpYgumGRLGEAVodpNxxj6E8/H9/P9UWWNQEVuyqioW0a/NDa73 d7HEO94FYTetpwlEhXbfX+NujJ33qtFLSrvIM= Received: by 10.229.242.85 with SMTP id lh21mr3510370qcb.67.1268531390470; Sat, 13 Mar 2010 17:49:50 -0800 (PST) Received: from ppp-21.234.dialinfree.com (ppp-21.234.dialinfree.com [209.172.21.234]) by mx.google.com with ESMTPS id 23sm2241185qyk.15.2010.03.13.17.49.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Mar 2010 17:49:49 -0800 (PST) Sender: "J. Hellenthal" Date: Sat, 13 Mar 2010 20:40:04 -0500 From: jhell To: Thomas In-Reply-To: <4B9BF80A.4090303@bsdunix.ch> Message-ID: References: <4B9BF80A.4090303@bsdunix.ch> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: NIS is not updating passwd X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2010 01:49:51 -0000 On Sat, 13 Mar 2010 15:39, freebsdlists@ wrote: > Hi > > Maybe i'm more lucky with this question in net@, since NIS is a net > service. > > I've configured a NIS master server as descriped in the freebsd handbook > (http://www.freebsd.org/doc/handbook/network-nis.html). I copied > master.passwd to /var/yp, removed all > super and system users from master.passwd in /var/yp, chmod 600 > master.passwd in /var/yp and initialized my NIS master server without > any errors. > > ypcat passwd showed me a correct list with users. But the NIS password > db will not be updated if i add any new user. > > I tried: > pw useradd test1234 > cd /var/yp > make myusers > `myusers' is up to date. > > My new added test1234 user is not added to/var/yp/master.passwd or > /var/yp/passwd but test1234 was added to /etc/passwd and /etc/master.passwd. > > How can i updated the users for NIS? > > System Information: > It's 7.2-RELEASE-p6 (amd64) > > my rc.conf for NIS: > > nisdomainname="myusers" > nis_server_enable="YES" > nis_yppasswdd_enable="YES" > nis_ypxfrd_enable="YES" > > rpcinfo -p > program vers proto port service > 100000 4 tcp 111 rpcbind > 100000 3 tcp 111 rpcbind > 100000 2 tcp 111 rpcbind > 100000 4 udp 111 rpcbind > 100000 3 udp 111 rpcbind > 100000 2 udp 111 rpcbind > 100000 4 local 111 rpcbind > 100000 3 local 111 rpcbind > 100000 2 local 111 rpcbind > 100024 1 udp 696 status > 100024 1 tcp 697 status > 100021 0 udp 751 nlockmgr > 100021 0 tcp 951 nlockmgr > 100021 1 udp 751 nlockmgr > 100021 1 tcp 951 nlockmgr > 100021 3 udp 751 nlockmgr > 100021 3 tcp 951 nlockmgr > 100021 4 udp 751 nlockmgr > 100021 4 tcp 951 nlockmgr > 100004 1 udp 671 ypserv > 100004 2 udp 671 ypserv > 100004 1 tcp 812 ypserv > 100004 2 tcp 812 ypserv > 100009 1 udp 818 yppasswdd > 100009 1 tcp 602 yppasswdd > 600100009 1 udp 818 > 600100009 1 tcp 602 > 100007 2 udp 878 ypbind > 100007 2 tcp 917 ypbind > 600100069 1 udp 694 > 600100069 1 tcp 674 > > root@host04:/var/yp# ll > total 170 > lrwxrwxrwx 1 root wheel 13 Feb 18 2009 Makefile -> Makefile.dist > -r--r--r-- 1 root wheel 19276 Mar 10 22:42 Makefile.dist > drwxr-xr-x 2 root wheel 512 Mar 11 10:55 binding > -rw------- 1 root wheel 73770 Mar 11 11:45 master.passwd > -rw------- 1 root wheel 69260 Mar 11 11:45 passwd > -rw-r--r-- 1 root wheel 233 Mar 11 10:53 securenets > drwx------ 2 root wheel 512 Mar 11 11:45 myusers > -rw------- 1 root wheel 130 Mar 11 11:28 ypservers > > Regards, > Thomas > Can you try: pw -y /var/yp useradd test1234 Please see man page for pw(8) for the usage of -y and NIS. Without the above you are effectively adding a local user only. Please also see the usage for nispasswd= in pw.conf(5) Regards, -- jhell