Sunday, May 30, 2010

Fedora add sudoers

I install a fresh copy of Fedora in my virtual machine and it troubled me with sudo. When I use sudo in the terminal it gave me something like the current user is not in the /etc/sudoers file. So I did as follows and rid from it.
First I log into root using "su -" (then I had to enter the password)
Then I change the mode of /etc/sudoers file so that we can write to it by executing the command chmod +w /etc/sudoers.
Thirdly I add eranda ALL=(ALL) ALL
eranda is my username of my user account in fedora.
Then I remove the writing mode if the /etc/sudoers file using chmod -w /etc/sudoers

I thought it was the finish and execute sudo but it gave me another error.
sudo: /etc/sudoers is mode 0640, should be 0440 (to execute this you need root privileges)

then I change the mode of /etc/sudoers to 440 by executing chmod 440 /etc/sudoers
Finally I can use sudo in my machine.
Search Amazon.com for movies

No comments:

Post a Comment