Is there an option to apply a password with the command in the terminal? Somethhing like:

sudo some-command -pass=mypass

I'm just curious, I know that this is not safe.

  • Have a look at stackoverflow.com/questions/11955298/… – muru Jul 24 '14 at 19:25
  • @muru Heh, thanks, I was searching in askubuntu, it was logical to me that the answer will be here :) – Aleksandar Jul 24 '14 at 19:30
  • 1
    Try this question: Execute sudo without Password? – Wilf Jul 24 '14 at 19:33
  • 1
    @Wilf you are missing the point, I want to know is there a way to execute a single command with root access. Let say, I have a script that execute in terminal when I open it, so the script, let say sudo apt-get update will prompt me for password, but I only want to execute this command, without a prompt for password. Best example, starting lampp. I wrote a script,and I don't want to enter password in terminal, I want to eneter password in script directly, so it will execute without prompting me for password. – Aleksandar Jul 24 '14 at 19:44
  • 1
    There is a question that might help with that as well... – Wilf Jul 24 '14 at 19:45