Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 624  / 3 Years ago, wed, november 10, 2021, 11:13:55

Just noticed something odd happened to two of my Linux servers. We have two dozen Ubuntu 18.04 LTS servers, and all of them ask us for a prompt in the same way:


# ssh admin@pl3poland
admin@pl3poland's password:

However, we recently started enforcing stronger password requirements on two servers. We changed the settings in /etc/pam.d/common-password for libpwquality.


Before:


password        requisite                       pam_pwquality.so retry=3 

After:


password        requisite                       pam_pwquality.so retry=3 minlen=12 difok=3 minclass=4 maxrepeat=2 dictcheck=1 usercheck=1

It seems that after these values were changed, now the password prompt shows up differently. This is what comes up now:


# spawn ssh admin@spain
Password:

This is a relatively minor difference, but it has affected a few of our automated routines where we use expect scripts to connect to systems. I've changed the script to look for "sword:" instead of the full "password:", but I'm just curious why that would change, and if there is any way to change it back?


Looking through documentation, I found a command called "password-prompt" but it does not look like that is something I can use to permanently set the password prefix.


Anyone able to direct me to a .conf file or some documentation that explains how to change this? I come from an AIX background, and there was a file called /etc/security/login.cfg that we could change to adjust the "herald" for each login. But I don't see something similar in Ubuntu.


Thx


Steve N.


More From » login

 Answers
5

  • user@server's password is used for password authentication

  • Password: is used for keyboard-interactive authentication


Both are set with an SSH option:



  • PreferredAuthentications=password

  • PreferredAuthentications=keyboard-interactiv


as definied in rfc 4252 and rfc 4256 so it is unlikely related to a change in /etc/pam.d/common-password and more to do with a change in .ssh/config and the setting PreferredAuthentications or by setting it with an option with ssh -o.


[#1732] Wednesday, November 10, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
etzelmortg

Total Points: 430
Total Questions: 105
Total Answers: 106

Location: Suriname
Member since Sun, Jun 13, 2021
3 Years ago
;