美文网首页
Ubuntu18 使用root账户登录

Ubuntu18 使用root账户登录

作者: keluda | 来源:发表于2019-05-19 22:20 被阅读0次

在开发和测试中,直接使用root用户进行操作会方便很多。按照下面的方式修改,可以使用root用户直接登录Ubuntu用户。避免使用sudo的繁琐。当然,在生产环境中,一定不要这样做。

sudo passwd root

sudo passwd -u root

sudo nano /etc/gdm3/custom.conf

=====

[security]

AllowRoot=true

=====

sudo nano /etc/pam.d/gdm-password

=====

# auth required pam_succeed_if.so user != root quiet_success

=====

sudo nano /root/.profile

=====

# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then

  if [ -f ~/.bashrc ]; then

    . ~/.bashrc

  fi

fi

if `tty -s`; then

  mesg n

fi

=====

相关文章

网友评论

      本文标题:Ubuntu18 使用root账户登录

      本文链接:https://www.haomeiwen.com/subject/lifuiqtx.html