Alright, let me tell you about this thing, pam01349. It wasn’t exactly planned, more like stumbled into it while tinkering.

I was working on setting up a new user account on one of my boxes. Pretty standard stuff, right? Add user, set password, done. But then I wanted to get a bit fancy, trying to tweak some login restrictions using PAM, Pluggable Authentication Modules. Heard about it, thought I’d give it a whirl.
So, I started digging into the config files in /etc/pam.d/
. Mostly looking at common-auth
and common-password
. Just wanted to see if I could enforce slightly stronger password rules, maybe log failed attempts differently.
Things seemed okay at first. Made a few changes, saved, tested login with a test user. Worked fine. Then I rebooted the machine later for something else entirely. When it came back up, trying to log in via console gave me this weird delay, and then sometimes it just failed with a generic message. SSH was still working, thankfully.
Checked the system logs, /var/log/*
specifically. That’s where I saw it: lines mentioning something like “pam_module(XXX): unexpected return value 01349” or similar cryptic stuff tagged somehow with pam01349. Not exactly an error code, more like an internal state or reference I guess. Couldn’t find much about this specific “pam01349” identifier anywhere.
This got annoying fast. What did I even change? I thought I was being careful.

- First, I backed out my recent changes in
/etc/pam.d/
. Put the original files back. Rebooted. Still had the issue! - Then I thought maybe a package update went wrong? Checked update history. Nothing obvious seemed related to PAM or authentication around the time it broke.
- Spent a good hour just reading the PAM config files again, line by line. Trying to understand the flow – `required`, `requisite`, `sufficient`, `optional`. Man, that stuff can twist your brain.
I started commenting out lines one by one in the PAM config files, specifically in common-auth
and login
, trying to isolate which module was causing the grief. Restarting the display manager or just trying `su – testuser` after each change. Tedious work.
Eventually, I narrowed it down. It seemed related to a module I hadn’t even touched directly, but maybe its interaction changed because of my earlier tweaks? Or perhaps it was interacting badly with something else entirely. The pam01349 reference seemed to pop up when a specific optional module was trying to do its thing but failing silently, and the system wasn’t handling that failure gracefully during console login.
The Fix? It wasn’t straightforward. I ended up having to rearrange the order of a couple of lines in one of the common PAM files. Made sure one module finished completely before another one started. It felt like trial and error, honestly. The key was ensuring the stack processed things in the right sequence, and that the control flags correctly handled the potential failure of that one module without blocking the whole login.
So yeah, pam01349 wasn’t the problem itself, just a symptom or a marker pointing towards a flaky module interaction deep in the PAM stack. Took way longer than it should have, mostly because the identifier itself wasn’t directly searchable. Just another day wrestling with Linux configs, I guess. Learned a bit more about PAM, mostly by breaking it first.