I accidentally deleted /usr/bin/passwd. How can I reinstall it?

441 Views Asked by At

I tried

apt-get install passwd --reinstall

But it says

Reinstallation of passwd is not possible, it cannot be downloaded.

Help please. I have no backup of this.

Debian version:

root@localhost# lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.11 (wheezy)
Release:        7.11
Codename:       wheezy
1

There are 1 best solutions below

1
DJPX On

Fist create a live system.

Then start your live system and mount your filesystem.

After that copy the /usr/bin/passwd from the live system to your filesystem.

After that is should be available again.

(You can not restore the data of the files with that. You could try a recovery software for that, if you didn´t do to mutch already so the data may is still not overridden.)