Help sudo password disable

I want to disable the sudo password for a few hours, I did these steps and logged out, but it was not working

sudo visudo
Add line
Manjjj ALL=(ALL:ALL) 199
Does anyone know where the problem is?

I use:

USER ALL=(ALL) NOPASSWD: ALL

It disabled it completly.
Of course, this should only be done by those who have sufficient experience with Linux and use it carefully.

1 Like
1 Like

This command did not work for me, also

Manjjj ALL=(ALL) NOPASSWD: ALL

But this command worked

Defaults:Manjjj !authenticate

usernames has to be all lowercase

1 Like

I type username lowercase in computer.
Because I typed this with a mobile phone, the first letters were typed in capital letters
Thank you for pointing it out

the guide works perfectly - retrace your steps

1 Like

This command (Defaults:manjjj !authenticate) for me working

But the two commands or lines mentioned above didn’t work for me

See: man sudoers, it mentions:

FULLTIMERS      ALL = NOPASSWD: ALL

You can even restrict when you are allowed to use sudo:

Date_Spec ::= ('NOTBEFORE=timestamp' | 'NOTAFTER=timestamp')

Date_Spec
     sudoers rules can be specified with a start and end date via the NOTBEFORE and NOTAFTER settings.  The time stamp must be specified in “Generalized Time” as defined by
     RFC 4517.  The format is effectively ‘yyyymmddHHMMSSZ’ where the minutes and seconds are optional.  The ‘Z’ suffix indicates that the time stamp is in Coordinated Univer‐
     sal Time (UTC).  It is also possible to specify a timezone offset from UTC in hours and minutes instead of a ‘Z’.  For example, ‘-0500’ would correspond to Eastern Stan‐
     dard time in the US.  As an extension, if no ‘Z’ or timezone offset is specified, local time will be used.

Be sure to keep a separate terminal/console open where you are loged-in and changed to root while fiddling with the config file(s) that sudo uses, so you can fix/correct stuff while you make changes :wink:

1 Like

It would be much better if there was a program or script that replaces the hash instead of the sudo password , or a warning window appears instead of the password like in Windows.
Because I’m working with sudo a lot

I don’t completely understand what you mean here…
What hash where?

Do you mean you want a popup asking for the password instead of the commandline prompting for the password? :thinking:
In that case, IIRC, see: man pkexec :wink:

Popup accept or cancel don’t type password, same windows10 popup administration

This was my idea out of ignorance, sorry, because in the terminal or tty environment, the popup is meaningless and fun

As long as you are in the GUI, the popup from pkexec will be shown, no matter in which terminal window you issue it, the only place it would not be useful is in the console or via a remote connection :wink:

When it comes to the popup ala Windows to ask for acceptance of administrative commands:
Sorry this is not windhooz and as such it only asks for password when needed or just executes the command as requested by the user.
Because Linux(or any unix variant) does not like to ask “Are you sure?” when the operator gives orders to it :wink:

PS: The action of “password provided by the operator” will be cached for a certain time, so it wont ask for it again when you issue multiple commands within that timeframe…

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.