猫型エンジニアのブログ

プログラム/ネットワーク系の技術関連をまとめたページです 

Ubuntu12.04でssh利用時にrootユーザでのログイン

 Ubuntuでもルートのユーザを以下の手順で作成することができます。起動時のログイン画面やsshからルートとしてsudoコマンドを使用せずにログインできます。

ルート用のパスワードの設定

以下のコマンド実行後に、パスワード入力を要求されるので設定をしてください。

# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

/etc/lightd/lightd.confに以下の設定を追記します。

echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf

SSHの設定

/etc/ssh/sshd_configのPermitRootLoginをyesに設定して再起動する。

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes