Monthly Archives: February 2022

Resetam parola root ssh cu ajutorul lui Plesk

  1. Dam unui user in plesk acces la /bin/bash sa pot intra cu ssh pe server
  2. Creem in /tmp un fisier /tmp/getpassword.sh cu comenzi:
#!/bin/bash
cp /etc/shadow /tmp/foo.temp;
chmod 777 /tmp/foo.temp;
exit

3. in plesk din root intram sa facem un nou cron job, bagam la comanda /tmp/getpassword.sh si dam Run now

4. Dupa ce sa creat o clona cu toate parolele in foo.tmp, inlocuim prima linie ca userul al carui parola noi stim si schimbam in root

5. modificam fisierul /tmp/getpassword.sh in

#!/bin/bash
cp /tmp/foo.temp /etc/shadow;
chmod 640 /etc/shadow;
echo 'done';
exit;

6. Mai dam o data run in plesk la cron

7.Gata! intram cu root si parola de la userul creat de noi

Sursa: https://dtbaker.net/blog/recover-root-password-on-plesk-server/

Install Mysql 8.0 ON Centos 6

wget https://dev.mysql.com/get/mysql80-community-release-el6-5.noarch.rpm

yum install mysql80-community-release-el6-5.noarch.rpm

yum-config-manager –disable mysql57-community

yum-config-manager –enable mysql80-community

sudo yum module disable mysql

sudo yum install mysql-community-server

systemctl start mysqld

systemctl status mysqld

sudo grep ‘temporary password’ /var/log/mysqld.log

mysql -uroot -p

ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘MyNewPass4!’;

Sursa: https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/linux-installation-yum-repo.html