Bug 134619

Summary: When AllowGroups is used in sshd_config, user is not allowed to login
Product: [Fedora] Fedora Reporter: Eric Barry <eric>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-02-09 08:31:18 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Eric Barry 2004-10-04 22:23:06 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6)
Gecko/20040206 Firefox/0.8

Description of problem:
Added the following to my /etc/ssh/sshd_config :
  #echo "AllowGroups sshok" >> /etc/ssh/sshd_config

Added the following to my groups:
  #gpasswd -a eric sshok

(even removed the entry and tried with "groupadd" - same results)

Restarted the service:
  #/etc/rc.d/init.d/sshd restart

Tried to login, met with failure - see output below:

  #tail -3 /var/log/secure
  Oct  4 22:14:03 stanz sshd[2763]: error: Bind to port 22 on
failed: Address already in use.
  Oct  4 22:14:12 stanz sshd[2766]: User eric not allowed because none
of user's groups are listed in AllowGroups
  Oct  4 22:14:16 stanz sshd[2766]: Failed unknown for invalid user
eric from ::ffff: port 1843 ssh2

  #grep eric /etc/group

  #grep eric /etc/group
  eric:x:500:500:Eric Barry:/home/eric:/bin/bash

  /etc/nsswitch.conf is the default (all files)

If I comment out the AllowGroups option, it works fine and there is
nothing written to the logs...  

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Add group to the list of groups
2.Add user to new group
3.Add "AllowGroups <new group>" to /etc/sshd_config
4.Restart sshd service
5.Try to login

Actual Results:  Failed password attempts and errors written to log. 
Disconnect from service.

Expected Results:  Logged in to a session.

Additional info:
Comment 1 Tomas Mraz 2005-02-09 08:31:18 EST
I can't reproduce it on the current Fedora Core 3 with openssh-3.9p1-7.
If you have some additional info, please reopen.
Comment 2 Eric Barry 2005-02-09 09:00:45 EST
This was fixed in FC3.