/******************************************************************************* Author ......... Brian Redman Contact ........ sm@easthouston.org Program ........ chg_ds_pass Version ........ 0.1 Purpose ........ Change Account Passwords Using Mac OS X 10.3 Server Open Directory based on chg_sasl_pass: Author ......... Galen Johnson Contact ........ gjohnson@trantor.org Program ........ chg_sasl_pass Version ........ 1.3 Purpose ........ Change Cyrus Account Passwords *******************************************************************************/ --Purpose-- This plugin permits Mac OS X 10.3 SquirrelMail users to change their Open Directory passwords. It consists of a setuid root program based on code from Open Darwin's passwd(1) command source. It will not allow users with valid shells (users able to log in to the server) to change their passwords. Those users would have to log in. This restriction is in an attempt to be cautious. This plugin was based on Galen Johnson's chg_sasl_pass plugin. ----[ Features Enable Mac OS X 10.3 Server user password changes. ----[ Installation Install just like any other plugin, just put it in the plugin directory. The distrubition contains a precompiled wrapper program for Mac OS X 10.3 Server. if you choose to use it you can skip the compilation step. If you choose to Compile the wrapper program: cc -c chgdspasswd.c cc -o chgdspasswd chgdspasswd.o -f /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService Chown chgdspasswd to root and the group that your browser runs as, then chmod it to 4550. This creates a setuid root program that changes passwords. However it requires the user (hopefully SquirrelMail) to provide a valid password, and it will only change passwords for users whose shell is /dev/null. For example, if your apache server group is 'www' chown root:www chgdspasswd chmod 4550 chgdspasswd Run conf.pl and add it to your list, and you are rolling. ----[ Localization NOTE: Only do this if you plan to translate the output generated to a language other than English. if you intend to tranlate to French or German you can find most the translations in the original chg_sasl_passwd plug-in. You need to copy the chg_ds_passwd.po file for each translation you do. The chg_ds_password.po files will go into directories for each language laid out as follows. ./locale//LC_MESSAGES/chg_ds_passwd.po where is no_NO, fr_FR, cs_CZ, etc For example, for a french translation: ./locale/fr_FR/LC_MESSAGES/chg_ds_passwd.po There will be a msgid for each string you need translated. The msgstr is the translation of msgid. For example, for a french translation: #: functions.php:18 options.php:56 msgid "Change Email Password" msgstr "Changez Le Mot de passe de votre courriel" In each of the directories you need to run the msgfmt command to create the .mo file that is used for the translation. For the french example: cd locale/fr_FR/LC_MESSAGES msgfmt -o chg_ds_passwd.mo chg_ds_passwd.po NB: Change the Last-Translated field to yourself when editting the .po file so you get full credit for your translation. Look at the other trans- lations if you have any questions about exactly how to make changes. Now change your Squirrelmail settings to your locale. ----[ Possible Bugs? If you find any problems, let me know!!! ----[ Changelog --- 0.1 --- Initial release ----[ Contributors to chg_sasl_pass which this code is based on Alex Klingenstein: Initial testing and German translation Stephen Carr: Testing recommendations Pascal Sick: FreeBSD bug fix Daniel Lundin: Removed need to utilize the shell script Joachim Bickel: Minor bug fix