Access denied for a particular user by PAM account configuration
The issue is with PAM stack configuration. Your host is configured with pam_access
and default configuration is not allowing external/SSH access for the new user golden
,even though your keys are setup properly.
Adding golden
user into /etc/security/access.conf
as below fixed the issue.
+:golden:ALL
To see more information readman access.conf
which explains each field of this file. Look at examples section to understand the order and meanings of LOCAL, ALL etc
I had the same issue and none of suggested options worked. But I found in one of forums (https://ubuntuforums.org/showthread.php?t=1960510) a "workaround" which worked perfectly.
Edit /etc/ssh/sshd_config
and set
UsePAM no
While it's probably not the real solution, because something is definitely wrong with my machine (yesterday it was working fine!), this one at least works.
I had the same issue. pam access would deny a particular user on one machine but not others. Eventually, realized I forgot to update /etc/shadow.
Once that's updated, the problem was fixed for me.