I am running Centos 5.3 and I can su to root fine. However when I run a command as another user like:
sudo ls, the system says incorrect password for the same password. Why is this happening?
If you execute
you have to enter the root user's password.
However, if you execute
you have to enter your own password.
The purpose of sudo is precisely being able to execute commands as root (or another user) without knowing his password.
When you use "su" you use ROOTS password, but when you use sudo you should use the users password. "su" is used to "become" another user and gain their privileges, "sudo" is used to run a command as another user, ie lets you use your privileges to do something as them.