About a year later…

I was able to bypass the schools security system which blocked me from gaining sudo privileges and actually gain sudo privileges!

How was I able to do it? After doing some research, I found out that I had to add username ALL=(ALL:ALL) ALL to the /etc/sudoers file. But I had one problem, I could not edit the file without sudo (I was using nano ). I later found out that when using a text editor like Sublime Text, and edited a file which usually would require me to use sudo when editing with nano or VIM, that I was able to edit and save the file. When saving the file with Sublime Text, it would give me a popup and ask me to type in my password so that Sublime Text could save the file.

This is the popup which Sublime Text prompted me when I tried to save the file

Since I figured out how to edit and save files which usually would require sudo , I went ahead and edited the /etc/sudoers with Sublime Text and put username ALL=(ALL:ALL) ALL in it and saved it.

I quickly opened up my terminal and typed in sudo su and boom, I was root!

Yay, I'm root!

Well now what? There were some steps to achieve this and I was too lazy to type in all the commands every time I wanted do this, so I went ahead and made a bash script called getroot which would do all the hard work for me.

This is how getroot looks like after the process is complete

After finding this method to bypass the schools security system, I went to the IT department and told them about this. They said that since I was the only one who knew how to do it, and that they knew that I would not mess up my MacBook, this was not on their priority list to fix.