[SOLVED] alias with sudo: Password request malfunction

Okay so here are two cool little system-maintenance related aliases, as suggested by "pacman tips" Wiki:
Show dirs not owned by any package:
alias pacman-disowned-dirs="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
Show files not owned by any package:
alias pacman-disowned-files="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
typically I edit those into my "/etc/bash.bashrc" instead of "~/.bashrc", but there's no difference there. The thing is, when I invoke this alias,
as regular user, it promptly requests [sudo] password, as it should, but after a brief moment the console returns to normal, there's no time for to even input the password, like this:
[danilo@dandelion ~]$ pacman-disowned-dirs
[sudo] password for danilo:
[danilo@dandelion ~]$
PS: If my password is still cached, it will work normally (my timeout is set to 30 min).
here's my "/etc/bash.bashrc" at any rate:
# /etc/bash.bashrc
## If not running interactively, don't do anything ##
# [[ $- != *i* ]] && return
## Prompt display configurations ##
set_prompt () {
local last_command=$? # Must come first!
PS1='\[\e[1;33m\]'
if [[ $last_command != 0 ]]; then
PS1+='$?'
fi
if [[ $EUID == 0 ]]; then
PS1+='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '
else
PS1+='\[\e[1;34m\][\u@\h \W]\$\[\e[0m\] '
fi
PROMPT_COMMAND='set_prompt'
PS2='> '
PS3='> '
PS4='+ '
## Original default configs ##
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
esac
## File sourcing ##
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
## Functions ## {{{
## Aliases ## {{{
# Privileged access #
if [ $UID -ne 0 ]; then
alias sudo='sudo '
alias scat='sudo cat'
alias svim='sudoedit'
alias root='sudo -i'
alias reboot='sudo systemctl reboot'
alias poweroff='sudo systemctl poweroff'
alias update='sudo pacman -Su'
alias netctl='sudo netctl'
fi
# listing #
alias ls='ls -hF --color=auto'
alias lr='ls -R' # recursive ls
alias ll='ls -l'
alias lall='ls -la'
alias la='ll -A'
alias lx='ll -BX' # sort by extension
alias lz='ll -rS' # sort by size
alias lt='ll -rt' # sort by date
alias lm='la | more'
# Show dirs that do not belong to any package #
alias pacman-disowned-dirs="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
# Show files that do not belong to any package #
alias pacman-disowned-files="comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) && <(pacman -Qlq | sort -u)"
Last edited by DVNO (2014-08-12 05:12:57)

You'd suppose it would work, but no, same error... Perhaps it traces back to some other configuration file...
By the way, the second command, I didn't paste it correctly; There's no "&&" before the pacman query part of the command. Fixing the post now...
Well, anyways, I believe I got'em working, I appended a useless command that requires elevation AND works properly, like this:
alias pacman-disowned-dirs="sudo true && comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type d -print | sed 's/\([^/]\)$/\1\//' | sort -u) <(pacman -Qlq | sort -u)"
And:
alias pacman-disowned-files="sudo true && comm -23 <(sudo find / \( -path '/dev' -o -path '/sys' -o -path '/run' -o -path '/tmp' -o -path '/mnt' -o -path '/srv' -o -path '/proc' -o -path '/boot' -o -path '/home' -o -path '/root' -o -path '/media' -o -path '/var/lib/pacman' -o -path '/var/cache/pacman' \) -prune -o -type f -print | sort -u) <(pacman -Qlq | sort -u)"
...Still, it's a r@t workaround, not a proper solution, so I'll ask to not mark this as solved yet. Maybe someone can backtrack this properly.
Thank you, for the quick reply, much appreciated.

Similar Messages

  • Recent upgrade to 3.1.2 and issue with voicemail password request

    just went thru the 3.1.2 upgrade, froze my original phone-just like the 3.1 upgrade- had to go to store and get a new refurshied phone (dont even go there!) which only worked for three days, then had to return to store again......excuse me, i do sound angry don't i?
    anyway, now i continue to get a message----"password incorrect enter voicemail password" now i have never had a voicemail password so i can not figure out why it wants one- have never seen this message until the upgrade... cant make it go away either- any suggestions out there? thanks

    EVERYTIME I update my phone, I lose all my music, podcasts, and apps. I dont know why. Pics, contacts, texts, etc are all saved, but anything else is deleted and NOT restored when the phone is restored from backup. I feel your pain...

  • How can I disable nagging "Apple-ID" password requests?

    Hello,
    In order to describe the problem I'm experiencing, I need to say some things in advance. I'm trying to install the same software on each of our 10 iPads. To do so, I install all necessary apps on one selected iPad (from here on "iPad No. 1") and do all in-app-purchases I want to do. On this particular iPad, everything will work fine, but not on the other ones.
    Afterwards, I create a backup of iPad No. 1 within iTunes using the Option "Save" (all captions are translated from German and might not match exactly with English captions). Then, all iPads are connected to my computer, one after another. All of them have the same name and are fed with the data from iPad No. 1 using the iTunes option "revert to backup...".
    Then, all iPads are supplied with a profile using the "iPhone Configuration Utility". The profile contains wifi access data among settings for password requests as well as permissions to use the iTunes Store and to do in-app-purchases. The last three options must be unrelated to my problem, though, because I tried all possible combinations of those three options (brute force) and changing the configuration to any of those settings did not solve my problem, which I will come to describe in a second.
    Until I did some in-app-purchases, the above procedure worked just fine and I wasn't bothered with any password requests. But now, all of my iPads have the following problems - except for iPad No. 1:
    The in-app-purchases are registered on all iPads, i.e. I'm not asked to pay again for what I already paid for. Yet, the additional data and program functionality I bought in iPad No. 1 and downloaded on iPad No. 1 is unavailable on all other iPads and needs to be downloaded manually by the push of a button. Note: I do not need to enter any password in order to download the in-app-purchases I already made. But 12 In-App-purchases on 10 iPads makes 120 manual actions for each time I need to reset the devices to the backup I created. That alone makes this procedure a real hassle, and things are getting worse:
    All devices except for iPad No. 1 will ask for "password for Apple-ID" regularly, e.g. when the device is switched on after the backup. Since the devices are to be used in an educational environment and were selected as the devices of choice for the mere reason that they are very easy to use without any knowledge of computer equipment, this makes the whole thing completely unusable.
    The password requests will stop once I manually downloaded the in-app-purchases.
    In other topics, I read that this "password request problem" can be caused by incompletely downloaded software. People have advised others who had this problem to "synchronize" and "submit purchases" within iTunes. But doing those after "revert to backup" didn't help, as expected.
    It is correct, though, that the problem seems to be related to incompletely downloaded software. Yet I don't know what I could do to transfer the in-app-purchases from iPad No. 1 to the other devices. Any kind of help would be greatly appreciated, even if it's just a partial solution to what I described.
    Best regards,
    Jörg

    If your two IDs have duplicate contacts, simply turn contact syncing off in one of them. You can do this on your Mac at system preferences > iCloud or on a mobile device at settings> iCloud.

  • Problems with resetting password.

    One of my family members cannot reset their Apple ID password, the email that is supposed to be sent with their password request never arrives, is there something that can be done?

    Check the junk mail folder.

  • Continuous password request

    I'm currently running iTunes 8.1.1; I have a great number of Apps from the Appstore that need updating, however ever since I upgraded to version 8.1.0, when I check for new updates iTunes will continually ask for my password.
    If I enter my password incorrectly, I will get message telling me so. But when I'm entering my password correctly, it will just pop up with the password request again and again until I finally cancel. I haven't been able to update my Apps in iTunes for weeks.
    Has anyone else experienced this?

    Yes. i'm also having this problem. do you use Netbarrier? some folks hadn't checked something in that program if you run it which caused this problem, but i don't use that program and i'm still having this problem. very annoying... still looking for a fix..

  • How to launch a finder with password requested, not using  sudo in terminal

    Hi,
       I would like to have a finder with password requested in Mac like we move the the driver in /System/Library/extensions folder to trash by command lines.  Using "sudo delete"  in terminal will have the DOS-style and not good-looking for users.  That is, I would like to have the GUI with password by some commands(or scripts) before I removing the driver.
    Thanks for your help.
    Jason

    You shouldn't be doing anything with system files. Those don't belong to you. If you need to install or update software in /Library, create an installer package. It will run as root, after prompting for administrator credentials.

  • [SOLVED] Don't have permission to turn off bluetooth, even with sudo!

    I never use bluetooth on my laptop, but every time I boot arch the radio and light are both on. I tried unloading the bluetooth module, using bluez and other tools to shut off bluetooth, etc., but that radio just stays on. After searching the web for a while, I finally found the solution: cut off power to the device. I can do that with this command:
    echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
    And turn it back on by changing "0" to "255". The only problem is, I can't run this as a normal user, and I can't even run it with sudo! Here is the output:
    $ echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
    zsh: permission denied: /sys/devices/platform/sony-laptop/bluetoothpower
    $ sudo echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
    zsh: permission denied: /sys/devices/platform/sony-laptop/bluetoothpower
    (I'm using zsh but this also happens with bash)
    However, I can su to root and run this command successfully
    $ su
    Password:
    # echo "0" > /sys/devices/platform/sony-laptop/bluetoothpower
    And off goes the light. I would like to somehow turn off bluetooth at boot, but I don't know how to have Arch run a command as the root user at boot after loading the modules (to ensure the bluetooth radio is not started up again). It seems that bluetoothpower is created at each boot, because I tried changing the permissions to read & write for all, then adding the command to my .xinitrc. This worked, but only during that session. After rebooting I had the same problem.
    Help?
    Last edited by Allamgir (2009-07-29 13:44:40)

    Yes! Yet again the wiki has saved me! I followed this part: http://wiki.archlinux.org/index.php/Pm- … _own_hooks
    I just set it to turn off bluetooth upon resume, and it works! yay!
    Thanks everyone!

  • My Ipad connects with my hotel wifi, but does not indicate that it is a secure wifi, even though it requires a password to access - no lock symbol, hence no password request, hence no internet access - help.

    My IPad connects with my hotel wifi, but does not indicate that it is a secure wifi, even though it requires a password to access - no lock symbol appears against the wifi network, hence no password request, hence no internet access - help. My collegue who also has an Ipad can access the same wifi with ease, so it must be something to do with the settings on my machine, although checking the two machines, there appears to be no difference in the settings.

    My experience with hotel wifi is that it's an open, and unsecured, connection, but unless you agree to their terms on a launch page, you can't go any further or connect. Sometimes I need to force safari to come up and even make it go to a page, to trigger the auto load of the 'agree to our terms' page.
    Unless your machine is work provided so maybe could be blocked from unsecured net access?

  • [Solved] Running Thunar with sudo/su Causes GVFS Errors?

    Hi, I switched from Xubuntu to Arch a few days ago, and am loving it so far, but I'm running into an issue when running Thunar with sudo or su. As a result, trash as root doesn't work. I'm not sure if this is related to GVFS, but drives also do not appear when running Thunar as root. Not too major, since it's just a slight inconvenience, and I only need root privileges with Thunar occasionally. Though it'd be awesome if someone knows how to fix this, since my searching has come up with nothing for a problem like this. When logging in as root itself, the problem doesn't occur,  it only happens when running it as my regular account through the sudo or su command.
    Here's the terminal output with the errors:
    [dark@YiffingInHell ~]$ su
    Password:
    [root@YiffingInHell dark]# thunar
    (thunar:29855): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    (thunar:29855): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    (thunar:29855): GVFS-RemoteVolumeMonitor-WARNING **: cannot connect to the session bus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    Last edited by DarkSniper (2011-04-06 02:43:46)

    @janek: It's not good practice to necrobump threads that were posted nearly a year ago.
    I have long since devised a better solution than my initial quick fix. I have created a small script that wraps sudo and fetches root's dbus variables, then sticks them before the command I want to run, so that they're run on root's session instead of mine. It's not the most elegant way, but it remains secure and has pretty much no overhead. I also prefer sudo over pkexec, having an agent popup when I enter the command is undesirable, since it's simpler and easier to just enter the password on the command line.
    For searcher's sake, this is my little wrapper if anyone's interested in using it.
    A small wrapper to go in your path, to be aliased to sudo in your bashrc
    !#/bin/bash
    #Fetch Root's Dbus Variables and Run The Command
    /usr/bin/sudo $(/usr/bin/sudo sed '6q;d' /root/.dbus/session-bus/af16543424391ebcfb5f0c1000000ce2-0) \
    $(/usr/bin/sudo sed '7q;d' /root/.dbus/session-bus/af16543424391ebcfb5f0c1000000ce2-0) \
    $(/usr/bin/sudo sed '8q;d' /root/.dbus/session-bus/af16543424391ebcfb5f0c1000000ce2-0) "$@"
    Then add this to a script that is run as root on boot. [This starts a session for root that allows the wrapper to connect]
    Examples include /etc/rc.local; /etc/lxdm/LoginReady; or a systemd unit
    dbus-launch --autolaunch af16543424391ebcfb5f0c1000000ce2
    NOTE: The "af16543424391ebcfb5f0c1000000ce2" part is different for every system, you can find out what it is for your system by checking the name of the file in /root/.dbus/session-bus.

  • ICloud password request comes on screen and won't cancel or allow log in. other issues before this included flashing screen, safari help line invitation and redirected searches. have done safe reboots with mixed success.

    had a new drive installed on my MacBook Pro and since then some problems have come up. at first i'd get redirects on my searches that would often lead to a popup stating Safari had a security issue and I should call a certain number.  I guessed that to be Bull and tried to correct the problem myself. Numerous safe boots would clear it for a use or two then back to the redirects again. Now the iCloud password request comes on after startup. it offers two options, cancel or log in. Neither goes anywhere. Is my next option only take in for a service call?

    You might have to enter the password a few times before the prompts stop. If you don't actually use iCloud, sign out of it in the iCloud preference pane.

  • [SOLVED] Cannot open x apps with sudo

    Hi all,
    I just did a fresh install of kde in Arch, and I cannot open any x server apps, like kwrite, using "sudo kwrite". I tried xhost +localhost and my user name, but that didn't work. Then I tried tweaking the $DISPLAY... I couldn't get anything to happen either. Can anyone give me a few helpful pointers? Thanks!
    Last edited by sunnieside-up (2011-09-20 05:56:56)

    try with "sudo -E gedit"
    from sudo manual:
           -E          The -E (preserve environment) option indicates to the
                       security policy that the user wishes to preserve their
                       existing environment variables.  The security policy may
                       return an error if the -E option is specified and the user
                       does not have permission to preserve the environment.

  • Bash, Curl, and logging into sites with complex passwords [solved]

    I'm working on a little script to help check deviantArt messages, but I'm stuck at the moment. Below is the code so far:
    #!/bin/sh
    #checks your dA messages for you
    #FIXME: store username and password in file?
    curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" \
    --cookie /tmp/cjar --cookie-jar /tmp/cjar \
    --data "username=$1" \
    --data "password=$2" \
    --data "action=Login" \
    --location "https://www.deviantart.com/users/login" >/tmp/tmp.html
    It works fine with simple passwords, but as soon as it involves special characters like !@#$%^&*(), the following page that's churned out says "Wrong Password" even though the given password is correct. Is curl parsing one of these special characters as a special character (like when merging the input given to the site) or is there something I need to do with any of these special characters before they're passed onto the site?
    Last edited by ShadowKyogre (2010-10-15 00:36:04)

    You might try using the --data-urlencode option instead of the --data option. Special characters should be url-encoded (that funky %20 stuff you see in the URL bar) which --data does not appear to do automatically.

  • [SOLVED] xfce4-terminal doesn't tab-autocomplete with sudo commands

    Wondering if this is a limitation of xfce4-terminal or something that can be enabled.
    In xfce4-terminal, if I type pac and press tab key, it autocompletes to pacman. If I type sudo pac and press tab, it won't autocomplete. The same is true when trying to complete anything after starting with sudo as the first word of the command. Paths resolve fine though after sudo, just not program names or commands.
    Fixable?
    Last edited by nLinked (2013-08-03 20:45:00)

    Thank you so much
    I went for the option to add it in my ~/.bashrc file instead of installing the bash-completion package. Rebooted and it works!

  • Problem with sudo

    Hi. I'm setting up my ArchLinux 8.1.07 distro and I'm running into issues with sudo. I installed sudo through pacman, and now after I added myself to the /etc/sudoers file, it doesn't request a password for me. I do not have the NOPASSWRD option enabled.
    excerpt from my sudoers file:
    dburban ALL=(ALL) ALL
    On all of my previous linux setups, I was asked for the password everytime I logged in and out, or restarted. Arch doesn't ask even if i reboot. The only way I got it to ask for the password was to delete my user and set it up again. But it didn't solve the problem, it just asked for the password once, and now doesn't ask for it anymore.
    Specs: Thinkpad T61
    14"
    1gb DDR2
    80gb HD
    Intel 4965AGN
    Thanks in advance

    I guess it is on a timeout system. I guess I never knew that because I never had to use it much, and then restart.
    # sudoers file.
    # This file MUST be edited with the 'visudo' command as root.
    # See the sudoers man page for the details on how to write a sudoers file.
    # Host alias specification
    # User alias specification
    # Cmnd alias specification
    # Defaults specification
    # Runas alias specification
    # User privilege specification
    root ALL=(ALL) SETENV: ALL
    # Uncomment to allow people in group wheel to run all commands
    # and set environment variables.
    # %wheel ALL=(ALL) SETENV: ALL
    # Same thing without a password
    # %wheel ALL=(ALL) NOPASSWD: SETENV: ALL
    # Samples
    # %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
    # %users localhost=/sbin/shutdown -h now
    dburban ALL=(ALL) ALL

  • Devtools update causes problems with sudo when used in a script?

    I'm a little confused by this one, but I'm not convinced that it's a bug.. yet.
    Long story short, I compile packages using the ABS via a script/wrapper which uses devtools. The script is available here: https://github.com/WorMzy/compilepackage
    Now, this script is far from perfect, but has worked perfectly well (in various states of completeness) for the past year or so. However, with the recent update of devtools (20120720-1 => 20121013-1), my script fails to execute correctly. After entering the password when prompted (by sudo, at this line: https://github.com/WorMzy/compilepackag … tions#L107), the script terminates unexpectedly.
    Downgrading devtools "fixes" this problem, but I'm not sure if this is a bug in devtools, sudo, zsh, my script, or something else.
    Here is the full output from the compilation of "arch-install-scripts":
    build@sakura[pts/10]:~/builds/devtools$ . ~/.scripts/compilepackage arch-install-scripts
    ==> Downloading sources
    ==> arch-install-scripts directory already exist. Replace ? [Y/n]
    ==> Download arch-install-scripts sources
    receiving file list ... done
    sent 28 bytes received 70 bytes 39.20 bytes/sec
    total size is 656 speedup is 6.69
    :: Synchronizing package databases...
    core is up to date
    extra is up to date
    community is up to date
    :: Starting full system upgrade...
    there is nothing to do
    ==> Building in chroot for [extra] (x86_64)...
    ==> Creating clean working copy...done
    ==> Making package: arch-install-scripts 8-1 (Fri Oct 19 23:45:52 BST 2012)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Found arch-install-scripts-8.tar.gz
    -> Found arch-install-scripts-8.tar.gz.sig
    ==> Validating source files with md5sums...
    arch-install-scripts-8.tar.gz ... Passed
    arch-install-scripts-8.tar.gz.sig ... Passed
    ==> Verifying source file signatures with gpg...
    arch-install-scripts-8.tar.gz ... FAILED (unknown public key 1EB2638FF56C0C53)
    ==> WARNING: Warnings have occurred while verifying the signatures.
    Please make sure you really trust them.
    ==> Extracting Sources...
    -> Extracting arch-install-scripts-8.tar.gz with bsdtar
    ==> Starting build()...
    make: Entering directory `/build/src/arch-install-scripts-8'
    GEN arch-chroot
    GEN genfstab
    GEN pacstrap
    make: Leaving directory `/build/src/arch-install-scripts-8'
    ==> Entering fakeroot environment...
    ==> Starting package()...
    make: Entering directory `/build/src/arch-install-scripts-8'
    install -dm755 /build/pkg/usr/bin
    install -m755 arch-chroot genfstab pacstrap /build/pkg/usr/bin
    install -Dm644 zsh-completion /build/pkg/usr/share/zsh/site-functions/_archinstallscripts
    make: Leaving directory `/build/src/arch-install-scripts-8'
    ==> Tidying install...
    -> Purging unwanted files...
    -> Compressing man and info pages...
    -> Stripping unneeded symbols from binaries and libraries...
    ==> Creating package...
    -> Generating .PKGINFO file...
    -> Compressing package...
    ==> Leaving fakeroot environment.
    ==> Finished making: arch-install-scripts 8-1 (Fri Oct 19 23:45:54 BST 2012)
    ==> Installing package arch-install-scripts with pacman -U...
    loading packages...
    resolving dependencies...
    looking for inter-conflicts...
    Targets (1): arch-install-scripts-8-1
    Total Installed Size: 0.03 MiB
    Proceed with installation? [Y/n]
    (1/1) checking package integrity [######################################################################] 100%
    (1/1) loading package files [######################################################################] 100%
    (1/1) checking for file conflicts [######################################################################] 100%
    (1/1) installing arch-install-scripts [######################################################################] 100%
    resolving dependencies...
    looking for inter-conflicts...
    Targets (5): elfutils-0.155-1 pyalpm-0.5.3-2 python-3.3.0-1 python-pyelftools-0.20-2 namcap-3.2.4-2
    Total Installed Size: 99.58 MiB
    Proceed with installation? [Y/n]
    (5/5) checking package integrity [######################################################################] 100%
    (5/5) loading package files [######################################################################] 100%
    (5/5) checking for file conflicts [######################################################################] 100%
    (1/5) installing python [######################################################################] 100%
    Optional dependencies for python
    tk: for tkinter
    sqlite
    (2/5) installing pyalpm [######################################################################] 100%
    (3/5) installing elfutils [######################################################################] 100%
    (4/5) installing python-pyelftools [######################################################################] 100%
    (5/5) installing namcap [######################################################################] 100%
    Checking PKGBUILD
    Checking arch-install-scripts-8-1-any.pkg.tar.xz
    arch-install-scripts W: Dependency bash included but already satisfied
    arch-install-scripts W: Dependency included and not needed ('coreutils')
    arch-install-scripts W: Dependency included and not needed ('pacman')
    arch-install-scripts W: Dependency included and not needed ('util-linux')
    ==> Compilation complete, installing...
    Password:
    loading packages...
    warning: arch-install-scripts-8-1 is up to date -- reinstalling
    resolving dependencies...
    looking for inter-conflicts...
    Targets (1): arch-install-scripts-8-1
    Total Installed Size: 0.03 MiB
    Net Upgrade Size: 0.00 MiB
    Proceed with installation? [Y/n] % build@sakura[pts/10]:~/builds/arch-install-scripts$
    That "%" is inverted, just like what you get when you run
    echo -n "text"
    in zsh. Incidentally, here is my .zshrc: https://github.com/WorMzy/Config-files/ … ter/.zshrc, however, the problem persists with a new user with an unconfigured zsh.
    Here is my sudoers too:
    ## 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
    Defaults timestamp_timeout=0,passwd_timeout=0,passprompt="Password:",badpass_message="Incorrect password",editor=/usr/bin/vim:/usr/bin/vi,targetpw
    ## Runas alias specification
    ## User privilege specification
    root ALL=(ALL) ALL
    build sakura=/usr/bin/pacman-color -U *,/usr/bin/pacman-color -Sy,/usr/bin/pacman-color -Syy
    build sakura=/usr/bin/pacman -U *
    build sakura=NOPASSWD: /usr/bin/extra-x86_64-build,/usr/bin/multilib-build,/usr/sbin/makechrootpkg
    ## Uncomment to allow members of group wheel to execute any command
    %wheel sakura=(ALL) ALL
    ## Same thing without a password
    #%wheel ALL=(ALL) NOPASSWD: /sbin/sdshutdown, /sbin/sdreboot
    ## 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
    Further information will be provided on request. Suggestions for improving the script will also be appreciated.
    Thanks.

    Update: It appears that the cause is systemd's nspawn. Disabling it in mkarchroot (have_nspawn=0) resolves the problem.
    However, I don't understand why it's causing this behaviour. User input works fine for the sudo password prompt, but then fails for the pacman user prompt? Do they use different input buffers or something? Does that question even make sense?
    Anyway, I'll open a bug report on flyspray and upstream about this when I get the chance.

Maybe you are looking for