LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   sudo requires user password (https://www.linuxquestions.org/questions/fedora-35/sudo-requires-user-password-4175517290/)

moonmoth 09-03-2014 11:47 AM

sudo requires user password
 
Each time I begin a new terminal session with FC20 I have to enter my user password. Not a big deal, but annoying.

The entry in /etc/sudoers is "nall ALL=(ALL) ALL" with nall being my user name.

Smokey_justme 09-03-2014 12:26 PM

replace that line with:

Code:

nall ALL=(ALL) NOPASSWD: ALL
However, be careful what you run afterwards.. Scripts can than SUDO without you ever knowing..

John VV 09-03-2014 04:13 PM

fedora normally dose NOT use "sudo"
it defaults to using
"su" and "su -" to become root

Quote:

Each time I begin a new terminal session with FC20 I have to enter my user password
that is NOT !!! normal

once you login as your normal everyday user
and you open a terminal
you are ALREADY loged in AS that user

you will have your name and location with " :~> "
your HOME folder is "~" and the > means you are a NON root user

Warning:
---- DO NOT do this !!!!!
-- It is a very BAD IDEA!!!! ----

"ALL=(ALL) NOPASSWD: ALL"

yancek 09-03-2014 04:36 PM

Quote:

Each time I begin a new terminal session with FC20 I have to enter my user password.
If you mean opening a terminal and run some command(s) then closing the terminal and opening another terminal, yes that's the way it works. Doesn't matter if you are using sudo or su. I don't really see why it would be a problem, don't close the terminal until you've done all that you want. Maybe I'm not reading your post correctly?

Doug G 09-03-2014 06:49 PM

Use visudo to edit the sudoers file. Locate the %wheel configuration and adjust it. Then make your user be a member of the wheel group.

sudo is installed by default with fedora, but isn't "forced" on you.

Smokey_justme 09-03-2014 08:52 PM

@John VV: From the title and the fact that he knows about sudo, I presume he opens a root terminal directly, or simply used the wrong phrasing..

@yancek: Hmm.. nope.. that should happen if you open a terminal (emulator) as same already logged in user...

@Doug: Giving "NOPASSWD:" to a single user is a bad and dangerous idea.. Giving it to a well known administrator group is an even worse one.. "wheel" might have sudo permissions but it should never have the "NOPASSWD:" option set..

Doug G 09-05-2014 10:33 PM

Quote:

@Doug: Giving "NOPASSWD:" to a single user is a bad and dangerous idea.. Giving it to a well known administrator group is an even worse one.. "wheel" might have sudo permissions but it should never have the "NOPASSWD:" option set..
Depends on how and where you use your computer. It's not always a bad idea to do something in a different way.

In Fedora the NOPASSWD: setting for %wheel is already provided in the distributed sudoers file but just commented out, waiting for you to change it to enable password-less sudo for wheel users. Apparently RedHat thinks it may be an often-used option.

In my case it's not a bad or dangerous idea at all.

moonmoth 09-13-2014 08:02 AM

The "NOPASSWD" option was what I needed, and solved the problem. My original post did not make it clear that I was saying that whenever I tried to use "sudo" that it required my user password, although I think it was implied by the title of the post.

Agree that it could be dangerous if not used properly, and once I have the FC20 system set up the way that I want it then I'll most likely revert back to requiring a password to use sudo.

Thanks for all the help.

John


All times are GMT -5. The time now is 09:58 AM.