If you have an iFolder 3.8 (and some previous versions) server, and you use the local database (instead of LDAP or what-not), then you may have run into a situation where you have to change a password for a regular user when that current password is not known.
Of course, if the user *knows* his or her own password, he or she can use the “settings” link in the iFolder Web Access page, or the “Security” menu item in the client interface.
But if the password is UNknown, then you really have no choice but to do it on the command line of the iFolder server. The problem with that, however, is that in order to do that on the command line, you’ll need to enter both the admin credentials and the user’s new credentials as well… which is never a good idea to do, since that will sit in the command history by default, etc. Besides, who wants to memorize that crazy string anyway?
So, here’s a tiny little favor for you… I stuffed it all into a tiny little helper script that you can have. Just paste these contents into a script, do a chmod +x to make it executable, and away you go. it will prompt you for admin password, username to change, and the new password for that user.
I hope it helps! Here you go…
#!/bin/bash clear echo "" echo "This is the user password change tool for iF3..." echo "" echo "Please enter the admin password: " echo "" read ADMINPW clear echo "" echo "Please enter the username for which you are changing the password: " echo "" read USERNAME clear echo "" echo "Please enter the new password for $USERNAME (careful with crazy special characters): " echo "" read USERPW clear echo "" echo "Processing..." echo "" # For 32 bit... /usr/bin/mono /usr/lib/simias/bin/UserCmd.exe setpwd --url http://localhost --admin-name admin --admin-password $ADMINPW --user $USERNAME --password $USERPW # For 64 bit... #/usr/bin/mono /usr/lib64/simias/bin/UserCmd.exe setpwd --url http://localhost --admin-name admin --admin-password $ADMINPW --user $USERNAME --password $USERPW echo "" # I know the exit codes from mono are of no real value, but oh well... if [ "$?" -eq "0" ];then echo "If the exit message reads: \"Failed - Invalid admin credentials\", the password for $USERNAME was not changed. " echo "If the exit message reads: \"SetPassord for $USERNAME - False\", then $USERNAME might not exist in the system. " echo "If the exit message reads: \"SetPassord for $USERNAME - True\", then the password for $USERNAME is now changed!" else echo "...The script encountered a problem! Exiting..." exit 0 fi echo "" echo "...Done!"