Wednesday, January 26, 2011

Single user mode with GRUB: how to login in Linux in Single mode and change password of root in Linux

Single user mode in GRUB Linux / change root password:

1. During the start press esc
2. Choose the parameter of the booting
3. Type "a"
4. Write at the end of the sentence "single"
5. Reboot
6. After Linux reboot the last line will be something like this: sh-3.2#
7. Type "chsh" (i.e. change shell)
8. You will see the line with this text:
            Changing shell for root
     New shell [/bin/bash]:
9. Type the new path to the shell: /bin/sh
10. Call for changing root password with the command: passed root
11. Type the new password and confirm it
12. Reboot Linux and login with the new password


А теперь то же самое на русском ))
1. При рестарте надо успеть нажать esc.
2. Выбрать параметр загрузки;
3. Нажать "а";
4. Дописать в конце строки "single";
5. Перезагрузиться;
6. Линукс загрузится, последней будет строчка: sh-3.2#
7. Ввсести в строке: "chsh"; (означает change shell)
8. Появятся строчки: Changing shell for root (1 первая строчка); New shell [/bin/bash]: (2 строчка)
9. Ввести новый путь к shell: /bin/sh
10. Запросить смену пароля рута: passwd root;
11. Ввести новый пароли и подтвердить его, например USXy___tex;
12. Перезагрузиться и зайти под новым паролем.