A few people that had problems getting the mayor to talk found that removing all other alcohol from their inventory helped. You should be able to talk to him, offer him some of Rimmer's ale, convince him you are friends since you are drinking together and get him to reveal the password.
However, don't worry about not getting that to work. You receive more experience killing the guardian in the mines than you would from using the password, and it is an easy fight. Just head to the mines in the Dwarven Halls.
If you do not have any area effect spells that don't need a target, as Cenerion suggested, you can drink a shadow potion and wait for Josephine's Blind spell effect to wear off before trying a direct attack.
Chasing Josie... techniques for defeating Josephine
Welcome to the forum. <img src="/ubbthreads/images/graemlins/wave.gif" alt="" />