Password Expiry Promtps Not Visable

Hi all.

On our systems we use the password expiry through the shadow file. This was recently implemented and the first round of expiry has just arrived.

The problem that i have is that when users are attempting to log on to a box (directory through putty) there are no prompts displayed if your new password does not meet the appropriate criteria.

For example, if you enter a 7 digit password as the new one, there should be a message advising that 'Password too short - must be at least 8 characters.'. this is not visable when logging directly on to a box using putty. However, if you log on to another box and ssh to the box with the expired password, it does display that message.

The problem i have is that all will expire at the same time so the ssh option would be out of the question for majority of users!

Anyone got any ideas why this would be happening through putty or have any other ideas?

Thanks in advance

Boneyard.

1 Like

Can you kindly provide the Solaris version? And btw, tne users should have a valid password before they can ssh right? Meaning the a/c is not locked..
Dont get your question tat clearly.

sorry....i stupidly forgot all that important info :wink:

running Solairs 10

putty version is .60

it just seems really odd....i've now been banging my head against the wall for a couple of hours now and just cant see what it could be. at one point i thought maybe its struggling with rsa key cache for putty, so deleted that but it still doesn't get me any further

all help appreciated.

thanks

Can you post us the /etc/default/passwd and /etc/ssh/sshd_config (impt param) files?
What are the typical entries?
eg
PASSREQ=yes
PASSLENGTH=7
MAXWEEKS=8
MINWEEKS=0
WARNWEEKS=1
MAXRETRY=5
HISTORY=5

Here you go.

MAX/MIN WEEKS are blank becauses we are using the shadow file to track password expiry so that not all user a effected.

MAXWEEKS=
MINWEEKS=
PASSLENGTH=8
HISTORY=10
MINALPHA=4
MINDIFF=7
MINDIGIT=1
MINSPECIAL=0
MINUPPER=1
MINLOWER=2
MAXREPEATS=2
WHITESPACE=YES
NAMECHECK=YES
DICTIONDBDIR=/var/passwd
DICTIONLIST=/usr/share/lib/dict/words

Protocol 2

# Both v1 and v2 (not recommended)
#Protocol 2,1

# Only v1 (not recommended)
#Protocol 1

# Listen port (the IANA registered port number for ssh is 22)
Port 22

# The default listen address is all interfaces, this may need to be changed
# if you wish to restrict the interfaces sshd listens on for a multi homed host.
# Multiple ListenAddress entries are allowed.

# IPv4 only
#ListenAddress 0.0.0.0
# IPv4 & IPv6
ListenAddress ::

# Port forwarding
AllowTcpForwarding no

# If port forwarding is enabled, specify if the server can bind to INADDR_ANY.
# This allows the local port forwarding to work when connections are received
# from any remote host.
GatewayPorts no

# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

# The maximum number of concurrent unauthenticated connections to sshd.
# start:rate:full see sshd(1) for more information.
# The default is 10 unauthenticated clients.
#MaxStartups 10:30:60

# Banner to be printed before authentication starts.
Banner /etc/issue

# Should sshd print the /etc/motd file and check for mail.
# On Solaris it is assumed that the login shell will do these (eg /etc/profile).
PrintMotd no

# KeepAlive specifies whether keep alive messages are sent to the client.
# See sshd(1) for detailed description of what this means.
# Note that the client may also be sending keep alive messages to the server.
KeepAlive yes

# Syslog facility and level
SyslogFacility auth
LogLevel info

#
# Authentication configuration
#

# Host private key files
# Must be on a local disk and readable only by the root user (root:sys 600).
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key

# Default Encryption algorithms and Message Authentication codes
#Ciphers aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc
#MACS hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96

# Length of the server key
# Default 768, Minimum 512
ServerKeyBits 768

# sshd regenerates the key every KeyRegenerationInterval seconds.
# The key is never stored anywhere except the memory of sshd.
# The default is 1 hour (3600 seconds).
KeyRegenerationInterval 3600

# Ensure secure permissions on users .ssh directory.
StrictModes yes

# Length of time in seconds before a client that hasn't completed
# authentication is disconnected.
# Default is 600 seconds. 0 means no time limit.
LoginGraceTime 600

