How can i change password of ubuntu root user by python script? Thanks.
You can modify /etc/passwd (/etc/shadow) with Python script which will need root  permissions sudo python modify.py /etc/passwd (where modify.py is your script that will change password)
Changing password, python, linux