Manjaro Linux Forum

Support for Community Editions => LXQt => Topic started by: °C on 22. April 2013, 23:52:05

Title: Howto sudo w/NOPASSWD
Post by: °C 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.
Title: Re: Howto sudo w/NOPASSWD
Post by: handy 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.
Title: Re: Howto sudo w/NOPASSWD
Post by: °C 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
Title: Re: Howto sudo w/NOPASSWD
Post by: handy 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
Title: Re: Howto sudo w/NOPASSWD[Solved]
Post by: °C 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
Title: Re: Howto sudo w/NOPASSWD[Solved]
Post by: handy 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?
Title: Re: Howto sudo w/NOPASSWD[Solved]
Post by: °C 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.
Title: Re: Howto sudo w/NOPASSWD
Post by: handy 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.
Title: Re: Howto sudo w/NOPASSWD
Post by: bipton 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 ;)
Title: Re: Howto sudo w/NOPASSWD
Post by: martinpoljak 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.
Title: Re: Howto sudo w/NOPASSWD
Post by: mxx 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.