Tuesday, July 3, 2012

solaris-l sudo recover lost root password

Hi 

Can sudo be used to recover lost root password? 
I could not remember the root password for one of my Solaris servers. 
However I have sudo access. Can I use sudo to reset my root password 
You can use sudo to reset your root password




Sure, why not? As long as it's in the list of allowed commands (or you've set it to ALL or something inclusive like that.) 
hallo how are u ? i hope your doing fine with your work,for me i dont know that if you can but what i know is that u can use sudo in linux as i know in my knowledge.but is solaris 10 use the following command u will solve your problem 
user add -c local administrator 
user -d /export /home1adminsuer 
to change root user 
user mod -k 
user mod -R 

then that is for the first step but the 2nd step use as follow 

put cdrom 
boot cdrom -s 
fsck -y /dev/dsk/cotodoso for check that path 
now mount your root partition 
mount /dev/dsk /c0t0d0s0 /a 
edit /a/etc/shadow -root entry 

you should work on that command and am sure they will hel you.i have a testimony on that commnad in my server it works. 
regard 
benjamin nkila 
IT ( sun server admin) CiSCo Certified
If you can become root using your sudo access, you can surely reset the root 
password.However if you don't have complete root access on your machine, you 
can boot into failsafe mode and reset the root password. 

1. Reboot the machine. 
2. While booting, at the grub menu, select "failsafe mode" 
3. mount the disk on /a 
4. Edit shadow file using vi /a/etc/shadow 
5. Remove the second field after root and save the file. 
6. unmount /a 
7. Reboot the machine 
8. Login as root, with blank password 
9. Now you ca change the root password 
10. Enjoy...... 

0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM