I am new to Linux and I have CentOS running on a dual boot system. I was trying to edit a file requiring root permissions, so I used sudo. I typed the root password and it failed. This happened three times, and the process was ended. I then logged in as root (su) and was able to navigate to the file and make changes as root. Am I missing something? How would I edit the sudoers file such that this password would work? Or is there another way to log in to the sudo group to make these changes? How do I set sudo passwords?


Sudo expects you to type in your password, not the password of root. And your account needs to be in the sudoers file.

  • 3
    To make changes to the sudoers file, you should use the visudo command. It's also possible to edit the file directly (once you're root), but then there won't be any automatic syntax checking, so you could end up with an unusable sudoers file. – Marnix A. van Ammers Apr 9 '10 at 18:25
  • OK, great. This is what I just found out. I am in the process of learning how to edit the sudoers file now. Thanks. – nicorellius Apr 9 '10 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.