From owner-freebsd-questions@FreeBSD.ORG Thu Feb 16 03:20:41 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 939D116A420 for ; Thu, 16 Feb 2006 03:20:41 +0000 (GMT) (envelope-from yontege@hal.rescomp.berkeley.edu) Received: from rescomp.berkeley.edu (keyserver.Rescomp.Berkeley.EDU [169.229.70.167]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6503743D46 for ; Thu, 16 Feb 2006 03:20:41 +0000 (GMT) (envelope-from yontege@hal.rescomp.berkeley.edu) Received: by rescomp.berkeley.edu (Postfix, from userid 1032) id 3EF185B766; Wed, 15 Feb 2006 19:20:39 -0800 (PST) Date: Wed, 15 Feb 2006 19:20:39 -0800 From: "Ian A. Tegebo" To: freebsd-questions@freebsd.org Message-ID: <20060216032039.GA688@rescomp.berkeley.edu> References: <20060211043906.GB27755@rescomp.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060211043906.GB27755@rescomp.berkeley.edu> User-Agent: Mutt/1.3.28i Subject: Re: Strange problem with user account X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2006 03:20:41 -0000 On Fri, Feb 10, 2006 at 08:39:06PM -0800, Ian A. Tegebo wrote: > Somehow I've foobarred a user account. The account turned out not to have been foobared. The account had had 18 groups and this exceeded the kern.ngroups default of 16. Reducing the number of groups solved the problem. > # su USER > su: setusercontext: Invalid argument A better ktrace as root is: # ktrace -di su yontege # kdump -f ktrace.out ... 1080 su CALL setgroups(0x11,0xbfbfe5b0) 1080 su RET setgroups -1 errno 22 Invalid argument ... # man setgroups --------------------------------------------------------------------- ERRORS The setgroups() system call will fail if: [EPERM] The caller is not the super-user. [EINVAL] The number specified in the ngroups argument is larger than the NGROUPS limit. [EFAULT] The address specified for gidset is outside the process address space. --------------------------------------------------------------------- and then it was elementary. > I suspect that something funny has happened to the account before the > migration; something like having been removed from /etc/passwd but > nowhere else. And this was an incorrect suspicion which was confirmed by investigating all of the pwd.db related files. Hope this helps someone someday. -- ian