Page 1 of 1

how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 4:03 am
by Narf03
Im the only user to use my pi and i am pretty sure about all commands that i am typing into the pi, how do i tell the pi to treat all commands that i type to execute as superuser without the sudo command ? did some google and tried some but it doesnt work.

Thanks.

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 4:05 am
by Vindicator
If you are talking about the sudo su command you should be able to type exit in the console and it will be out of sudo su.

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 4:11 am
by ShiftPlusOne
type sudo passwd root, follow the prompts to set a root password. Next time you're at the login screen, log in as user 'root' with the password you just set.

Keep in mind that being logged in as root when you don't have to be is a very bad idea.

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 4:17 am
by efflandt
It sounds like the OP wants to be the root user all the time. That is generally considered a bad idea, because one typo in console or terminal could make the system unusable. Or any potential exploits could easily take over the system. At least having to use sudo (even if with no password) should make you aware to be extra careful for anything you type or run at that time.

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 4:27 am
by ShiftPlusOne
Another answer might be that if it were safe for you to do so, you wouldn't need to ask how it's done. Because 1) you'd know how, and 2) you wouldn't want to

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 5:55 am
by lewmur
ShiftPlusOne wrote:Another answer might be that if it were safe for you to do so, you wouldn't need to ask how it's done. Because 1) you'd know how, and 2) you wouldn't want to
I know ahead of time that I'm encouraging flame attacks for saying this, but I think the "danger" of logging in as "root" are highly exagerated. Would I recommend it for someone using their Pi for online commerce and/or banking? Of course not.

But if someone is using their Pi for "coding" and/or GPIO developement, and is seldom "online" with it, there is no real danger in being rooted. Face it, there are distros, such as "Puppy", which by default boot into "root". When was the last time you heard of a Puppy device being exploited? In fact, I have asked on many forums for someone to document a case of ANYONES *personal* Linux box being exploited. In the ten years I've been using Linux, I have never heard of a *documented* case.

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 6:23 am
by ShiftPlusOne
lewmur wrote:
ShiftPlusOne wrote:Another answer might be that if it were safe for you to do so, you wouldn't need to ask how it's done. Because 1) you'd know how, and 2) you wouldn't want to
I know ahead of time that I'm encouraging flame attacks for saying this, but I think the "danger" of logging in as "root" are highly exagerated. Would I recommend it for someone using their Pi for online commerce and/or banking? Of course not.

But if someone is using their Pi for "coding" and/or GPIO developement, and is seldom "online" with it, there is no real danger in being rooted. Face it, there are distros, such as "Puppy", which by default boot into "root". When was the last time you heard of a Puppy device being exploited? In fact, I have asked on many forums for someone to document a case of ANYONES *personal* Linux box being exploited. In the ten years I've been using Linux, I have never heard of a *documented* case.
If you home linux box was exploited, chances are you wouldn't know about it anyway. But that's not my main concern.

Have you ever entered a command slightly wrong and then had unintended consequences as a result? When I first got started, I sure have and I know many other have as well.

One of the reasons linux is more secure is that simply running a command as a user is unlikely to do real damage, unless there is an exploit built in that will get superuser access. If logging in as root becomes more of a standard practice, it makes things less secure for everyone, by making linux a more interesting target. But yes, if it's offline or just on a local network and you don't have any personal files on it, it's not a big deal. It just comes down to increasing the chances of you eventually messing up your system and it's just bad practice. Knowing how to use permissions in linux is one of the most central things beginners should learn as many errors arise from not understanding why you can't access certain things and running as root is a very messy workaround.

I agree that it's not THAT big of a deal in this case, but surely it's not something to encourage.

Re: how do i turn off "sudo" ?

Posted: Wed Dec 26, 2012 9:01 am
by Joe Schmoe
Narf03 wrote:Im the only user to use my pi and i am pretty sure about all commands that i am typing into the pi, how do i tell the pi to treat all commands that i type to execute as superuser without the sudo command ? did some google and tried some but it doesnt work.

Thanks.
Find the line in your /etc/inittab that contains the word "noclear". It will be something like:

t1:...:/sbin/getty -noclear 38400 ...

Add "-a root" before the "-noclear", so it now looks like:

t1:...:/sbin/getty -a root -noclear 38400 ...

save, exit, kill -1 1 (or reboot)

Vive la difference!