Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today, I tried to update my Arch Linux on Raspberry, but I got an error:

error: could not prepare transaction
error: failed to commit transaction (conflicting files)
package: /bin exists in filesystem
package: /sbin exists in filesystem
package: /usr/bin exists in filesystem
Errors occurred, no packages were upgraded.

So, I followed the instructions provided here.

After update some packages with pacman -S --force (including the package shadow), I can't login with any account and getting the message Access denied.

Did I something wrong? The passwords accounts were reseted?

share|improve this question
up vote 2 down vote accepted

I also ended up with a pretty borked up installation, after upgrading last time (just because I didn't read the instruction beforehand)! What I did, is login with a archlinux CD (a bootable USB stick would do it as well) and the chrooted in to my 'original' linux and updated everything from there. I gotta run right now, but if you would like to have further info I am glad to give some more...

share|improve this answer
It is the only solution I see for now. The problem is that now I do not have physical access to the Raspberry, only over SSH. – rigon Jun 12 '13 at 17:55

You might have overwritten /etc/shadow and /etc/passwd when you did pacman -S --force shadow. Trying to log in on a virtual console (i.e., tty for keyboard and HDMI monitor) or the serial port (UART connected to some of the GPIO pins) will be no more successful.

Remove the SD card from the Raspberry Pi, insert it into another computer running Linux and with shadow (so likely any relatively modern distro), and either:

  • Edit /etc/shadow and /etc/passwd on the SD card manually.
  • Fix the /etc/shadow and /etc/passwd using the shadow suite:

    1. If the user isn't in /etc/shadow or /etc/passwd, recreate the user.

      sudo useradd -M -R /path/to/sd/card/mount/point whatever_your_rpi_username_is
    2. Reset your user's password.

      sudo passwd -R /path/to/sd/card/mount/point whatever_your_rpi_username_is

Sync and unmount the SD card, then put it back in the Pi and try booting from it.

Other users on the Raspberry Pi might have been fudged or completely missing too.

Logging in over SSH should change nothing versus logging on the console if you overwrote /etc/passwd or /etc/shadow.

Follow important Arch Linux news. The most recent would have saved you the grief. All binaries in /bin, /sbin, and /usr/sbin got moved to /usr/bin and you still have something thereunder, hence why pacman is complaining. Follow the instructions in that article but use your judgement. If they don't fix the problem entirely (you are in an unclean state after all), you may be able to get away with manually moving everything in /bin, /sbin, and /usr/sbin into /usr/bin and trying again.

Do not use --force unless you know what you are doing or explicitly told to do so by Arch devs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.