IBM Support

AIX Security: How to reset the root password

Question & Answer


Question

How can I reset a lost root password?

Answer

The root password can be reset in maintenance mode.
1) Boot in to Service (Maintenance) Mode:
A) Hardware Management Console (HMC) managed systems
Refer to the following technote to boot into Service (Maintenance) Mode:
B) Stand-alone systems
2) Access rootvg and start a shell, then change the password.
Some of the following steps are already covered in the HMC documentation, but are provided for clarity:
  1. Define your current system as the system console by pressing the F1 key and then press Enter.
  2. Select the number of your preferred language and press Enter.
  3. Choose Start Maintenance Mode for System Recovery by typing 3 and press Enter.
  4. Select Access a Root Volume Group.
    A message displays explaining that you will not be able to return to the Installation menus without rebooting if you change the root volume group at this point.
  5. Type 0 and press Enter.
  6. Type the number of the appropriate volume group from the list and press Enter.
  7. Select Access this Volume Group and start a shell by typing 1 and press Enter.
  8. At the # (number sign) prompt, type the passwd command at the command line prompt to reset the root password.
    For example:
    # passwd
    Changing password for "root"
    root's New password: 
    Enter the new password again:
  9. To write everything from the buffer to the hard disk and reboot the system, type the following:
    sync;sync;sync;reboot

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m50000000L0FmAAK","label":"Boot"},{"code":"a8m0z000000cvzhAAA","label":"Security"},{"code":"a8m0z000000cvzlAAA","label":"Security-\u003EAuthentication"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
08 November 2023

UID

isg3T1000724