Narf03
Posts: 243
Joined: Mon Jun 11, 2012 3:44 pm
Location: Malaysia

how do i turn off "sudo" ?

Wed Dec 26, 2012 4:03 am

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.

User avatar
Vindicator
Posts: 314
Joined: Sat Sep 17, 2011 11:10 pm
Location: Susanville Ca USA
Contact: Website

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 4:05 am

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.
If you are more worried about ,spelling, punctuation or grammar you have probably already missed the point so please just move on.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6228
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 4:11 am

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.

efflandt
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 4:17 am

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.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6228
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 4:27 am

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

lewmur
Posts: 391
Joined: Sun Dec 25, 2011 3:20 pm
Contact: Website

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 5:55 am

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.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6228
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 6:23 am

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.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: how do i turn off "sudo" ?

Wed Dec 26, 2012 9:01 am

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!
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Return to “General discussion”