Skip to main content
Welcome guest. | Register | Login | Post

Remove annoying sudo ...

5 replies [Last post]
Joined: 2006-11-19

Is there a way I can remove myself from the pain of sudo'ing everything and having a damn password prompt. I have tried a few things with pam and groups and sudoers files but nothing seems to help.

Any suggestions?

flyboy2's picture
Joined: 2006-05-14
Remove annoying sudo ...

You can enable the root account if you wish by doing:

sudo passwd root

and then give root a password.

However, if you do this, you will still have to enter the root password in order to run certain commands. That's essentially what makes Unix OS's safer than Windows. In Windows, most people run as root. Very unsafe.

Joined: 2006-11-19
thats what im trying to

thats what im trying to eliminate is running it for certain commands, all commands even. Is there a way to do it?

dylunio's picture
Joined: 2005-12-20
_aibot_ what you want to do

_aibot_ what you want to do is considered *VERY* insecure. You can do it by loging in as the root user mentioned above, but I don't reconmend this at all, as it's very insecure. You could always log in as your normal user, open a terminal, and log in to that terminal as root (su -) and run whichever commands you wish before you logout (back to your user) with exit.

The commands which need greater permissions to work are generally system administation ones (installing packages etc.) which you shouldn't need to use too often.

tbuitenh's picture
Joined: 2005-12-21
Note: usually there are

Note: usually there are good reasons for not allowing normal users to run certain commands. This protects you against too much damage when, for example, a website abuses a security hole in your browser. So think carefully before you make this type of changes.

Example: the shutdown -h now command

use sudo, but no password:
in /etc/sudoers (always edit with visudo!)

taco garden = NOPASSWD: /sbin/shutdown -h now

taco is my username, and garden is my hostname. Don't use localhost for the hostname, it won't work. You could replace "/sbin/shutdown -h now" by "ALL" to be able to sudo all commands without a password, but this is DANGEROUS.

no sudo, no password, making the program executable for everyone:
chmod o+x /the/program
note this does not work for shutdown and halt, those programs check if you are root.

free-zombie's picture
Joined: 2006-03-08
if you just want a root

if you just want a root shell, enter sudo su, enter your password, and you're root.

Comment viewing options