su command always failing - QNX 6.1

Hello:

Whenever I issue “su” command from the shell, it gives me an error message,
/home/vishwak $ su
su: Sorry
/home/vishwak $

Sometime back this was working fine and all of a sudden it stopped. I am not able to solve this problem. Any help in this regard would be greatly appreciated.

Thanks,
Vish.

maybe you lost setuid bit on the “su”? what does “ls -l /bin/su” say?

ls -l /bin/su gives the following,
-rwxr-xr-x 1 root bin 17664 Jun 12 15:50 /bin/su

That is odd. As root do this…

chmod u+s /bin/su

Thank you Sir. It worked!
I am a bit curious to know the reason. Also what does +s in chmod signify.

I am not sure the reason, it could have been a packging error under 6.1. The +s enables the setuid bit on the binary. This means the binary will be run as the owner of the binary (this case root) no matter who runs the binary. It is a dangerous thing to enable and the code you enable it on needs to be well trusted. But it is the only way to elivate a normal user to root without re-logging in.