Quote:
Originally Posted by kedarp
I am using Ubuntu 9.10. So I cannot login as root. There is no root account.
I also cannot su to root. I get "Authentication failure
|
There is ALWAYS a root account.
Quote:
Originally Posted by kedarp
I checked the man page of visudo. visudo is for editing the sudoers file.
|
Isn't that what you wanted to do as you mentioned:
Quote:
I changed the permissions of the sudoers file to 640 to write to the file.
|
Why else would you want to write to the sudoer's file, if you did not intend to edit it?
Quote:
Originally Posted by kedarp
How can I change the permissions of the file to 0440.
|
First, from the GRUB boot menu, there will be two entries for a specific kernel release. There's the first entry that boots directly into multi-user mode and directly beneath it, there's the recovery mode entry that boots into recovery mode or runlevel 1.
So for instance, if your kernel release is: 2.6.27.4, your GRUB menu will have:
Code:
Ubuntu, with Linux 2.6.27.4 on /dev/sda1
Ubuntu, with Linux 2.6.27.4 (recovery mode)
Select the second entry (recovery mode). This will automatically log you in as root and take you directly into the command-line. Note that Ubuntu does not set the root password by default, so entering runlevel 1 or recovery mode will never ask for root's passwords.
Now change the permission of your sudoer's file to 0440:
Code:
chmod 0440 /etc/sudoer
And reboot:
Hope this explains it a little better.