Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[SOLVED] Broken sudo while in X

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
teknocrust
n00b
n00b
Posts: 11
Joined: Sun Feb 03, 2013 9:18 pm

[SOLVED] Broken sudo while in X

  • Quote

Post by teknocrust » Wed Feb 06, 2013 1:54 am

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: Select all

/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.
Top
teknocrust
n00b
n00b
Posts: 11
Joined: Sun Feb 03, 2013 9:18 pm

Bumpy

  • Quote

Post by teknocrust » Fri Apr 26, 2013 9:02 pm

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!
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

Re: Bumpy

  • Quote

Post by khayyam » Sat Apr 27, 2013 3:21 am

teknocrust wrote:any ideas???? I'll take anything!
teknocrust ... it might be an idea to compare with [post=7294300]this thread[/post] 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
Top
teknocrust
n00b
n00b
Posts: 11
Joined: Sun Feb 03, 2013 9:18 pm

Solved!

  • Quote

Post by teknocrust » Sat Apr 27, 2013 5:34 pm

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
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: Select all

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
Top
Post Reply

4 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic