From owner-freebsd-questions Sat Jan 4 17: 5:18 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4308537B401 for ; Sat, 4 Jan 2003 17:05:17 -0800 (PST) Received: from hotmail.com (f95.law15.hotmail.com [64.4.23.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFB9D43E4A for ; Sat, 4 Jan 2003 17:05:16 -0800 (PST) (envelope-from bill_moran2@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 4 Jan 2003 16:57:04 -0800 Received: from 66.132.12.15 by lw15fd.law15.hotmail.msn.com with HTTP; Sun, 05 Jan 2003 00:57:03 GMT X-Originating-IP: [66.132.12.15] From: "Bill Moran" To: purple@lewiz.info, freebsd-questions@freebsd.org Subject: Re: Slow local logins when YP/NIS server unavailable. Date: Sat, 04 Jan 2003 19:57:03 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 05 Jan 2003 00:57:04.0067 (UTC) FILETIME=[5CB96930:01C2B455] Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >From: lewiz > >Hi, > > I've been having problems recently trying to login as a local user >when my YP/NIS server is unavailable. This is essentially to me as the >machine in question is a laptop and is required to work without the >network. > > I have a local user (lewiz2) and a NIS/YP user (lewiz). When I am >away from the network I use lewiz2, which has a homedir synchronized >with lewiz. When I return I resynchronize. This works perfectly. > > However, I have come to find a problem in some code in login.c >(usr.bin/login). I have an up-to-date login.c (from 1859 today >(04/01/03)) and the code is from line 598 to line 601. It reads: > >if (setusercontext(lc, pwd, pwd->pw_uid, LOGIN_SETGROUP) != 0) { > syslog(LOG_ERR, "setusercontext() failed - exiting"); > exit(1); >} > > This means nothing to me but I have found that it causes local logins >(which have _nothing_ to do with NIS/YP whatsoever) to hang for a long >time. I am wondering if there is any way I can work around this problem >(without commenting out the code) and if this could be considered a >``bug''? > > Any help on this matter would be greatly appreciated as it's been >causing me problems for ages ;) I don't have the answer to your question, but I may be able to suggest a workaround. If you set the laptop up as a NIS backup server, you'll be able to log in just fine, even when not connected to the network. It should circumvent the delays, as you'll have everything the login system is looking for. Hope this helps, Bill _________________________________________________________________ MSN 8: advanced junk mail protection and 2 months FREE*. http://join.msn.com/?page=features/junkmail To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message