°Ô½Ã¹° 259°Ç
   
[RedHat7] RHEL / CentOS 7 Single User Mode ÁøÀÔ [ Æнº¿öµå / ÃʱâÈ­ / passwd / password / root ]
±Û¾´ÀÌ : ÃÖÀå¼· ³¯Â¥ : 2014-09-17 (¼ö) 09:14 Á¶È¸ : 5365

Single user mode is the one of the Run level in the Linux operating system, Linux operating system has 6 run levels that are used for different requirement or situation. Single user mode mainly used for doing administrative task such as cleaning the file system, Managing the quotas, Recovering the file system and also recover the lost root password. In this mode services won¡¯t start, none of the users are allowed to login except root and also system won¡¯t ask for password to login.

Step 1: While booting you might see the splash screen like below, grub is counting the time to boot the default operating system as mentioned in /etc/grub2.cfg; this time press any key to interrupt the auto boot.

CentOS 7 - Reset root Password Autoboot

CentOS 7 – Reset root Password Auto boot

Step 2: It will list operating systems (in my case only CentOS installed) that you have installed on the machine, In below that you might find some information about booting the OS and editing the parameters of menu. If you want to enter into single user mode; select the operating system and press ¡°e¡± edit arguments of kernel.

CentOS 7 - Reset root password - Select Kernel

CentOS 7 – Reset root password – Select Kernel

Step 3: Once you have pressed, you should see the information about the selected operating system. It gives you the information about the hard disk and partition where the OS installed, location of the kernel, language, video output, keyboard type, keyboard table, crash kernel and initrd (Initial ram disk).

To enter into single user mode; Go to second last line (Starts with linux 16 or linuxefi) using up and down arrow then  modify the ro argument.

CentOS 7  - Reset root password - Before changing Kernel Argument RO

CentOS 7 – Reset root password – Before changing Kernel Argument

Step 5: Modify it to ¡°rw init=/sysroot/bin/sh¡±. Once done, press ¡°Ctrl+x¡±

CentOS 7  - Reset root password - After changing Kernel Argument

CentOS 7 – Reset root password – After changing Kernel Argument

Now you should be in command line mode with root privileges (without entering password). Now you can start to troubleshoot your system or can do maintenance of your system.

CentOS 7 - Single user mode

CentOS 7 – Single user mode

chroot to access your system.

chroot /sysroot

That¡¯s all, You must chroot to reset root password in CentOS 7 / RHEL 7



Read more: http://www.itzgeek.com/how-tos/linux/centos-how-tos/single-user-mode-in-centos-7-rhel-7.html#ixzz3DWkyq2yO
© 2012 Geek Site. All rights reserved.


À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com