| Summary: | "AllowGroups" option and secondary user's groups limit | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Juri Malinovski <coil93> | ||||||||||||||
| Component: | sshd | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||||||||||||
| Status: | CLOSED INVALID | ||||||||||||||||
| Severity: | major | ||||||||||||||||
| Priority: | P2 | ||||||||||||||||
| Version: | 3.9p1 | ||||||||||||||||
| Hardware: | ix86 | ||||||||||||||||
| OS: | Linux | ||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Juri Malinovski
2004-10-03 03:11:39 AEST
Please attach (note: use create attachment do not paste it into the text field), a full debug trace from the server (/path/to/sshd -ddde). Also, does the problem occur with 'UsePAM no" ? Created attachment 727 [details]
sshd -ddde output
With "UsePAM no" auth ok
Created attachment 728 [details]
Add some instrumentation to ga_match()
The user is being denied in the early stages (getpwnamallow) which is before
PAM is even initialized. I can't figure out why sshd would behave differently
with and without PAM in this case. I could imagine something in nss_ldap
causing it but in that case UsePAM should make no difference.
Attached is a patch that adds some debugging output to the group match
function. Please apply it and run sshd in debug mode twice, once where it
works and once where it doesn't, then compare the "ga_match" sections of the
debug output and attach them to the bug (substitute the real group names for
fake ones if you need to, as long as you do it consistently :-).
Created attachment 729 [details]
ga_match() debug output
Comment on attachment 729 [details]
ga_match() debug output
Now auth failed with "UsePAM no" if user has access into g6 group
Created attachment 730 [details]
Add debugging to ga_init.
OK, so from that output it looks like either the OS is returning incomplete
data from getgrouplist or sshd's ga_init is not populating the groups_byname
list correctly.
Attached is another patch to add some debugging to ga_init, please apply and
run sshd in debug mode again and attach the ga_init bits.
It looks like it's not a PAM problem, anyway.
Created attachment 731 [details]
ga_init() debug output
Created attachment 732 [details]
test program for getgrouplist
It appears that getgrouplist() is returning an incomplete list (with
duplicates) on your system. Attached is a small test program that outputs the
contents of the list. Does the group list output by it match the gids output
by the ga_init debugging? eg:
$ gcc grouptest.c
$ ./a.out root
root 0 1 2 3 4 6 10
Yes...that's right
>./a.out jm
>jm 11 1107 1170 0 0 0
ga_init() lookup
11
1107
1170
0
0
0
Yep, your getgrouplist is broken and you'll need to speak to your OS vendor about it. The problem was in wrong nsswitch.conf, generated by Yast :E Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4. |