Author Topic: Howto sudo w/NOPASSWD  (Read 11114 times)

0 Members and 1 Guest are viewing this topic.

Offline °C

  • Neuling
  • *
  • Posts: 14
  • Slackware and Crux packager
    • Cascade Locks
  • Branch: Manjaro 16.06
  • Desktop: Xfce, Lumina-Desktop
  • Kernel: Linux arch 4.4.6-1-MANJARO #1 SMP PREEMPT
  • Skill: Advanced
Howto sudo w/NOPASSWD
« on: 22. April 2013, 23:52:05 »
Code: [Select]
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
%sudo ALL=(ALL) NOPASSWD: ALL



%users ALL=(ALL) NOPASSWD: ALL

The above sudoers file should work for members of wheel, users and sudo groups, of which I am a member yet it still asks for a password when I use sudo.

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: Howto sudo w/NOPASSWD
« Reply #1 on: 23. April 2013, 03:12:54 »
It is very dangerous to do away with your sudo password as it allows you to ruin your system incredibly quickly (one command is all it takes) as opposed to only being able to damage your user (non-root) account. Apart from the security issues involved.

It doesn't take very long for new Linux users to get used to using a password, after a while it just becomes the normal way that things work.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline °C

  • Neuling
  • *
  • Posts: 14
  • Slackware and Crux packager
    • Cascade Locks
  • Branch: Manjaro 16.06
  • Desktop: Xfce, Lumina-Desktop
  • Kernel: Linux arch 4.4.6-1-MANJARO #1 SMP PREEMPT
  • Skill: Advanced
Re: Howto sudo w/NOPASSWD
« Reply #2 on: 23. April 2013, 05:10:28 »
It is very dangerous to do away with your sudo password as it allows you to ruin your system incredibly quickly (one command is all it takes) as opposed to only being able to damage your user (non-root) account. Apart from the security issues involved.

It doesn't take very long for new Linux users to get used to using a password, after a while it just becomes the normal way that things work.
After about 15 years of using linux, I have to say that, I am not worried about doing any "damage" to my system, and secondly, that  I have gotten used to editng the sudoers file with visudo and adding my user account to the wheel group as a first order of business after installing a linux distro so that I can begin configuring my system to my liking by editing config files like fstab, samba.conf etc.

I will figure out why my usual method isn't working with or without help and I wasn't really looking for advice on how to configure my user account, but thanks for the reply  ;D

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: Howto sudo w/NOPASSWD
« Reply #3 on: 23. April 2013, 08:53:30 »
Your having had all that Linux experience I'm sure then that you understand why my reply was as it was. We don't want to encourage new Linux converts (or anyone else for that matter) to start using their systems with the inbuilt security disabled.

Have you had a look on the Arch wiki?

https://wiki.archlinux.org/index.php/Sudo
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline °C

  • Neuling
  • *
  • Posts: 14
  • Slackware and Crux packager
    • Cascade Locks
  • Branch: Manjaro 16.06
  • Desktop: Xfce, Lumina-Desktop
  • Kernel: Linux arch 4.4.6-1-MANJARO #1 SMP PREEMPT
  • Skill: Advanced
Re: Howto sudo w/NOPASSWD[Solved]
« Reply #4 on: 23. April 2013, 19:59:06 »
We don't want to encourage new Linux converts (or anyone else for that matter) to start using their systems with the inbuilt security disabled.

Quote from: Marie Antoinette
Qu'ils mangent de la brioche

Modern Translation: Let them install Ubuntu

Have you had a look on the Arch wiki?

https://wiki.archlinux.org/index.php/Sudo

Having used Arch long before there was a Manjaro distribution, I have had occasion to look on the Arch wiki.
Sudo is a program for linux that allows users to run programs with the security priveledges of the superuser.
It is used on virtually every linux distribution and information on how to use it is contained in the /etc/sudoers file

