得峰笔记本安装ubuntu 16.04.6【5】-启用root账户

ubuntu server安装的时候要求创建一个用户,安装完成后,只能用那个账户登录,高权限操作需要sudo,感觉不方便。参考网上好多资料,终于找到了server版的方法,记录如下:

创建root账户密码:

sudo passwd root

修改配置文件:

sudo su
vim /etc/ssh/sshd_config

# 在 sshd_config 文件里的 “Authentication” 部分修改以下内容 PermitRootLogin prohibit-password  注释掉这一行,添加下一行:

#PermitRootLogin prohibit-password
PermitRootLogin yes

重启 ssh 服务

service sshd restart

root账户SSH登录成功:

连接成功
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-142-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage 163 个可升级软件包。
104 个安全更新。 New release '18.04.4 LTS' available. Run 'do-release-upgrade' to upgrade to it.   The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law root@xgyn-ubuntu:~# 

使用root账户SSH连接之后,FinalShell文件编辑之后上传失败的问题解决。