![]() | Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition | ||
|
|
![]() |
||||||||||||||||||
Solution Type Problem Resolution Sure Solution 1576388.1 : How to Recovery From Empty or Deleted /etc/passwd File
In this Document
Created from <SR 3-7663940370> Applies to:Linux OS - Version Oracle Linux 4.4 to Oracle Linux 6.4 [Release OL4U4 to OL6U4]Exadata Database Machine X2-8 - Version All Versions to All Versions [Release All Releases] Linux x86-64 Symptoms
Upon rebooting into single-mode mode the /etc/passwd file was found to be empty - no account information available Cause
SolutionA backup /etc/passwd file named "/etc/passwd-" should be present - it is created when commands such as "usermod" are used to modify accounts. This file can be used to resolve the problem: 1. Boot into single mode (see 431260.1 ) 2. Remount root file system for read/write: # mount -o rw,remount /
3. Locate the "passwd-" file. # ls -lah /etc/passwd-
-rw------- 1 root root 2.4K Jun 11 15:46 /etc/passwd- 3. Copy ot to /etc/passwd # cp /etc/passwd- /etc/passwd
Note : the /etc/passwd file should be be manually checked to ensure it is as expected.
(e.g. userids, uids, gids, home directories etc) 4. Perfom password conversion: # pwconv
5. Use the passwd command to set the root password: # passwd root
6. Reboot normally and verify successful login.
References<NOTE:431260.1> - How to Reset "root" Password with GRUB on Enterprise LinuxAttachments This solution has no attachment |
||||||||||||||||||
|