Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Broken sudo while in X
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
teknocrust
n00b
n00b


Joined: 03 Feb 2013
Posts: 11

PostPosted: Wed Feb 06, 2013 1:54 am    Post subject: [SOLVED] Broken sudo while in X Reply with quote

Hey, ever since the last set of update sudo no longer works, but only when i'm in X, at the console it works fine..

I've traced the issue down several things to the following line from
1.
/dev/tty at boot has bad permissions root:root instead of root:tty breaking xterm
after a chown that.. i get the next issue

2.
Code:

/etc/pam.d/sudo

auth      required   pam_unix.so debug


If I remove that line it will login without any password prompt via pam_permit.so

The issue is that a command like 'sudo ls' doesn't throw any error it just sits and waits forever until i break out of it..
.. itseems to be that it DOES prompt for the password but on my console at vt04 (where i run X) the same console that X11 is running on, after I kill my X session i'll see a list of

password:
password:
password:
password:

lines on the console...

the only error i see appears after i ^C out of sudo..

[pam_ssh] can't get passphrase from PAM
[sudo] pam_unix(sudo:auth): conversation failed
[sudo] pam_unix(sudo:auth): auth could not identify password for [*****]

why isn't it prompting me in my xterm instead?? I can't figure this one out at all

any helpful pointers would be great....

PS: Also I use slim normally, and tried xldm but it is also broken for me right now.. i also run awesome-wm..
PPS: 'less' as a pager option is also broken!!


Last edited by teknocrust on Sat Apr 27, 2013 5:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
teknocrust
n00b
n00b


Joined: 03 Feb 2013
Posts: 11

PostPosted: Fri Apr 26, 2013 9:02 pm    Post subject: Bumpy Reply with quote

Still having this same issue
narrowed it down to the following....

with /dev/tty set to root:tty 0660

less works while in X (non root user only)
sudo works fine
su works fine


with /dev/tty set to root:tty 0666 (the proper permissions)
less broken for root and non-root users
sudo broken for all users (never prompts for password)
(sudo also will not obey calls to SUDOASKPASS that i have set)
su works fine


strace doesn't give me any insight..
and all my config files appear to be in good order...

This behavior only occurs in X, at console less and sudo appear to work fine..

any ideas???? I'll take anything!
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sat Apr 27, 2013 3:21 am    Post subject: Re: Bumpy Reply with quote

teknocrust wrote:
any ideas???? I'll take anything!

teknocrust ... it might be an idea to compare with this thread as both have similar symptoms.

I was using 3.7.10 for some time and had no issues with /dev/tty ... not that this rules out the kernel, but makes it less likely ... and as I remember the user from the above thread is using 3.8.x

Late for me so I'll leave it at that ... best ... khay
Back to top
View user's profile Send private message
teknocrust
n00b
n00b


Joined: 03 Feb 2013
Posts: 11

PostPosted: Sat Apr 27, 2013 5:34 pm    Post subject: Solved! Reply with quote

YAY thanks for the reference here is the issue and how I solved it

I noticed from referenced posts that it looks like my initrd scripts or something was replacing /dev/tty
by doing an init-ram hack of
Quote:
cp -a /dev/console /dev/tty


this is bad as they are not the same nodes!

/dev/console is c 5 1
/dev/tty is c 5 0

Code:

rm /dev/tty
mknod -m 0666 /dev/tty c 5 0
chown root:tty /dev/tty


After I did that, my less, xterm, sudo and gpg all worked again!!!

This fix should also work for this thread too
https://forums.gentoo.org/viewtopic-p-7294300.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum