0

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.

Aleksandar
  • 131
  • 8
  • Have a look at http://stackoverflow.com/questions/11955298/use-sudo-with-password-as-parameter – 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
  • Indeed, that question really belongs on [unix.se]. – muru Jul 24 '14 at 19:31
  • @Wilf sudo command, like my example above – Aleksandar Jul 24 '14 at 19:32
  • 1
  • 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
  • Thats the right thing. Thanks a lot for your answer. I can't give you vote up now because i don't have enough points. – Aleksandar Jul 24 '14 at 19:50

0 Answers0