# Maximum number of retries for authentication
# Default is 6. Default (if unset) for MaxAuthTriesLog is MaxAuthTries / 2
MaxAuthTries 6
MaxAuthTriesLog 3

# Are logins to accounts with empty passwords allowed.
# If PermitEmptyPasswords is no, pass PAM_DISALLOW_NULL_AUTHTOK
# to pam_authenticate(3PAM).
PermitEmptyPasswords no

# To disable tunneled clear text passwords, change PasswordAuthentication to no.
PasswordAuthentication yes

# Use PAM via keyboard interactive method for authentication.
# Depending on the setup of pam.conf(4) this may allow tunneled clear text
# passwords even when PasswordAuthentication is set to no. This is dependent
# on what the individual modules request and is out of the control of sshd
# or the protocol.
PAMAuthenticationViaKBDInt yes

# Are root logins permitted using sshd.
# Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user
# maybe denied access by a PAM module regardless of this setting.
# Valid options are yes, without-password, no.
PermitRootLogin without-password

# sftp subsystem
Subsystem sftp /usr/lib/ssh/sftp-server

# SSH protocol v1 specific options
#
# The following options only apply to the v1 protocol and provide
# some form of backwards compatibility with the very weak security
# of /usr/bin/rsh. Their use is not recommended and the functionality
# will be removed when support for v1 protocol is removed.

# Should sshd use .rhosts and .shosts for password less authentication.
IgnoreRhosts yes
RhostsAuthentication no

# Rhosts RSA Authentication
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts.
# If the user on the client side is not root then this won't work on
# Solaris since /usr/bin/ssh is not installed setuid.
RhostsRSAAuthentication no

# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication.
#IgnoreUserKnownHosts yes

# Is pure RSA authentication allowed.
# Default is yes
RSAAuthentication yes

Please correct me if Im wrong. In this stmt, are you referring to as logging in directly to the console of the box using putty on your notebook?

yeah. logging on to a box using putty prompts for the password change but if i enter a password string that isn't long enough, it doesn't mention the error, just bombs out to the login prompt again.

however, if i hop on to a different box and ssh to the one in question, it will notify me that the new password chosen does not meeting the required criteria and must be 8 characters long.

does that make sense?

thanks

Im not too sure.. But as far as I know this feature is new since Solaris 10/04 release.
The sshd daemon uses the variables in /etc/default/login and the login command. The etc/default/login variables can be overridden by values in the sshd_config file during ssh.

However, did you try to login to the server as root and check the messages file that the login attempts are logged in there? Please check and let me know
And what I have seen so far from the console is to set the new password. Never encountered a situation where it will prompt for the 'Password too short - must be at least 8 characters' error before

These messages aren't managed by PAM instead of SSH ?

I think you should check your PAM configuration to see if STDERR is not redirected to /dev/null or something like this.

ahh, i never thought about the PAM configuration. It just seems odd that ssh from another solaris box works fine, in that it prompts to say 'password too short' but putty (using ssh) doesnt...wierd!

authlog writes out the following when attempting to connect through putty (at the point at which a new password is requested)

Keyboard-interactive (PAM) userauth failed[20] while changing authentication tokens (password): Authentication token manipulation error

cheers

---------- Post updated at 02:36 PM ---------- Previous update was at 02:21 PM ----------

any ideas what piece of the PAM configuration i need to look at?

thanks

Try to set UsePAM to no or UsePrivilegeSeparation to yes in the configuration of the SSH server

Source : http://lists.mindrot.org/pipermail/openssh-unix-dev/2008-October.txt

But look again, it seems that it is still referring to a remote connection

If I do "UsePAM no" _or_ "UsePrivilegeSeparation yes" then the password
change process works...
  WARNING: Your password has expired.
  You must change your password now and login again!
  Changing password for user fred.
  Changing password for fred
  (current) UNIX password: 
  New UNIX password: 
  Retype new UNIX password: 
  passwd: all authentication tokens updated successfully.
  Connection to localhost closed.

(that logout and login again process is annoying)

yeah. the whole thing is driving me crazy to be honest. the password will change fine for me (without any of the above change being made) my concern is the fact that general users will not receive the help prompts when attempting to log on through putty to a server that requires the password to be updated.

as i say, using ssh from another sun box works fine ie displays the prompt info

cheers

Who knows.. Maybe its the default behaviour :o