in reply to Can you use DBI to do this?

I wanted to know if it was possible to use DBI to change the password of a database user to something static ...

Details for changing passwords vary by vendor. Assuming you're using MySQL,

UPDATE user SET Password=password(?) WHERE User = ?
will do the trick, assuming that

Just prepare and execute the query as you would any other query through DBI.

Replies are listed 'Best First'.
Re: Re: Can you use DBI to do this?
by cchampion (Curate) on Jul 11, 2003 at 23:08 UTC

    You can set your password in MySQL without any special privileges.

    See the MySQL manual

    SET PASSWORD = PASSWORD('some password')

    Set the password for the current user. Any non-anonymous user can change his own password!

    No need to call flush privileges either

Re: Re: Can you use DBI to do this?
by antirice (Priest) on Jul 11, 2003 at 22:49 UTC

    Also, you need to be able to flush privileges as the password wouldn't change until the database itself is restarted.

    flush privileges

    Just mentioning this to head off a VERY annoying feature. Hope this helps.

    antirice    
    The first rule of Perl club is - use Perl
    The
    ith rule of Perl club is - follow rule i - 1 for i > 1