Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Jan 2003 19:01:15 +0000
From:      lewiz <purple@lewiz.info>
To:        FreeBSD-questions <freebsd-questions@freebsd.org>
Subject:   Slow local logins when YP/NIS server unavailable.
Message-ID:  <20030104190115.GA47670@lewiz.org>

next in thread | raw e-mail | index | archive | help

--wRRV7LY7NUeQGEoC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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) !=3D 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 ;)

  Many thanks,

-lewiz.

--=20
When all other means of communication fail, try words.
------------------------------------------------------------------------
--|| url: http://lewiz.info/ | http://www.westwood.karoo.net/pgpkey ||--

--wRRV7LY7NUeQGEoC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE+Fy97Itq0KFQv7T8RAvPRAKCVgjSh7+Guc7nC6K7fKQfdLTwIlgCfZXJS
/g/ZEvB31Zr4yb+PPiSZHzs=
=UkQR
-----END PGP SIGNATURE-----

--wRRV7LY7NUeQGEoC--

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?20030104190115.GA47670>