LoginSignup
38
38

More than 5 years have passed since last update.

ubuntuのrootパスワード設定、変更(CLI)

Last updated at Posted at 2014-06-24

VMware playerにubuntu13.10をインストール。
簡単インストールでインストールすると
設定がどうなっているかわからない状態になるので
設定を修正するためのメモ。

CentOS などだと簡単インストールで作成するユーザに
設定されたパスワードがrootにも適用されるが、
ubuntu だとそうではない模様。
いちいち sudo するのがめんどくさい場合は
su で root 権限に上がるために root のパスワードを設定する。

$ sudo passwd root
[sudo] password for <user名>        ← 現在のユーザのパスワードを入力
Enter new UNIX password:            ← 設定するパスワードを入力
Retype new UNIX password:           ← 設定するパスワードを入力
passwd: password updated successfully
$

その後 su でユーザ変更を行う。

$ su -
password:
#            ← プロンプトが#に変わる

これでコマンド打ち放題。

38
38
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
38
38