Bren_Potts
Posts: 4
Joined: Sat Oct 21, 2017 4:59 pm

Using Sudo without password

Sat Oct 21, 2017 5:07 pm

Hi, I am very new to Solus and was wondering if there was a way to allow a user to us sudo without putting in there password, I have come here from Debian based distros and the way to do it there is by adding: "user ALL(ALL:ALL) NOPASSWRD: ALL to the sudoers file via visudo. Is there a way of doing that in Solus?

Thanks,
Bren.

papavlos
Posts: 3
Joined: Sat Oct 21, 2017 8:45 pm

Re: Using Sudo without password

Sat Oct 21, 2017 9:05 pm

Hi Bren,

1. Edit /etc/sudoers file (as root), uncomment and change the row with priviledges:

Code: Select all

%wheel ALL(ALL:ALL) NOPASSWRD: ALL
2. Make sure that you belong to the wheel group by issuing the following command

Code: Select all

id mylogin
replacing mylogin by your actual login name. Check the presence of wheel group in the list of groups you belong to.
If yes - you're done.

3. If no: add yorself to the wheel group by issuing the command as root:

Code: Select all

usermod -aG wheel mylogin
replacing mylogin by your actual login.

User avatar
Justin
Development Team
Posts: 3617
Joined: Mon Jul 28, 2014 10:42 am
Location: Adelaide, Australia
Contact: Website Google+ Twitter

Re: Using Sudo without password

Sun Oct 22, 2017 4:20 am

Just be VERY careful with this file, if you break it you'll regret it :)

papavlos
Posts: 3
Joined: Sat Oct 21, 2017 8:45 pm

Re: Using Sudo without password

Sun Oct 22, 2017 12:59 pm

Sorry, there is a typo in point 1. of my reply. The line in the /etc/passwd should look like:

Code: Select all

%wheel ALL(ALL:ALL) NOPASSWD: ALL
so without the letter "R".
Please note that in your initial post there the "R" in the "NOPASSWRD" clause. Delete it, it should be enough.

sunnyflunk
Development Team
Posts: 2969
Joined: Sun Mar 13, 2016 11:35 pm

Re: Using Sudo without password

Sun Oct 22, 2017 11:19 pm

Justin wrote:
Sun Oct 22, 2017 4:20 am
Just be VERY careful with this file, if you break it you'll regret it :)
Ditto to this, if one line of the file is invalid, sudo won't work regardless of permissions granted.

Return to “Tutorials”