Case:Access ubuntu use account root

Condition:

  1. Linux tvm 4.10.0-27-generic #30~16.04.2-Ubuntu SMP Thu Jun 29 16:07:46 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  2. Linux tvm 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  3. Vmware Version: VMware® Workstation 12 Pro 12.5.5 build-5234757

Solution:

Action 1: Login mode add

  1. Change root’s passwd
    sudo passwd root
  2. Modify sshd_config
    xxx@tmu:~$ su – root
    Password:
    root@tmu:~# vim /etc/ssh/sshd_config
  3. Clear “#PermitRootLogin without-password” then add “PermitRootLogin yes”
    # Authentication:
    LoginGraceTime 120
    #PermitRootLogin without-password
    PermitRootLogin yes
    StrictModes yes
  4. Restart ssh server
    root@tmu:~# sudo service ssh restart

Action 2: Login in ssh mode

  1. sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
  2. Add:greeter-show-manual-login=true
  3. reboot