Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

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

share|improve this answer
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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