How to: Remove Sudo
November 8, 2011 in Articles, Kubuntu, Linux, Technology
This post is for anybody that want to run as root but with a different username. W-what? Yes, I said it; run as root with another username. I know this might be useless for some, but this might be useful for others. Either way, it’s always fun to play around and find how things work. So, let’s do the unthinkable and remove sudo.
I have to start this post with a disclaimer. I do not recommend to do the following, but saying this, you can always do whatever you want. Well, it’s your damn computer and if something happens, don’t blame me.
Why would someone want to do this?
There might be many reasons why someone would want to do this. For me, the main reasons would be to remove the need to type sudo for every commands, and it’s also for the sheer freedom. This operating system is base on freedom, and it lets its users use their computer the way they see fit. Besides, I’m a rebel without a cause, trying to defy what society dictates. I never was a follower and will never be one.
Some may argue about sudo’s indispensability in our unsecured world, and I’ll let them argue all they want. Of course, if you surf porn all day and download tons of shit, you deserve to have your computer hacked. And if someone were to get access to your system, it would probably mean that they already know your password, which makes sudo absolutely useless.
However, I can’t stress enough to be careful. Do not play stupid with a machine that contains important file. Always make sure that you are ready to re-install your OS. I don’t think you’ll need to, but it’s better to be prepared.
I’ve ran with this configuration for about 2 years now, and I haven’t encountered any problems that couldn’t be resolved. Plus, I never tried the rm -r /* command and don’t think I ever will.
How To:
Really, sudo cannot be removed, but the workaround is to set your user as root. There might be many ways to do this, but I’m only going to show you one way. I’m an old soul hence I do everything through the konsole.
First, we must allow root to run on the computer—-read the following post on how to enable root.
After enabling the root account, you must change your username group and id number. To do this you must modify the /etc/passwd file. Open the file with a text editor and find your username. By default, the first username you create will have 1000 for its user-id and group number. You’ll have to change it so it looks like this:
username:x:0:0:username,,,:/home/username:/bin/bash
Now you just have to restart KDM and you’ll have a sudo-free Linux.
I always thought that sudo should be an option instead of being mandatory. I know that it’s needed for certain people, but at the same time, it’s in the way of other’s creativity. There’s always a way to make thing happen with Linux and that’s what I like about it. It might be a sacrilege for some but I really find sudo annoying and by doing this, I can leave this awful aspect of Linux behind. But always remember, if you do this, you will run as root, everything you do will have some consequences.