Mouton
09-05-2005, 11:10 AM
Say you have accounts for which you want a user to be able to login only once...
The easiest way to achieve that would be to change the account password as soon as the user log in.
Create a .bat file, let's say ioftpd/scripts/change_password.bat:
@ECHO OFF
IF %FLAGS% == B GOTO CHGPWD
GOTO END
:CHGPWD
ECHO !change %USER% PASSWD some_random_string_here
:ENDIn your ioFTPD.ini, add this under the [Events] section:
OnFtpLogin = EXEC ..\scripts\change_password.batSITE CONFIG REHASH and give the B flag to users you want to be able to login only once.
Note: The users must have ONLY the B flag to have their password changed... if a user has 3B, it won't change his password on login.
The easiest way to achieve that would be to change the account password as soon as the user log in.
Create a .bat file, let's say ioftpd/scripts/change_password.bat:
@ECHO OFF
IF %FLAGS% == B GOTO CHGPWD
GOTO END
:CHGPWD
ECHO !change %USER% PASSWD some_random_string_here
:ENDIn your ioFTPD.ini, add this under the [Events] section:
OnFtpLogin = EXEC ..\scripts\change_password.batSITE CONFIG REHASH and give the B flag to users you want to be able to login only once.
Note: The users must have ONLY the B flag to have their password changed... if a user has 3B, it won't change his password on login.