I am developing project by using python script in Ubuntu 10.04. In my project,I need to reboot the system automatically at particular time period. So that,I was wrote the below command in my python script.
passwd = "my system password"
os.system('echo %(passwd)s | sudo reboot -f' %locals())
It was working fine but today when I run my script it throws the below error.
sudo no tty present and no askpass program specifiedHow to resolve this problem.I need to reboot my system through python script.If you know let me, your answer is very useful to me.