Ubuntu – “Sudo: Must Be Setuid Root” error after login to diskless client

12.04nfspxeserver

I'm working on diskless linux clusters. I followed instructions as described here. I did these steps:

1- Installed a pxe server on server pc.
2- Installed ubuntu to a client pc.
3- Configured and installed all programs I need on client pc.
4- Copied all OS files(on client pc) to NFS share point.
5- Booted diskless pc via pxe server.

It works. But after login to my account, I got this error message : "Sudo: Must Be Setuid Root". So I can't use /usr/bin/sudo. How can I fix this? Do I need to change some files on OS files which I copied to PXE server?

Best Answer

This error indicated that the /usr/bin/sudo file doesn't have the setuid attribute set. The setuid attribute means that when you execute as if you were the user that owns the file. So, sudo must be owned by root and have this set or it is not able to allow you gain root privileges. You can set this attribute by running chmod u+s /usr/bin/sudo while running as root. You may also need to change the owner to root (chown root:root /usr/bin/sudo).

Related Question