Subject: Re: PAM and Xserver
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@tac.gw.com>
List: current-users
Date: 03/01/2005 17:39:34
In article <20050301221839.GA7240@moray.salmi.ch>,
Jukka Salmi  <j+nbsd@2005.salmi.ch> wrote:
>Christos Zoulas --> current-users (2005-03-01 11:43:21 -0500):
>> In article <200503010523.32708.john@johnrshannon.com>,
>> John R. Shannon <john@johnrshannon.com> wrote:
>> >NetBSD 2.99.16 Ix86
>> >
>> >With an OS build from this AM's source I'm encountering:
>> >
>> >> startx
>> >
>> >Password:
>> >
>> >Fatal server error:
>> >PAM authentication failed, cannot start X server.
>> >        Perhaps you do not have console ownership?
>
>Same problem here.
>
>
>> >Suggestions for getting around this?
>> 
>> I just added an xserver pam config file. Please let me know if that
>> fixes the problem.
>
>No, unfortunately not. I'm using Kerberos V (except for root which has
>a local password). I'm able to start X using startx as root, but not
>as a non-root user:
>
>$ startx
>
>jukka@SALMI.CH's Password:
>Password:
>
>Fatal server error:
>PAM authentication failed, cannot start X server.
>        Perhaps you do not have console ownership?
>
>
>Note the password prompt...

So you see both prompts before typing anything?

>If I start /usr/X11R6/bin/XFree86 directly (as a non-root user) I'm asked
>for my Kerberos password; if entered correctly, X starts fine; otherwise
>same error message as above.

So you see the first prompt and then you type the krb password and
everything works?

>Adding a "auth sufficient pam_self.so" to /etc/pam.d/xserver seems to fix
>the problem (but then xconsole complains: "Couldn't open console"), but
>since I don't really know PAM I'm not sure if this is correct.

Who owns /dev/console at that point, and who owns it in the working case?

christos