I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
"make sudo not ask for password" is the post title, and that's not what it's about.
A similar example could be "visit the shops and cafes without wearing a mask" but the post turns out to be about using Amazon to get things delivered. Similar, but critically different.
the good thing is when you close the terminal and open a new terminal , the new one will be normal as before without the need to undo the change in any files
sudo doesn't need you to exit the session. It has a number of benefits, such as auditing who ran a command and being able to see in your history what you ran as root. You also don't need to close the terminal to exit from su, you can type exit or hit ctrl-D to log out of that session.
so using sudo su and then running the script will not make you type the password until you exit out of that terminal
sudo (by default) doesn't prompt you every time for your credentials, it prompts you after five minutes of inactivity. Another thing you could do, if you really wanted to bypass securty, is to use setuid to make your script run as root regardless of who ran it. Then you wouldn't ever need to put in your password at all.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
"make sudo not ask for password" is the post title, and that's not what it's about.
A similar example could be "visit the shops and cafes without wearing a mask" but the post turns out to be about using Amazon to get things delivered. Similar, but critically different.
sudo
doesn't need you to exit the session. It has a number of benefits, such as auditing who ran a command and being able to see in your history what you ran as root. You also don't need to close the terminal to exit fromsu
, you can typeexit
or hit ctrl-D to log out of that session.sudo
(by default) doesn't prompt you every time for your credentials, it prompts you after five minutes of inactivity. Another thing you could do, if you really wanted to bypass securty, is to usesetuid
to make your script run as root regardless of who ran it. Then you wouldn't ever need to put in your password at all.