Go Back   FlashFXP Forums > ioFTPD Forum > ioFTPD > Scripting > ! New Scripts Announces & Updates

Reply
 
Thread Tools Rate Thread
Old 09-05-2005, 11:10 AM   #1
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 2,022
Default How to invalidate user accounts on login

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:
Code:
@ECHO OFF
IF %FLAGS% == B GOTO CHGPWD
GOTO END
:CHGPWD
ECHO !change %USER% PASSWD some_random_string_here
:END
In your ioFTPD.ini, add this under the [Events] section:

Code:
OnFtpLogin = EXEC ..\scripts\change_password.bat
SITE 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.
Mouton is offline   Reply With Quote
Old 09-14-2005, 01:30 PM   #2
Junior Member
ioFTPD Foundation User
 
Join Date: Jan 2004
Posts: 15
Default

woo hint for random string %random%%random%%random% (variable for random number....)
Uniter is offline   Reply With Quote
Reply
Create a free account to browse our forums without ads



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -5. The time now is 02:28 AM.