Bug 13455

Summary: xdm-1.1.4 and 1.1.6: xlogin*allowNullPasswd: true doesn't work until the second login attempt
Product: xorg Reporter: Shawn Rutledge <shawn.t.rutledge>
Component: App/xdmAssignee: Alan Coopersmith <alan.coopersmith>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: 7.2 (2007.02)   
Hardware: x86 (IA32)   
OS: Linux (All)   
URL: https://bugs.gentoo.org/show_bug.cgi?id=200709
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Assign allow_null_passwd and allow_root_login variables' values before call to pam_authenticate() none

Description Shawn Rutledge 2007-11-30 00:36:24 UTC
I tried adding this line to /etc/X11/xdm/XResources:

xlogin*allowNullPasswd: true

in order to allow a user with no passwd to log in.  (First I verified that the
user can log in from the console, and yes, indeed it does not ask for a
password.)  Then I restarted xdm and tried to log in.  The first time after starting xdm, it asks for a password, I leave the field empty, and fail to log in.  The second time however, after having failed to log in, I simply type the same username again, and it does not prompt for a password, but immediately logs in, as it should have done the first time.  If I log out and get back to the xdm prompt, the whole sequence can be repeated (username, empty password, fail; username, login successful).
Comment 1 Alan Coopersmith 2009-09-17 17:39:24 UTC
allowNullPasswd handling is specific to each authentication backend.

If using PAM, allowNullPasswd is passed to PAM as the setting or unsetting of PAM_DISALLOW_NULL_AUTHTOK, and left to PAM to enforce.
Comment 2 Tim Shumakov 2011-06-02 16:11:29 UTC
Created attachment 47464 [details] [review]
Assign allow_null_passwd and allow_root_login variables' values before call to pam_authenticate()
Comment 3 Alan Coopersmith 2011-06-02 18:45:06 UTC
Thanks for figuring this out!   A modified form of this patch has been sent
on to xorg-devel for review:

http://patchwork.freedesktop.org/patch/5720/
Comment 4 Alan Coopersmith 2011-06-07 22:33:30 UTC
Fix pushed to git master:
http://cgit.freedesktop.org/xorg/app/xdm/commit/?id=3c3f9cde9dda4c74178cc5428ebf8967c26a516a

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.