Code: [Select]
## Uncomment to allow members of group wheel to execute any command
#%wheel ALL=(ALL) ALL

## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: Howto sudo w/NOPASSWD[Solved]
« Reply #5 on: 24. April 2013, 08:38:04 »
Modern Translation: Let them install Ubuntu

You go & use Ubuntu! lol

We are for freedom of choice around here, & making Manjaro as user friendly for both brand new Linux users (prime consideration) & old hands is the way it is here.

Having used Arch long before there was a Manjaro distribution, I have had occasion to look on the Arch wiki.
Sudo is a program for linux that allows users to run programs with the security priveledges of the superuser.
It is used on virtually every linux distribution and information on how to use it is contained in the /etc/sudoers file

So I don't get your point?

What does that have to do with removing the need for the sudo password?
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline °C

  • Neuling
  • *
  • Posts: 14
  • Slackware and Crux packager
    • Cascade Locks
  • Branch: Manjaro 16.06
  • Desktop: Xfce, Lumina-Desktop
  • Kernel: Linux arch 4.4.6-1-MANJARO #1 SMP PREEMPT
  • Skill: Advanced
Re: Howto sudo w/NOPASSWD[Solved]
« Reply #6 on: 24. April 2013, 20:26:21 »
So I don't get your point?

What does that have to do with removing the need for the sudo password?

My point is that the sudoers file that is installed with the package, is heavily commented, including "Uncomment to allow members of group wheel to execute any command" and "Same thing without a password",  because the author knew that users would run visudo to edit it.

Making an "idiot-proof" version of Arch linux as an alternative to distros like Mint or Ubuntu is, I hope, not what Manjaro is all about.
« Last Edit: 24. April 2013, 20:36:04 by °C »

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: Howto sudo w/NOPASSWD
« Reply #7 on: 25. April 2013, 00:54:53 »
If you read up some more on sudo & also the topic of disabling the root password you will see that it is frowned upon from above, & just about every other angle too.

Anyway, I'm not going to change your mind, I'm writing in the hope that new users from the Windows world who may find typing a password a new & irritating phenomenon can have a little patience & adapt with the understanding that the passwords are there to protect them. ;)

So, that's it from me on this topic. :)

Fair thee well.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline bipton

  • Neuling
  • *
  • Posts: 1
  • Desktop: xfce
  • GPU Card: gt750m
  • GPU driver: proprietary
  • Skill: Intermediate
Re: Howto sudo w/NOPASSWD
« Reply #8 on: 21. February 2014, 22:05:48 »
maybe have a good look at the /etc/sudoers.d/ folder, I'm pretty sure the answer you are looking for is in that direction ;)

Offline martinpoljak

  • Neuling
  • *
  • Posts: 1
  • Branch: stable
  • Desktop: Xfce
  • GPU Card: Intel HD Graphics 3000
  • GPU driver: free
  • Kernel: linux310-x64
  • Skill: Advanced
Re: Howto sudo w/NOPASSWD
« Reply #9 on: 25. April 2014, 14:31:22 »
It's just as bipton wrote: the '/etc/sudoers.d/10-installer' is effectively overwriting the global sudoers settings for user, who installed the system. Simply edit it or delete it (as necessary).

For other doubters about reasonability of the sudo password disabling, please consider, you don't know problems which was necessary to resolve using this way. Technical forums are generally intended for problems resolving, not for examining and interrogating why someone needs to achieve something. There are some applications, for which is better to have sudo password turned off in real life.

Offline mxx

  • Sr. Mitglied
  • ****
  • Posts: 420
  • Branch: stable
  • Desktop: Openbox/i3wm
  • Kernel: linux4
  • Skill: Intermediate
Re: Howto sudo w/NOPASSWD
« Reply #10 on: 25. April 2014, 14:35:33 »
In some distros you have no sudo password when in live session. That's how a password-less sudo can be useful.
« Last Edit: 25. April 2014, 14:37:30 by mxx »