Is it a bad practice to run a command which requires sudo in ~/.profile?
If really want to do that, how can I make the command run at rebooting Ubuntu?
make the command running with
sudoand under my user account not require password, by editing/etc/sudoers?provide my password in the command with
sudoin~/.profile, byecho <passwd> | sudo -S <mycommand>?
I haven't verified if the first way works, because I am still learning how to do it.
The second way seems to raise serious security concern, and probably the least way I want to go.
Thanks.