3

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?

1 Answer 1

6

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

2
  • 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. Apr 9, 2010 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. Apr 9, 2010 at 18:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .