su/kdesu not working

I am sorry to have to post this problem to the list, but I got no answer in
the forum, and couldn't find one elsewere.

I can login as root.
when trying to su to root using "su" or "su -" i get "su: incorrect password"
following some threads I added my user to the "wheel" group and tried to edit
/etc/sudoers using visudo with no luck on both.
also tried to edit "/etc/pam.d/su" again with no luck.
I really need a solution since many operations can't be done without su
normally.
thanks alot
YB.

Re: su/kdesu not working

Big hammer:
strace -f su -

It will print a lot of stuff, maybe you will find something (in the
last lines near the password rejection, if you are lucky).
If some PAM module is involved, you may discover which one.

Re: su/kdesu not working

Once upon a time, Roberto Ragusa <<...> at robertoragusa dot it> said:

You can't strace a setuid executable.

Re: su/kdesu not working

You are right.
Actually the execution will still happen, but with no root
authority, so it will not be useful for debugging.
Seeing some output incorrectly made me think it was working.

Re: su/kdesu not working

Once upon a time, Roberto Ragusa <<...> at robertoragusa dot it> said:

And to follow up to my brief response, you _can_ strace a setuid
executable with an extra step. If you run strace as root, you can pass
the "-u " argument, and it will switch users first (but still
trace correctly). So, as root, you could do:

# strace -u foo -f su -

Re: su/kdesu not working

wow that was incredibly long output

the important line was about 1023 times repeating

[pid 24172] close(3) = 0
[pid 24172] close(4) = 0
[pid 24172] close(5) = -1 (EBADF) bad file descriptor
[pid 24172] close(6) = -1 (EBADF) bad file descriptor
[pid 24172] close(7) = -1 (EBADF) bad file descriptor
[pid 24172] close(8) = -1 (EBADF) bad file descriptor
...
[pid 24172] close(1023) = -1 (EBADF) bad file descriptor

that was before and after the password entering step.
any idea what to do next?
it seems like a filesystem problem

Re: su/kdesu not working

No, that is not a significant part.
This is just a new process starting and doing a "let me close
every file descriptor they passed me" function.
It actually closes only 3 and 4 as the others are not
opened (closing them fails because they are simply not open).

Your problem is somewhere else.
Try to see what happens before the access denied message.

Re: su/kdesu not working

+1 for strace

And unfortunately, you can boot into single user without the root
password to change the root password.

Re: su/kdesu not working

2009/11/8 Dj YB <<...> at mail dot ru>:

Why don't you reboot to runlevel 1 and reset the root password? Isn't
that possible? Then onwards you can use your new root password to su
or edit the /etc/sudoers file.