root password in a .py script

Paul Rubin http
Fri Mar 12 15:37:20 EST 2004


Bart Nessux <bart_nessux at hotmail.com> writes:
> The script is setting the root password. It is running as root, by
> root as a daily cron job. It does three things:
> 
> 1. Set root password to XXXXXXXXX
> 2. Make certain ssh is enabled on the machine, if not enable it.
> 3. Email the machine's IP to the admins
> 
> Root is the owner of the script... it's perms are 700
> 
> Why am I doing this? Because users turn off ssh and change the root
> password. Mac OSX allows "administrative" users to do this. This
> script undoes their changes.

If they have changed the root password on their machine, then the old
root password in your script won't work on that machine.

Find another way to do what you're asking.



More information about the Python-list mailing list