菜单

admin
发布于 2024-06-05 / 292 阅读
0

修改 /etc/shadow 重置密码

field=$(awk -F ':' '/^root/{print $2}' /etc/shadow)
password=$(openssl passwd -1 123456)
sed -i '/^root/s%'$field'%'$password'%' /etc/shadow