In some cases (like Oracle Cloud) the root account is disabled
This commit is contained in:
parent
d99769e0b0
commit
2c894d01a9
1 changed files with 1 additions and 1 deletions
2
vps2arch
2
vps2arch
|
@ -137,7 +137,7 @@ install_packages() {
|
||||||
|
|
||||||
restore_root_pass() {
|
restore_root_pass() {
|
||||||
# If the root password is not set, use vps2arch
|
# If the root password is not set, use vps2arch
|
||||||
if egrep -q '^root:.?:' "/root.$cpu_type/root.passwd"; then
|
if egrep -q '^root:[^$]' "/root.$cpu_type/root.passwd"; then
|
||||||
echo "root:vps2arch" | chpasswd
|
echo "root:vps2arch" | chpasswd
|
||||||
else
|
else
|
||||||
sed -i '/^root:/d' /etc/shadow
|
sed -i '/^root:/d' /etc/shadow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue