-1

If you have access to /etc/passwd and /etc/shadow, is it possible to figure out what the password is? I know you can reset it, but is there a way to recover it?

Paul Knopf
  • 1,231

1 Answers1

3

In theory, with sufficient time and computational power, yes. But the entire point is that it's a one-way hash whereby the original password is supposed to be for practical purposes impossible to reverse-engineer from the hash.

DopeGhoti
  • 76,081
  • 2
    You can't reverse-engineer the password, but you can brute force it. Having the encrypted password is the first step in a brute force attempt (since brute forcing any kind of login mechanism is ridiculously slow). Though, while I say can it still may not be a feasible thing to do depending on the password strength. – Centimane Jan 29 '18 at 19:23
  • 1
    Hence the short answer being "yes" and the long answer being "yes, but not for practical purposes". – DopeGhoti Jan 29 '18 at 19:34
  • 1
    I'd argue both answers are "maybe". If the password is weak, the answer is yes. If the password is strong enough, the answer is no. – Centimane Jan 29 '18 at 19:39