Strange problem with user account

Ian A. Tegebo yontege at rescomp.berkeley.edu
Wed Feb 15 19:20:41 PST 2006


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


More information about the freebsd-questions mailing list