From owner-freebsd-net@FreeBSD.ORG Fri Aug 1 16:59:24 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A3B237B401 for ; Fri, 1 Aug 2003 16:59:24 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C2E943FE0 for ; Fri, 1 Aug 2003 16:59:20 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h71NxD0U013456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Aug 2003 02:59:14 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h71NxCox013448; Sat, 2 Aug 2003 02:59:12 +0300 (EEST) (envelope-from ru) Date: Sat, 2 Aug 2003 02:59:12 +0300 From: Ruslan Ermilov To: Thomas Zauner Message-ID: <20030801235912.GA11304@sunbay.com> References: <1059740569.6846.1.camel@Tom1> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K8nIJk4ghYZn606h" Content-Disposition: inline In-Reply-To: <1059740569.6846.1.camel@Tom1> User-Agent: Mutt/1.5.4i cc: freebsd-net@freebsd.org Subject: Re: freeBSD NIS-server - LINUX NIS-client auth/login probs X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2003 23:59:24 -0000 --K8nIJk4ghYZn606h Content-Type: multipart/mixed; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 01, 2003 at 02:22:48PM +0200, Thomas Zauner wrote: > hi, >=20 > i set up a NIS server on freebsd(5.1) excactly like in the handbook and > then started the NIS client on linux (RH-9). >=20 >=20 > (i just have 1 test user for now) >=20 >=20 > 1) >=20 > here's the output from ypcat passwd: > the client binds the server ok: >=20 > [root@linux]# ypcat passwd > testo:*:1003:1003:User &:/home/testo/:/usr/local/bin/bash >=20 > (the home dir does exist on the client -- via NFS) >=20 > also in the RH user-manager i can see the user testo but i CANT LOGIN > i think its an auth problem. >=20 You need a shadow NIS map for Linux. > on the freeBSD side i use md5 as default encrypt. but thats ok with > linux > i think.(on the freebsd side in /etc/login.conf defined) >=20 Yes. > 2) >=20 > there is a option in /var/yp/Makefile on the FREEBSD side > "UNSECURE=3Dtrue" > but its commented out. [...] > DO I need this ? >=20 No. > 3) > also i am not shure what config to use in nsswitch.conf on linux > because i dunno what NIS(1/2/+) freebsd is using so is this ok? >=20 > -----SNIP (/etc/nsswitch.conf)------ > passwd: compat > group: compat > shadow: nis files # i think there is no compat for shadow >=20 There is (the compat for shadow). > passwd_compat: nis > group_compat: nis >=20 These are the defaults, IIRC. > and then add the "+::::::" stuff to /etc/shadow passwd and groups >=20 Yes, if you need to override some fields, which is typical. > passwd: nis files > shadow: nis files > group: nis files > ------------------------------- >=20 > and NOT use the +::: stuff in the passwd,group.shadow files ? >=20 Yes, that's another option (if you don't need to override anything). > or sth with nis+ in nsswitch.conf ? >=20 No. > 5)=20 > what about the diffrent styles of the "shadowed" password file of > LINUX(/etc/shadow) and FREEBSD (/etc/master.passwd) > the freebsd master.passwd has more fields then the linux equivalent >=20 I use the attached patch for /var/yp/Makefile to generate the shadow map. > 6) > BTW my umask is 0077 do others/group need read-access to and of the > files > in /var/yp/* ???=20 > =20 I don't think they need it. > ok thats all i can think of right now > PLS if someone can help "SAVE MY WEEKEND" and help me. LOL >=20 You're welcome! Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p Content-Transfer-Encoding: quoted-printable --- Makefile.dist Fri Mar 7 21:15:21 2003 +++ Makefile Wed Jun 11 20:14:35 2003 @@ -188,6 +190,7 @@ aliases: mail.aliases =20 master.passwd: master.passwd.byname master.passwd.byuid +master.passwd: shadow.byname =20 # # This is a special target used only when doing in-place updates with @@ -559,6 +562,22 @@ $(CAT) $(MASTER) | \ $(AWK) -F: '{ if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ print $$3"\t"$$0 }' $^ \ + | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ + $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +.endif + + +shadow.byname: $(MASTER) + @echo "Updating $@..." +.if ${MASTER} =3D=3D "/dev/null" + @echo "Master.passwd source file not found -- skipping" +.else + $(CAT) $(MASTER) | \ + $(AWK) -F: '{ if ($$1 !=3D "" && $$1 !~ "^#.*" && $$1 !=3D "+") \ + print $$1"\t"$$1":"$$2":::::::" }' $^ \ | $(DBLOAD) ${S} -f -i $(MASTER) -o $(YPMAPDIR)/$@ - $(TMP); \ $(RMV) $(TMP) $@ @$(DBLOAD) -c --17pEHd4RhPHOinZp-- --K8nIJk4ghYZn606h Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/Kv7QUkv4P6juNwoRAl1AAJ9jeOVKIt4hIFpwJpuNmHkbIOhWjgCfUNSz nmNkrhWGlx/L7tVH2PWUwxQ= =U+ub -----END PGP SIGNATURE----- --K8nIJk4ghYZn606h--