在开发和测试中,直接使用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
=====







网友评论