I'm trying to create a small python3 program for my friend which will install and configure the nessarcary set-up for his Ubuntu Server.
I want him to be able to start the program, give some basic information and be able to just leave the program to run.
The thing is, to do this I need the python file to send the password to the CL when requested for sudo commands.
I tried doing this for updating the Ubuntu Server:
os.system('sudo aptitude update && sudo aptitude dist-upgrade') os.system(password)
After having the program request the password with this:
password=input('Please Enter Your Password')
But it didn't work. The CL just sits there waiting for the user to enter the password manually. Is ther anyway to get around this?