Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-72-1576388.1
Update Date:2017-04-20
Keywords:

Solution Type  Problem Resolution Sure

Solution  1576388.1 :   How to Recovery From Empty or Deleted /etc/passwd File  


Related Items
  • Linux OS
  •  
  • Exadata Database Machine X2-8
  •  
Related Categories
  • PLA-Support>Infrastructure>Operating Systems and Virtualization>Operating Systems>Oracle Linux
  •  




In this Document
Symptoms
Cause
Solution
References


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


Unable to login to an Exadata cell server.

Upon rebooting into single-mode mode the /etc/passwd file was found to be empty - no account information available

Cause


It was not determined how the /etc/passwd file was lost

Solution

A 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 Linux

Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback