Computing.Net > Forums > Unix > Recovering AIX root password

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Recovering AIX root password

Reply to Message Icon

Name: YanulySanson
Date: February 22, 2007 at 09:15:33 Pacific
OS: AIX
CPU/Ram: any
Product: IBM
Comment:

The common method says you have to boot from cdrom (volume 1) or mksysb tape, access the root volume group, edit the /etc/security/passwd file and blank the value you find for password in the root stanza.

YET...Booting from the cdrom will work as long as you have the same or newer AIX 5L level media.
But if you have previously updated your system via patches or maintenance levels, mounting the rootvg filesystems or running a shell before that may fail with multiple errors, crashing down to the firmware prompt or looping eternally.
Being so, you won't be able to run "vi" to edit the file (probably because it needs space on /tmp), so, if the common method fails you can try the following:
1. Do the usual steps up to Access the Root Volume Group.
2. Select Access this volume group and start a shell before mounting filesystems.
3. mount the root filesystem under /mnt:
mount /dev/hd4 /mnt
4. mount /usr under /mnt/usr
mount /dev/hd2 /mnt/usr
5. use the "ed" command to edit the file, line by line:
/mnt/usr/bin/ed /mnt/etc/security/passwd
6. The second line of the file contains the password to modify, type 2 to go to it and replace the value with nothing:
enter 2 (this shows the line)
enter c (states you'll change the current line)
press tab (to emulate the stanza's format)
type password = (leave a blank space before the equal sign)
press enter and type a "." (edit ends)
enter w (saves the file)
enter q (to exit)
7. reboot the machine or LPAR. You'll be able to login using root without a password.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Recovering AIX root password

root password AIX www.computing.net/answers/unix/root-password-aix/5459.html

Failing root password recovery www.computing.net/answers/unix/failing-root-password-recovery/7304.html

Lost root password www.computing.net/answers/unix/lost-root-password/3492.html