You are not logged in.

#1 2014-08-29 19:49:48

ryzion
Member
Registered: 2012-03-20
Posts: 95

su/sudo doesn't accept any input in password prompt, got a strace

I've installed arch on a new computer today. Occasionally sudo won't do anything after prompting for my password. It doesn't matter whether I type in my password or something else, after pressing enter nothing happens. Did anyone experience that before? After opening a new terminal it works for a while until I get stuck again.
E: Terminal application is rxvt as client. su won't work either in this terminal instance.
E: The user t20 has the groups t20 and wheel, as described in the wiki. Thats the only thing I did different from my other setups (a while ago, I added my users to wheel, users, lp, ... )

## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias	WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users.  These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias	ADMINS = millert, dowdy, mikef

##
## Cmnd alias specification
##
## Groups of commands.  Often used to group related commands together.
# Cmnd_Alias	PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
# 			    /usr/bin/pkill, /usr/bin/top

##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find   
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods.  Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL) ALL
t20 ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo	ALL=(ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw  # Ask for the password of the target user
# ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

Here's the strace output of a malfunctioning sudo:

-> % strace sudo pacman -S qtcurve-qt4 
execve("/usr/bin/sudo", ["sudo", "pacman", "-S", "qtcurve-qt4"], [/* 37 vars */]) = 0
brk(0)                                  = 0x7f135c94b000
fcntl(0, F_GETFD)                       = 0
fcntl(1, F_GETFD)                       = 0
fcntl(2, F_GETFD)                       = 0
access("/etc/suid-debug", F_OK)         = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=145441, ...}) = 0
mmap(NULL, 145441, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f135a95c000
close(4)                                = 0
open("/usr/lib/libutil.so.1", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\17\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=10688, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f135a95b000
mmap(NULL, 2105624, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f135a55d000
mprotect(0x7f135a55f000, 2093056, PROT_NONE) = 0
mmap(0x7f135a75e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1000) = 0x7f135a75e000
close(4)                                = 0
open("/usr/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\16\0\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=14672, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f135a359000
mprotect(0x7f135a35c000, 2093056, PROT_NONE) = 0
mmap(0x7f135a55b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x2000) = 0x7f135a55b000
close(4)                                = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
read(4, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\1\2\0\0\0\0\0"..., 832) = 832
fstat(4, {st_mode=S_IFREG|0755, st_size=2047384, ...}) = 0
mmap(NULL, 3858192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 4, 0) = 0x7f1359fab000
mprotect(0x7f135a14f000, 2097152, PROT_NONE) = 0
mmap(0x7f135a34f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 4, 0x1a4000) = 0x7f135a34f000
mmap(0x7f135a355000, 16144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f135a355000
close(4)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f135a95a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f135a959000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f135a958000
arch_prctl(ARCH_SET_FS, 0x7f135a959700) = 0
mprotect(0x7f135a34f000, 16384, PROT_READ) = 0
mprotect(0x7f135a55b000, 4096, PROT_READ) = 0
mprotect(0x7f135a75e000, 4096, PROT_READ) = 0
mprotect(0x7f135aba3000, 4096, PROT_READ) = 0
mprotect(0x7f135a980000, 4096, PROT_READ) = 0
munmap(0x7f135a95c000, 145441)          = 0
brk(0)                                  = 0x7f135c94b000
brk(0x7f135c96c000)                     = 0x7f135c96c000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1607712, ...}) = 0
mmap(NULL, 1607712, PROT_READ, MAP_PRIVATE, 4, 0) = 0x7f135a7cf000
close(4)                                = 0
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f135a97f000
read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 4096) = 2309
lseek(4, -1467, SEEK_CUR)               = 842
read(4, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\t\0\0\0\0"..., 4096) = 1467
close(4)                                = 0
munmap(0x7f135a97f000, 4096)            = 0
geteuid()                               = 1000
access("/usr/local/bin/sudo", X_OK)     = -1 ENOENT (No such file or directory)
access("/usr/bin/sudo", X_OK)           = 0
stat("/usr/bin/sudo", {st_mode=S_IFREG|S_ISUID|0755, st_size=142792, ...}) = 0
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2492, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f135a97f000
read(4, "# Locale name alias data base.\n#"..., 4096) = 2492
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x7f135a97f000, 4096)            = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/sudo.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "sudo: effective uid is not 0, is"..., 140sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
) = 140
exit_group(1)                           = ?
+++ exited with 1 +++

Last edited by ryzion (2014-08-30 01:15:57)

Offline

#2 2014-08-30 05:20:59

quantumphaze
Member
From: Melbourne, Australia
Registered: 2008-11-14
Posts: 175

Re: su/sudo doesn't accept any input in password prompt, got a strace

I'm having the same problem as you, so you are not alone.

Confirming that closing and opening a new terminal (Konsole on KDE in my case) works around it.


▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁

Offline

#3 2014-08-30 07:23:03

ryzion
Member
Registered: 2012-03-20
Posts: 95

Re: su/sudo doesn't accept any input in password prompt, got a strace

Have you recently installed the system or noticed any patterns i.e. getting the error after using a specific application or command?

Offline

#4 2014-08-30 08:30:52

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: su/sudo doesn't accept any input in password prompt, got a strace

Are you using zsh as your shell?

Offline

#5 2014-08-30 08:35:54

quantumphaze
Member
From: Melbourne, Australia
Registered: 2008-11-14
Posts: 175

Re: su/sudo doesn't accept any input in password prompt, got a strace

qwerty12 wrote:

Are you using zsh as your shell?

I am using zsh. Please tell me there's a fix.


▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▏▎▍▌▋▊▉█▇▆▅▄▃▂▁

Offline

#6 2014-08-30 08:43:22

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: su/sudo doesn't accept any input in password prompt, got a strace

The workaround I've been using is running

ttyctl -f

as early as possible in my zshrc.

stty will be non-functional while ttyctl is freezing the terminal settings but in my case, since I'd never even heard of that command prior to my searches in finding a fix, I can't say it really bothers me. At least I can run yaourt now without having my terminal messed up. If you do use stty often, here's a function that'll unfreeze the terminal settings first.

Last edited by qwerty12 (2014-08-30 08:46:21)

Offline

#7 2014-08-30 14:13:57

kahrkunne
Member
Registered: 2013-08-24
Posts: 88

Re: su/sudo doesn't accept any input in password prompt, got a strace

I can confirm this issue, using urxvt as terminal emulator and zsh as shell. Starting up a new terminal emulator makes it work again.

Offline

Board footer

Powered by FluxBB