GRUBを編集して紛失したアカウントのパスワードを変更しましたが、まだアカウントにアクセスできませんか? (Linux Mint 18.3)

GRUBを編集して紛失したアカウントのパスワードを変更しましたが、まだアカウントにアクセスできませんか? (Linux Mint 18.3)

Linux Mint 18.3を新しくインストールしました(システム設定:Windows 10を使用したデュアルブート)。

私は4つのアカウントを設定しました:

user_1
user_2
user_3
user_4

パスワードを書き留めておらず、翌日の朝に起きたところ、一つも思い出せませんでした。

私は次のように4人のユーザーすべてのパスワードを変更してみました。

(1) Booted my system and when the Grub menu appeared, 
    I made sure my Linux Mint 18.3 OS was highlighted,
    I pressed e (for edit).
(2) Arrowed down to the line that starts with "linux"
    It looks like this: linux /boot/vmlinuz-3.16.0-38-generic, 
    root=UUID=b1bde976-50e2-4c32-a760-17b091b4202f ro quiet splash 
    $vt_handoff
(3) At the end of that line I deleted the words,
     "quiet splash $vt_handoff" if that is there, and put: rw init=/bin/bash
(4) I then pressed F10 to boot. 
     This resulted as a boot into a root shell.
     I did an ls /home and the system outputted the following:
     user_2
     user_3
(5) I entered a new password for both these users as follows:
    passwd user_1 (and when prompted twice for the password, 
    I entered the new password both times)
(6) I then entered the following command: sync
(7) Next I entered the following command: reboot -f

Note: I also did the same as step (4) step (5), step (6) and step (7) for root

これまで、user_1、user_2、rootのパスワードを正常に変更しました。

ただし、ログイン画面ではまだuser_1とuser_4の正しいパスワードがわからないため、ログインできません。

私の質問:

(a) How do I change the passwords for user_1 and user_4?
    I assume both are administrative users, especially since it is,
    my belief that the first user created after a fresh install is,
    an administrative account by default.

(b) Why when I log in as user_2 or user_3 and do an ls /home does it only show me, 
    the user accounts for user_2 and user_3.

(c) In general, should I only have one admin account on my system?

(d) Does an administrator account have the same privileges as root after,
    (su "ing" subsequent to logging, into user_2 and user_3)  

ベストアンサー1

  • あなたが説明する順序は、コンピュータのルートディレクトリにアクセスできない場合にパスワードをリセットする正しい方法です。 Linux には、sudo 権限について言及しない限り、root 以外のユーザー管理の概念はありません。
  • ホームディレクトリはに配置する必要はなく、/home通常は配置するだけです。/etc/passwdそのユーザーのホームディレクトリを表示します。
  • 必要に応じてsudo権限を使用して、必要な数のアカウントを持つことができます。
  • user_2またはuser_3のsuは、rootではなくそのユーザーの権限のみを与えます。

編集する

他の回答のコメントとテキストに基づいたいくつかの追加の観察は次のとおりです。

user_1またはuser_4を選択して同じパスワードを入力すると、システムがログインしようとしているように動作した後(1〜2秒間画面が消え)、ログイン画面に戻ります。間違ったパスワードを入力すると、すぐに「間違ったパスワードです。もう一度やり直してください」というエラーが表示されます。

これは、パスワードが正確でエラーがあることを意味します。一般に、この場合は、既知の誤ったパスワードを試して、システムが異なる反応を確認するのが最善です。

ホームディレクトリは外部にあるかもしれませんが、/homeあなたの場合、パスワードが失われただけでなく、両方のホームディレクトリも失われました。だからログインが中断されました。この効果に関するメッセージはログファイルに書き込む必要があります。

おすすめ記事