LoginSignup
0
1

More than 3 years have passed since last update.

備忘録:/etc/shadow を直接変更する

Posted at

Linux NAS 箱などの /etc/shadow に保存されているパスワードがわからくなったときの手段。

  1. HDD を取り外して Linux (PC) に接続 (mount)
  2. python3 でハッシュを作る
  3. mount したパーティションにある /etc/shadow を編集

python3 によるパスワード ハッシュ生成

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1