Ubuntu 开启root用户

1. 首先开启一个终端输入命令,通过编辑/etc/gdm/gdm.conf文件来开启root用户
    sudo gedit /etc/gdm/gdm.conf

 

2. 在文件中找到AllowRoot=false,把AllowRoot=false 改为true保存就OK了
    [security]
    # Allow root to login.  It makes sense to turn this off for kiosk use, when
    # you want to minimize the possibility of break in.
    AllowRoot=false
    # Allow login as root via XDMCP.  This value will be overridden and set to
    # false if the /etc/default/login file exists and contains
    # "CONSOLE=/dev/login", and set to true if the /etc/default/login file exists
    # and contains any other
  
3. 然后修改root密码,在终端输入:
    sudo passwd root 回车

 

4. 然后输入两次root密码,密码一致就ok了

你可能感兴趣的:(ubuntu,Security)