I am trying to run Mininet with screen in Ubuntu Server using the following command:
screen -d -m sudo mn --topo single,2 --switch ovsk --controller=remote
The screen is detached. But if I reattach, I see that the password is required for sudo to run mininet. I tried the following thing to send password:
screen -d -m echo 'MYPASSWORD' | sudo -S mn --topo single,2 --switch ovsk --controller=remote
But this doesn't work as no screen session is initiated and Mininet is not running. How to solve this as I don't want to insert password each time as I want to automate this process.