change root pass en mod rescue

En mode “rescue”, connectez vous et tapez les commandes suivantes pour passer en root :

sudo su
(puis tapez le mot de passe donné par la console)

Ensuite, pour monter toutes vos partitions,

for i in `seq 1 9`; do mkdir /mnt/mnt$i; mount /dev/sda$i /mnt/mnt$i;done

Il y a des erreurs, c'est normal, ignorez les.

Dirigez vous dans vos partions montées et trouvez laquelle correspond à votre “vrai” /

cd /mnt/mnt1/
ls
cd /mnt/mnt2/
ls
cd /mnt/mnt3/
ls
cd /mnt/mnt4/
ls
cd /mnt/mnt5/
ls
cd /mnt/mnt6/
ls
cd /mnt/mnt7/
ls
cd /mnt/mnt8/
ls
cd /mnt/mnt9/
ls

etc…

Une fois votre “vrai” / trouvé, faites un

chroot /mnt/mntX
(avec X correspondant au numéro de partition où se trouve votre /)

Vous êtes maintenant “chrooté”. En gros, vous êtes sur votre serveur, avec vos fichiers, comme si il avait démarré normalement. Donc maintenant, il est possible de changer le mot de passe.

passwd

Et entrez votre nouveau mot de passe ;)

Une fois la manipulation terminée, tapez “exit” puis “reboot” et cliquez sur “Repasser en mode normal” depuis votre console degestion, pour redémarrer votre serveur. Votre mot de passe est celui défini précédemment.

 

bash: passwd: command not found

vi /etc/resolv.conf

name server 8.8.8.8

yum install passwd

passwd

 

 

Last modified onSunday, 14 October 2012 04:07

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0013413792{main}( ).../index.php:0
20.10684718344Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.10684718344Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.340212446352Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.340812470712Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.341612526040Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.341812554864require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.350712990272K2ControllerItem->execute( ).../k2.php:64
90.350712990272K2ControllerItem->display( ).../BaseController.php:710
100.362213715472K2ControllerItem->display( ).../item.php:78
110.362213715472K2ControllerItem->display( ).../controller.php:19
120.366714111840Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.368414132208K2ViewItem->display( ).../ViewController.php:102
140.441517061512K2ViewItem->display( ).../view.html.php:742
150.441517061512K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.443517241712include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
  • Published in Webmin
  • Read 1482 times

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0013413792{main}( ).../index.php:0
20.10684718344Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.10684718344Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.340212446352Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.340812470712Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.341612526040Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.341812554864require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.350712990272K2ControllerItem->execute( ).../k2.php:64
90.350712990272K2ControllerItem->display( ).../BaseController.php:710
100.362213715472K2ControllerItem->display( ).../item.php:78
110.362213715472K2ControllerItem->display( ).../controller.php:19
120.366714111840Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.368414132208K2ViewItem->display( ).../ViewController.php:102
140.441517061512K2ViewItem->display( ).../view.html.php:742
150.441517061512K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.443517241712include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
back to top