Sunday, April 28, 2024
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 2692  / 3 Years ago, wed, may 12, 2021, 5:11:43

I open a lot of terminals each day. And everytime I press
Ctrl+Alt+T and it opens a terminal and asks me to put in my password:


Terminal open example


Is there a way to open the terminal without asking for a password?


I am running Ubuntu 20.04.04 LTS - with Gnome


More From » command-line

 Answers
7

If you are being asked for your password every time you open the application, then it's likely that your ~/.bash_aliases or ~/.bashrc file have been modified to include a command that requires sudo to run. Open these files, look for the command that requires sudo, and edit accordingly.


In the event that you have a script calling a command that must be run with sudo every time you start Terminal, consider adding a sudoers exception. You can do so like this:



  1. Open Terminal (if it's not already open) and enter your password

  2. Open visudo:
    sudo visudo 


  3. Add the exception near the bottom of the file:
    user ALL=(ALL:ALL) NOPASSWD:/path/to/{command}

    Note: Be sure to replace /path/to with the proper path and {command} to the proper command.

  4. Exit, saving the file.


[#698] Thursday, May 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
exceeeelh

Total Points: 21
Total Questions: 109
Total Answers: 120

Location: Marshall Islands
Member since Wed, Jan 5, 2022
2 Years ago
;