2012年9月30日 星期日

How to Reset CentOS root Password and change the run level

There was the easy way to reset the root password for CentOS. Please follow this steps and you will be able to access your CentOS.
 
1. Reboot the CentOS machine
 2. When booting up, press any key to go into the select menu.
 3. The press ‘e’ to navigate to second grub.conf line (kernel)
 4. Once again press ‘e’ to edit the line and you can select one step from these option :
 ■ option 1 : 1 (’1′) at the end of the line. OR
 ■ option 2: S (‘S’) a the end of the line OR
 ■ option 3: add ‘single’ to “ro root=LABEL=/ single”
 
5. After edit, hit “ENTER”
 6. Press ‘b’ to reboot
 7. After reboot it will stop at ‘#’ command line.
 8. At ‘#’ command line, type ‘passwd’ to create new password.
 9. Reboot machine as usual
 10 Finish


As always if you need any help you can reach us on twitter @ehowstuff or drop us a comment below.


1) Login as root user
2) Open /etc/inittab file using vi text editor or gedit GUI text editor
3) Look for the default runlevel called initdefault which look like as follows:
id:3:initdefault:
Please note that an initdefault entry specifies the runlevel which, should be entered after system boot. If none exists, init will ask for a runlevel on the console. The process field is ignored. Note number 3 in above line defines default runlevel.
4) Replace runlevel 3 to 5:
5) Save the changes
6) Reboot linux to take effect.


沒有留言:

張貼留言

FPGA Verilog 的學習經驗,提供給要入門的新手

今天簡單說說 FPGA Verilog 的學習經驗,提供給要入門的新手: 1.對自己寫的FPGA Verilog程式,所生成的數位電路要心中有數。 這一點個人認為很重要,就正如寫 C語言,心中要能生成對應的組合語言一樣,我是這樣要求自己的。 雖然 FPGA Verilog語言...