I'm not sure that you do/can. I always just reset the password with
If you could, what would that say about Linux security?
The password on my Ubuntu system, for example, is stored as SHA-512. There is no plain text password. You would have to crack the SHA-512 key. /etc/shadow contains the line for my password/login:
Here, there are several fields delimited by the : character. The second field contains three sub-fields, itself, delimited by $. 6 indicated SHA-512, the second field is a the 'salt' and the third field is the SHA-512 sum itself. (Note: that's not actually my shadow entry, I changed it for these purposes.)
Note: You could theoretically run a brute-force cracker (John The Ripper does not support SHA-512), but if you have any recent encryption schema (SHA-512, for example), it would take an eternity. E.g. in practice, it's not possible.