1

I want to set password policies for users on a Debian VM, like minlen and special char required for the password.

In my Debian VM I get an error and canĀ“t log in again via SSH to that machine.

OS Version: Debian Bullseye 11

Kernel Version: Linux 5.10.0-9-amd64 x86_64

Modifying the config file /etc/pam.d/common-password starting at the line:

# here are the per-package modules (the "Primary" block)
password        [success=1 default=ignore]      pam_unix.so obscure yescrypt

and inserting something like shown in (https://www.networkworld.com/article/2726217/how-to-enforce-password-complexity-on-linux.html):

minlen=8 dcredit=1 ucredit=1 lcredit=1 ocredit=1

Without any changes at that file I can enter the machine without any problems e.g. Public Key is uploaded correctly, SSH Port is open, SSH and SSHD services are active.

Again when I try to remote connect via SSH:

ssh -v USER@IP

I get in the last lines this error:

debug1: Next authentication method: password
USER@IP's password:

debug1: Authentications that can continue: publickey,password

Permission denied, please try again.
nemo
  • 11
  • 3

0 Answers0