You are not logged in.

#1 2012-07-06 17:12:13

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

[Hacked, not solved] [KDE SC + PAM issue] pam_unix(chfn:auth) fail

Hi folks, I'm stuck with this weird error and while I thoroughly raked over the net I can't find any piece of information that can help me figure out why is this happening and how to solve it.

/var/log # cat errors.log
Jul  6 12:18:44 localhost chfn: pam_unix(chfn:auth): conversation failed
Jul  6 12:18:44 localhost chfn: pam_unix(chfn:auth): auth could not identify password for [msx]

Long story short: System Settings "freeze" when I try to authenticate myself after changing my real name.

Steps to reproduce:
1. Launch System Settings --> Account Details --> User Information: Name.
2. Enter whatever you want and hit Apply button.
3. An authentication window will pop-up asking for my user [UID1000] password.
4. After feeding it with my password it will close and the System Settings window will be froze.

So far, this is what seems to be happening backstage:
For whatever reason KDE (systemsettings) fails to talk to pam_unix module so authentication fails and instead showing an error and give me back the control over the application, System Settings _freezes_ or, more accurately keeps waiting for a response from pam_unix module - at least this is what I think it's happening. Edit: this is true for newly created users too [UID500]
I'm certainly sure this must be an issue between KDE and PAM because I haven't any problem using chfn from the command line. Might this be related with the upgrade of core/pam and core/pambase packages that took place some days ago? Or may be the core/shadow upgrade?

Are these pam files okay?
~ $ cat /etc/pam.d/chfn

#%PAM-1.0
auth            sufficient      pam_rootok.so
auth            required        pam_unix.so
account         required        pam_unix.so
session         required        pam_unix.so
password        required        pam_permit.so

~ $ cat /etc/pam.d/kde

#%PAM-1.0
auth            required        pam_unix.so
auth            required        pam_nologin.so
auth        required    pam_env.so
account         required        pam_unix.so
password        required        pam_unix.so
session         required        pam_unix.so
session         required        pam_limits.so
-session    optional    pam_systemd.so

~ $ cat /etc/pam.d/kde-np

#%PAM-1.0
auth            required        pam_nologin.so
auth            required        pam_permit.so
auth        required    pam_env.so
account         required        pam_unix.so
password        required        pam_unix.so
session         required        pam_unix.so
session         required        pam_limits.so
-session    optional    pam_systemd.so

~ $ cat /etc/pam.d/polkit-1

auth            requisite       pam_nologin.so
auth            required        pam_env.so
auth            required        pam_unix.so
account         required        pam_unix.so
session         required        pam_limits.so
session         required        pam_unix.so
password        required        pam_unix.so

~ $ cat /etc/pam.d/shadow

#%PAM-1.0
auth            sufficient      pam_rootok.so
auth            required        pam_unix.so
account         required        pam_unix.so
session         required        pam_unix.so
password        required        pam_permit.so

~ $ cat /etc/pam.d/system-services

#%PAM-1.0

auth      sufficient  pam_permit.so

account   include     system-auth

session   optional    pam_loginuid.so
session   required    pam_limits.so
session   required    pam_env.so
session   required    pam_unix.so
session   optional    pam_permit.so

~ $ cat /etc/pam.d/usermod

#%PAM-1.0
auth            sufficient      pam_rootok.so
auth            required        pam_unix.so
account         required        pam_unix.so
session         required        pam_unix.so
password        required        pam_permit.so

While this issue isn't a show-stopper by itself it's certainly burning my brain while I try to figure out why did happen this to my Arch + KDE SC install -seems there's no other else having this problem- and how to solve it, damnit!
Any idea, suggestion, anything will be much appreciated! =D

Martín


*UPDATE*
After some research I repeated the above four steps again and finally discovered that for some reason the application /usr/bin/chfn, responsible for managing finger information, stays waiting indefinitely for pam_unix module to athorize it to make the requested change to the system. This is what I got (and it isn't "lovin'" in this case):

/etc/pam.d # ps aux|grep chfn

root     22785  0.0  0.0  29644  1064 pts/3    Ss+  22:56   0:00 /usr/bin/chfn -f msx
root     22787  0.0  0.0   8664  1068 pts/2    S+   22:56   0:00 grep --color=auto chfn

From the moment I kill the process I have control again of the System Settings application.

So, why isn't pam_unix handling the request as it should do is a mistery (ATM), I guess I need to gdb/strace the whole routine System Settings utilizes to authenticate the user if I want to discover what's happening here (I will do that another day, today my eyes are like these  =_= )
What's relevant is that I already make it work with an ugly hack, I added

auth            sufficient      pam_wheel.so trust use_uid

to /etc/pam.d/chfn file in order to explicitly authorize my user (already in the wheel group) to make unrestricted use of the /usr/bin/chfn tool.
I know, I'm a dirty one, a SoaB, a truly motherfu***r and I never would do something like this in any production machine, but hey, this is my own Arch install!

This is why I enjoy this so much, at some point hacking the system this way -no matter how dirty is the hack- is like cooking: it's all about how the cooker (or the user) combines the ingredients - oh yeah.
This is the truly beauty and magic of GNU/Linux and of how flexible and open it is but particularly how awesome The Arch Way implementation of GNU/Linux is, by far -far, far, far- the best one at this side of the Big Bang (theory).

Last edited by msx (2012-07-07 02:59:45)


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

Board footer

Powered by FluxBB