# Fixing passwd(1) broken due to PAM I encountered the following issue on Ubuntu. It can theoretically affect other unixy systems that use [PAM (pluggable authentication modules)](!W "Pluggable authentication module"). Suppose you find your system in this unusual state: 1. `passwd` is broken: it reports success without even prompting you for a password; 2. You can log in as any user without entering a password on the console and through `su` and `sudo`. (I did not notice this at first, since I logged in remotely with an SSH key.) Then your system probably has bad PAM configuration. This is how your session may look: ```plaintext user@system$ passwd passwd: password updated successfully user@system$ ``` The most likely cause is that the Unix authentication module is disabled. In order to reenable it on Debian and Ubuntu, run the following command: ```shell sudo dpkg-reconfigure pam-runtime ``` In the menu that appears enable "Unix authentication". On other operating systems look up how to enable PAM modules. ## Source - ## See also - NetBSD's nice [introductory article on PAM](https://www.netbsd.org/docs/guide/en/chap-pam.html). It is not especially platform-specific. ## Page metadata URL: Published 2023-01-29, updated 2023-01-29. Tags: - how-to - Linux - security - sysadmin - troubleshooting - Unix