su/sudo issue with only one user account

I have a SUSE machine that has a number of accounts on it. When I log in as my account and do either a sudo or an su command, I get results that no other accounts get.

Logged in as my account:

>sudo cat /etc/passwd
sudo: must be setuid root

>su:
password:
Permissions on the password database may be too restrictive.
su: incorrect password

Logged in as any other non-root account, I can successfully su down to root or run commands with sudo.

I am at a loss as to why my account doesn’t work.

Jonn

Hello and welcome.

Please always explain which version of openSUSE you use. You say you use SUSE, but these are NOT the SUSE (SLED/SLES) forums, but the openSUSE forums.

Then something you can not know. When you post copied/pasted computer text here, please do so between CODE tags. You get the CODE tags by clicking on the # button in the tool bar of the post editor. When applicable, copy the prompt, the comman, the output and the next prompt in one sweep betweeen the CODE tags. This will looks in the post like:

henk@boven:~> su -l -c ls
Wachtwoord:
bin  crontab-red  inst-sys
henk@boven:~>

Then about your problem. Can you please post:

ls -l $(which sudo)

Sorry, I am on OpenSUSE 12.2 (i586)

When I run the following command as my user, it comes back as:

ls -l $(which sudo)
jonn@wu2:~> ls -l $(which sudo)
-rwxr-xr-x 1 root root 123440 Jun 12 2013 /usr/bin/sudo

When I run the following command as another user, it comes back as:

ls -l $(which sudo)
guy@wu2:~> ls -l $(which sudo)
-rwsr-xr-x 1 root root 123440 Jun 12 2013 /usr/bin/sudo

So, it looks like my setuid has been lost. How do I reset it if I can’t run sudo from my account?

Thanks!

Jonn

Well, this isn’t Ubuntu so;


su -c "chmod 4755 /usr/bin/sudo"

It’ll ask for your root password.

Or you can login as root then execute chmod 4755 /usr/bin/sudo or chmod u+s /usr/bin/sudo

Well, it is a complete riddle to me how one user can get a different answer about the same SUID bit.???