specify password for sudo on 1 line
I would like to run a command right away when I log in, and I have figured out how do that with the sessions/startup programs thing. However, the command I want to run when I log in requires that I use sudo before it, and it doesn't run because it doesn't have the password. Is there some way that I can specify the root password to sudo so that I can run these commands with 1 line? I am not concerned about security, and if it has to be in plain text that is fine by me. I am the only one who will be around this computer and if someone does steal the password there is no information that is too sensitive. Thanks in advance for any help!
Again, for anyone who did not understand all those words, can I give the password to sudo in one line like:
sudo [command] | [password]
or
sudo -[option] [password] [command]
I hope you understand enough what I am talking about to help me.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Markus Thielmann
- Solved:
- Last query:
- Last reply: