• Learning Map
  • Unix Quiz Center
  • Unix Professional Network
  • Just-Unix-No-Noise FB Group

unixadminschool.com

  • Home
  • Announcements
    • Feed
    • MISC
  • Beginners zone
    • Beginners Lessons
    • Career Guidance
  • Experts Zone
    • Cloud Computing
    • Configuration Solutions
    • Migrations
    • Network Design
    • Scripting
    • Server Security
    • SUN CLUSTERS
    • SUN LDOMS
    • Tools & Applications
    • Veritas Cluster Services ( VCS ) Learning
  • Intermediate Zone
    • Linux Learning
      • Linux Booting
      • Linux Disk Management
      • Linux LVM
      • Linux Networking
      • Linux Performance
      • Linux Troubleshooting
      • Linux YUM/RPM
      • Performance Analysis
      • Redhat Linux Kernel
      • RHEL 6
        • RHEL LDAP
        • Rhel6 Storage
      • Web Servers
    • Solaris Admin
      • Blog for Unix Admin
        • Storage Administration – SAN
      • Oracle Hardware
      • Reference Docs
      • Solaris 10 Zones & LDOMs
      • Solaris 11
      • Solaris Access Control
      • Solaris Best Practices
      • Solaris Booting
      • Solaris Disk Management
      • Solaris DNS
      • Solaris How-to
      • Solaris Installation
      • Solaris Kernel
      • Solaris Networking
      • Solaris NFS
      • Solaris NIS
      • Solaris Packages & Patching
      • Solaris Performance
      • Solaris Tips
      • Solaris Troubleshooting
      • Solaris User Authentication
      • solaris X86
      • Solaris ZFS and Boot Environment
      • Storage Configurations
      • SUN Hardware
      • Troubleshooting Flow charts
    • Veritas Admin
      • Veritas Netbackup
      • VxVM Learning
      • VxVM Troubleshooting
  • QUIZ Center
  • Vlabs

Subscribe

Linux Troubleshooting – Root Password Reset

The General problem that we see in an enterprise environment, where there is no centralized automated password management tool is  …. missing root passwords for the servers.

Missing root passwords are also common when the servers initially managed by one team and later handed over to other team, but not all the changes to root passwords are not handed over to new teams.


Below procedure, to reset root password, can be used on a linux machine if you are having access to server console:

 1. Reboot the machine

2. When you notice GRUB loader that shows the Linux Operating system to be booted Just press the button “e”

3. Highlight the kernel line using the arrow keys  and then hit “e” again

4. That will take you to the command interface where you can edit the line. you just have to go end of line add “init=/bin/bash”  ( no need to enter  double quotes )

5. And then hit the button “b” to boot from that kernel entry

This will dump you to a bash prompt much earlier than single user mode, and a lot less has been initialized, mounted, etc. And root filesystem is in “read only” state at this level.

To make any modifications related to password we should remount the  ”/” filesystem in “rw” mode.

Just use the command:

# mount -o remount,rw /

take the backup copies of /etc/passwd and /etc/shadow before modifying them, and then make modifications to the “root” entry in /etc/shadow as below

# original line
root:$1$EYBTVZHP$QtjkCG768giXzPvW4HqB5/:12832:0:99999:7:::
# after editing

root::12832:0:99999:7:::   –> we have removed the encrypted password field from the root entry, to make password empty.

And now reboot the machine to normal mode and once you login with empty password ….. Just dont forget to reset root password.  Otherwise you know what happens your Server will turn into “Public toilet” :)

 

 

 

You might be interested to read below :


  • Redhat Enterprise Linux – Network Bonding – Quick Reference ( RHEL5 / RHEL6)

  • Hands on Lab – Replacing Failed Disks from ZFS Pools ( RaidZ2 / RaidZ3 ) – Part2

  • Solaris Network Performance Tuning : know about TCP window size

  • Volume manager Migration from LVM to VxVM in Linux – Part 1

  • Solaris Troubleshooting NIS: add a user for NIS maps when passwd file is not in the /etc directory

  • ILOM ( Integrated Lights out Manager) Command line Reference
  • Email
  • More
  • Print
  • Digg
Posted by Ramdev
Comment it
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Comment

Join to our Professional Network (of 1400+ unixadmins ) to receive Unix Administration and Job Updates -

Pages1

Don't Miss Updates

 

Beginners Zone

 

Unixadmin Careers

Server Hardware

Beginners Lessons

Troubleshooting-Flowchart

 

Intermediate Zone

 

Solaris Booting

Solaris Volume Manager

Storage Configurations

Solaris Networking

Solaris X86

Solaris ZFS

Solaris NFS

Solaris NIS

Solaris Patching

Solaris Booting

Solaris Kernel

Veritas Volume Manager

Solaris NIS

Logical Volume Manager

Linux Networking

Linux Disk Management

Linux Troubleshooting

 

Experts Zone 

 

Solutions

Scripting and Automation

Server Security

Veritas Cluster Services

Sun Cluster Services

Cloud Computing

SUN LDOMS

Copyright © 2009 unixadminschool.com. All rights reserved.
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.