Sunday 17 March 2013

cara recover sudoers yang error

Steps to recover /etc/sudoers/
 
Step 1 - Press 'shift' key to enter in to GRUB while system starts
Step 2 - Select linux (recovery mode) which is usually second boot option in GRUB Menu
Step 3 - After entering to recovery mode wait till the boot-up processes to finish, you'll be presented with a few options. Use drop down key to select Drop to root shell prompt option and then press Enter to select it.
Step 4 - Enter this command to remount as read-write - mount -o rw,remount / press enter
Step 5 - Be careful what commands you are typing, as its the ultimate administrator can do anything to the ubuntu installation
Step 6 - Then enter this command - chmod 0440 /etc/sudoers
Step 7 - Now type Exit, else shutdown -r now to reboot
 
This is done and you will be able to sudo now.
In some cases if you confront with a new error like /etc/sudoers.d access denied or /etc/sudoers.d/README access denied
Same repeat step 1 to 3 to go to the Drop to root shell prompt
then remount with the command mount -o rw,remount / and type below these 3 commands one after another
chmod -R a+rx /etc/sudoers.d
chmod -R u+w /etc/sudoers.d
chmod 0440 /etc/sudoers.d/README
 
shutdown -r now
 
This will solve the problem.

source : http://www.mindfiresolutions.com

No comments:

Post a Comment