I've never encountered this before when using FreeBSD, but I recently got a new BSD VPS, and when I logged in as a wheel user and su to root, I used "passwd" to change the root password, but this only appears to have changed the password locally (works for su, but not ssh; I can ssh with the default password); I cannot login as root using this password.

I made sure root login was enabled in /etc/ssh/sshd_config, and from the reading I did on the matter, as well as consulting the man page, there can be different types (for different authentication methods) of passwords (though I may have misunderstood).


Both the console and ssh login are passed through PAM by default, which by default uses the "unix" method of password verification (on FreeBSD is uses a database version od the passwd.master file). In your case I think you can assume that console and ssh have different configurations in PAM. Check /etc/pam.d/sshd, the default configuration of the auth, account, and password sections ends with pam_unix.so... the /etc/pam.d/login file should look similar (though by default the sshd file has more options).

  • Thanks. When the VPS was provisioned, it seems, the /etc/pam.d/login and sshd files were jumbled and partially unreadable; I was able to recreate them and the password changes and changed in sshd_config were applicable. – tony_perkis666 Jan 20 '13 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.