Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Monday, 28 April 2014

Lost Root Password Recovery Using NIM


On the nim server, configure the nim client for a maintenance boot:
# nim -o maint_boot -a spot=install
 image> <host machinename>
Boot the client into SMS and, after configuring the network settings, etc., boot the system normally into the ‘Welcome To Base OS’ menu.
You will now see an option to ‘Start Maintenance Mode for System Recovery’ (option 3).  Choose this option and then ‘Access this volume and Start a Shell’.  Select 0 Continue. If the shell is given successfully use the ‘passwd’ command to change the root password.
# passwd
# sync;sync;sync;reboot
This is how lost password recovery is supposed to work.  However, if you get an error about getrootfs failing, use the following technique:
Identify the rootvg hdisk with lspv, import the disk and mount / .
# lspv
# importvg hdisk(x)
# mount /dev/hd4 /mnt
Next, we’ll create a temporary user with root’s ID.
echo temproot::0:0::/:/usr/bin/ksh >> /mnt/etc/passwd
# sync
# cd /
# umount /mnt
Reboot and login as ‘temproot’.  Change root’s password.
# passwd root
Lastly, and most importantly, edit the /etc/passwd file and REMOVE temproot.
Have a better way to handle this?  Let us know in the comments.

No comments:

Post a Comment