LoginSignup
75
59

More than 5 years have passed since last update.

Ubuntuでsuコマンドでrootユーザになれない

Last updated at Posted at 2018-02-08

Ubuntu16.04でsuコマンドでrootユーザになろうとしたら以下のようなエラーが出た。

$ su
Password: 
su: Authentication failure

原因

Ubuntuのデフォルトでrootユーザのパスワードが設定されていないのが原因。

対策

rootユーザのパスワードを設定する

$ sudo su -
# passwd
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

これでsuコマンドが使えるようになる。

$ su
Password: 
/home/xxx#
75
59
2

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
75
59