This script assumes the mysql root password is blank. Adding a password variable for root would be an option, but then a ps at the time the script is called would reveal it. Consider using a ~/.my.cnf
-Mark -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jacques-Beaudoin Sent: Tuesday, March 18, 2003 3:50 PM To: dbmail@dbmail.org Subject: Re: [Dbmail] WEBMIN FOR DBMAIL WEB ADMINISTRATION This a sample dbmail.sh script with installation steps for webmin #!/bin/bash # # Follow up # Sample dbmail.sh script to administer dbmail via webmin # Jacques Beaudoin 2003/03/18 # # To test and evaluate dbmail administration via webmin # # 1: Download and install webmin rpm from www.webmin.com # 2: Put this scrip in /root and give it the execute permission # 3: start your browser # 4: enter webmin by typing http://127.0.0.1:10000 # or your mail server address http://x.x.x.x:10000 # 5: clic others # 6: clic custom commands # 7: to create the ADD A USER command in webmin # # clic create a new custom command # Description: ADD A USER # Command: /root/dbmail.sh "ADD" # Run as user: root # Under command parameters # Name: USER # Description: USER # NAME: PASSWORD # Description: PASSWORD # # 8: to create the INFO FOR A USER command in webmin # # clic create a new custom command # Description: INFO FOR A USER # Command: /root/dbmail.sh "INFO" # Run as user: root # Under command parameters # Name: USER # Description: USER # # 9: to create the DELETE A USER command in webmin # # clic create a new custom command # Description: INFO FOR A USER # Command: /root/dbmail.sh "DELETE" # Run as user: root # Under command parameters # Name: USER # Description: USER # # 10: to create the LIST ALL USERS command in webmin # # clic create a new custom command # Description: LIST ALL USERS # Command: /root/dbmail.sh "LIST" # Run as user: root # # 11: If you understand what going on you can modified # this script and webmin to make your hown simple # web administration tools # # OPTION="$1" QUOTA=15M # DEFAULT QUOTA DOMAIN="your.domain.com" # YOUR DOMAIN NAME BINARY="/usr/local/bin" # WHERE ARE YOUR DBMAIL PROGRAM # # CHANGE TO ROOT # cd /root # # ADD A USER # if [ $OPTION = "ADD" ]; then $BINARY/dbmail-adduser a $USER $PASSWORD 0 $QUOTA [EMAIL PROTECTED] exit 0 fi # # INFO FOR A USER # if [ $OPTION = "INFO" ]; then $BINARY/dbmail-adduser s $USER exit 0 fi # # DELETE A USER # if [ $OPTION = "DELETE" ]; then $BINARY/dbmail-adduser d $USER exit 0 fi # # LIST ALL USERS # if [ $OPTION = "LIST" ]; then mysql -s -u root -e "SELECT userid from dbmail.users" exit 0 fi # # ADD ALL OTHERS COMMAND HERE # # # NO SUCH OPTION # echo "OPTION $OPTION FOR DBMAIL.SH NO SUCH OPTION" exit 0 # End of script Jacques-Beaudoin a écrit : > I have been looking for a simple web administration tool for dbmail > > It all ready on my mail server its webmin > I have been using webmin to configure servers (Postfix,mysql....etc) > but never explore the section (others) of webmin > > Just install webmin (If not all ready install) > > clic others > clic custom commands > create your custom commands that will call > a dbmail.sh script file > > edit that dbmail.sh to use dbmail-adduser and dbmail-maintenence > > It took me 30 minutes and i now have my simple dbmail > web administration tools > > Jacques > Montreal/Canada > > _______________________________________________ > Dbmail mailing list > Dbmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail _______________________________________________ Dbmail mailing list Dbmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail