78
58

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

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#
78
58
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
78
58

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?