root password in a .py script
Craig Markwardt
craigmnet at REMOVEcow.physics.wisc.edu
Fri Mar 12 17:40:46 EST 2004
Bart Nessux <bart_nessux at hotmail.com> writes:
> Paul Rubin wrote:
> > 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.
>
> Well, it works. They change the password and the script changes it
> back... try it yourself on Mac OSX 10.3.x, before claiming it doesn't work.
If you can run as root, or even if not, why not simply check
/etc/passwd for changes to the root account. And mail a notification
to whoever, if it changed. And it's less overbearing. More
dangerously, one could attempt to rewrite that entry in /etc/passwd,
but that sounds like a recipe for eventual disaster.
Craig
--
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet at REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------
More information about the Python-list
mailing list