Change moderator or admin password (random) different for each list they were an admin or moderator for
Hi,
I have been using the withlist command to delete a given administrator or moderator from all mailman 2.1 lists.
I also require to change the moderator or admin password for all lists that they have been removed from, but have it so that it is a different randomly generated password for each list they are removed from and then have this emailed to the other moderators or admins who are then left or a default address if none are left (I have managed so far that it is changed to the same password for each list they have been removed from). I am currently at the beginning of my Python learning so this is why I'm asking for help.
My script and usage so far can be found below:
Usage:
withlist --all --run script_
The script is saved at:
/usr/sbin/
Function defined in the script:
import sha
def change_
mlist.Lock()
try:
if mlist.owner[
print (newpasswd)
except:
print(
mlist.Save()
mlist.Unlock()
This will go through all lists and change the administrator password to a randomly generated one, but as advised above it will set the same password (not what I want) I've put a print in for debugging so I can see what it was.
Thanks
Daniel
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu mailman Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Daniel Botting for more information if necessary.