From: lewiz <[EMAIL PROTECTED]>


  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

  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");

  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

  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,

MSN 8: advanced junk mail protection and 2 months FREE*.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to