甲骨文的系统怎么启用不了root账号

查看 22|回复 2
作者:雅丶涵   
根据搜索来的命令,明明执行完毕了,测试使用root登录,还是提示只能使用Ubuntu登录,不能使用root登录

甲骨文, 账号, 明明

genshin   
先登录 ,再su 或者 修改ssh_config
眼儿媚   
[ol]#!/bin/bash
echo root:xxxxxxxx|sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
echo 'DNS=8.8.8.8 1.1.1.1 2001:4860:4860::8888 2001:4860:4860::8844'>> /etc/systemd/resolved.conf
systemctl restart systemd-resolved
systemctl enable systemd-resolved
mv /etc/resolv.conf  /etc/resolv.conf.bak
ln -s /run/systemd/resolve/resolv.conf /etc/
apt-get purge netfilter-persistent -y
reboot[/ol]复制代码
您需要登录后才可以回帖 登录 | 立即注册

返回顶部