[PYTHON] Note: Modify / etc / shadow directly

How to find out the password stored in / etc / shadow such as Linux NAS box.

  1. Remove the HDD and connect it to Linux (PC) (mount)
  2. Make a hash with ** python3 **
  3. Edit / etc / shadow on the mounted partition

Password hash generation with python3

$ python3
>>> import crypt
>>> crypt.crypt('<password>', crypt.mksalt())
'$.$..$...'

Recommended Posts

Note: Modify / etc / shadow directly
That of / etc / shadow