Date: Sat, 04 Jan 2003 19:57:03 -0500 From: "Bill Moran" <bill_moran2@hotmail.com> To: purple@lewiz.info, freebsd-questions@freebsd.org Subject: Re: Slow local logins when YP/NIS server unavailable. Message-ID: <F95TSVHsA5ms328YV7y0000f0fc@hotmail.com>
next in thread | raw e-mail | index | archive | help
>From: lewiz <purple@lewiz.info> > >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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F95TSVHsA5ms328YV7y0000f0fc>