Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #160489

Re: SSHD AllowUsers not limiting users anymore

From Paulo Roberto <betobrandao@gmail.com>
Newsgroups linux.debian.user
Subject Re: SSHD AllowUsers not limiting users anymore
Date 2015-11-12 17:20 +0100
Message-ID <qu2Lo-2J4-27@gated-at.bofh.it> (permalink)
References <qtM3T-lk-9@gated-at.bofh.it> <qu1cD-1EX-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Chris,

I'm not aware of anything special in my PAM configuration, I think It is
still using the default configs.

user1 is a complete different user than any other, It has its unique user
id.
If a create a brand new user, the same problem happens.

I could say I'm using the correct /etc/ssh/sshd_config because other
changes to the file are read.
To be sure, as you can see at my last e-mail, I passed the -f  command line
option to run sshd.

The DenyUsers option is not working as well. I tried it with user1 and it
does not block the user.

Below follow my /etc/pam.d/sshd, if you need any other file, please, let me
know.

Thanks again for your help.

# PAM configuration for the Secure Shell service

# Standard Un*x authentication.
@include common-auth

# Disallow non-root logins when /etc/nologin exists.
account    required     pam_nologin.so

# Uncomment and edit /etc/security/access.conf if you need to set complex
# access limits that are hard to express in sshd_config.
# account  required     pam_access.so

# Standard Un*x authorization.
@include common-account

# SELinux needs to be the first session rule.  This ensures that any
# lingering context has been cleared.  Without this it is possible that a
# module could execute code in the wrong domain.
session [success=ok ignore=ignore module_unknown=ignore default=bad]
pam_selinux.so close

# Set the loginuid process attribute.
session    required     pam_loginuid.so

# Create a new session keyring.
session    optional     pam_keyinit.so force revoke

# Standard Un*x session setup and teardown.
@include common-session

# Print the message of the day upon successful login.
# This includes a dynamically generated part from /run/motd.dynamic
# and a static (admin-editable) part from /etc/motd.
session    optional     pam_motd.so  motd=/run/motd.dynamic
session    optional     pam_motd.so noupdate

# Print the status of the user's mailbox upon successful login.
session    optional     pam_mail.so standard noenv # [1]

# Set up user limits from /etc/security/limits.conf.
session    required     pam_limits.so

# Read environment variables from /etc/environment and
# /etc/security/pam_env.conf.
session    required     pam_env.so # [1]
# In Debian 4.0 (etch), locale-related environment variables were moved to
# /etc/default/locale, so read that as well.
session    required     pam_env.so user_readenv=1
envfile=/etc/default/locale

# SELinux needs to intervene at login time to ensure that the process starts
# in the proper default security context.  Only sessions which are intended
# to run in the user's context should be run after this.
session [success=ok ignore=ignore module_unknown=ignore default=bad]
pam_selinux.so open

# Standard Un*x password updating.
@include common-password

On Thu, Nov 12, 2015 at 12:34 PM, Christoph Anton Mitterer <
calestyo@scientia.net> wrote:

> On Wed, 2015-11-11 at 20:20 -0200, Paulo Roberto wrote:
> > The option AllowUsers of /etc/ssh/sshd_config stopped working.
> I did a small check, and it still works here, as expected... anything
> special with your PAM? Are you sure that you checked on the right hosts
> with the right sshd_config in place? Or could user1 be a synonym to the
> allowed one (i.e. same UID)?)
>
> Cheers,
> Chris.

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

SSHD AllowUsers not limiting users anymore Paulo Roberto <betobrandao@gmail.com> - 2015-11-11 23:30 +0100
  Re: SSHD AllowUsers not limiting users anymore Joel Rees <joel.rees@gmail.com> - 2015-11-12 11:30 +0100
    Trimming posts (was ... Re: SSHD AllowUsers not limiting users  anymore) Chris Bannister <cbannister@slingshot.co.nz> - 2015-11-12 13:30 +0100
  Re: SSHD AllowUsers not limiting users anymore Christoph Anton Mitterer <calestyo@scientia.net> - 2015-11-12 15:40 +0100
    Re: SSHD AllowUsers not limiting users anymore Paulo Roberto <betobrandao@gmail.com> - 2015-11-12 17:20 +0100

csiph-web