We recently have started using Ubuntu as our preferred desktop OS – and we simply regretted not having left the Windows world earlier. Though some of us are undying Apple fans – we still had to accept the fact that Ubuntu was a pleasant surprise to the existing non Apple users / developers at our office.
Having said this – we didn’t have enough time to train all our developers on the system and simply asked them to test the waters themselves. As developers and users of Linux – we hoped the learning curve would be simple. As they say ignorance is bliss one of our early users was trying to setup Python / DJango on the system when accidentally he did :
chmod –R 777 /usr/bin
and voila “sudo” simply stopped working.It kept throwing an error saying that sudo must be setuid root.
Solution: Most files in /usr/bin should have 755, but some require the setuid bit set. /usr/bin/sudo is one such command After some research we realized the problem was the wrong file permissions. Setting the right permissions was simply not possible without the help of sudo.
Steps we followed to reset the permissions were :
Lesson learnt : NEVER change the permissions of system folders away from root*.
Information for new learners
What exactly is sudo ??
When working with terminals (Applications → Accessories → Terminal), any command can be run as an administrator by typing sudo before it. The /etc/sudoers file controls who can run what commands as what users on what machines and can also control special things such as whether you need a password for particular commands.
©2019 Siddhatech Software Services Pvt. Ltd. All rights reserved.