Old 01-28-2004, 07:24 PM   #1
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default ionED [Enable/Disable]

little script I wrote, i like being able to disable or enable single users.

site command syntax:

site enable <user>
-or-
site disable <user>

adds a flag "X" to the users flags when they are disabled.

Code:
Example:

Connected to mr_Fs_site
220 edited sitename :D
USER testusr
530 Login failed, account [testusr] is disabled
Code:
site enable
200---[site enable/disable]--
200-usage : site enable <user>
200-usage : site disable <user>
200 Command successful.

get it from http://nrscripts.staghosting.com/io-scripts.htm

source code in C is there too, so if you want you can modify the output of the program or whatever you want to.

< mr_F >
mr_F_2 is offline   Reply With Quote
Old 01-29-2004, 10:32 AM   #2
Xn3t
Member
 
Join Date: Dec 2003
Posts: 50
Default

works fine! good job. Only one req, when i type site enable/disable of an user that it doesn't exist in site, script sends the same msg. If user doesn't exist must reply me 'user doesn't exist' for example.

thx m8
Xn3t is offline   Reply With Quote
Old 01-29-2004, 04:13 PM   #3
hot_pit
Member
ioFTPD Registered User
 
Join Date: Nov 2003
Posts: 78
Default

good work dude
hot_pit is offline   Reply With Quote
Old 01-29-2004, 04:57 PM   #4
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Thumbs up

your wish is my command

script updated, same link

default output is:

<commandline_here> command failed, user [<username_here>] doesn't exist


peace

--- mr_F
mr_F_2 is offline   Reply With Quote
Old 01-29-2004, 05:21 PM   #5
Xn3t
Member
 
Join Date: Dec 2003
Posts: 50
Default

thxxxx
Xn3t is offline   Reply With Quote
Old 01-29-2004, 08:28 PM   #6
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

I installed your script like explain in readme.txt and I restarted ioFTPD. After, I tried to login but it freezes just my ftp client sent USER.
I think I also found 2 bugs in function getflags. I put in attachment source code with my comments (This is the latest version, I checked source code and binary after your update).
Mr_X is offline   Reply With Quote
Old 01-29-2004, 10:37 PM   #7
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

hey Mr_X

you didn't modify the latest version (however I still see your suggestions on the getflags function and will implement them in the next 10 minutes).

As for it not working, I don't know what to say. Considering there's really no set-up it's not like it could be that. Just be sure that you entered everything CaSe sensitively. & make sure in your ..\etc\ioftpd.env file contains:

USER=%[$user]

i'll update the readme to notify of this.
other than that it should work

also
which FTP client you using?

seems that ioFTPD doesn't kill the connection, but rather the FTP client needs to notice it's dead. i'm gonna ask d1 about this.

pz
mr_F_2 is offline   Reply With Quote
Old 01-30-2004, 02:03 AM   #8
EwarWoo
Senior Member
FlashFXP Registered User
ioFTPD Registered User
 
Join Date: Oct 2002
Posts: 462
Default

Alternatively
Allowed_Users = !F *
site change username flags +F

Good work anyways m8, keep it up
EwarWoo is offline   Reply With Quote
Old 01-30-2004, 11:13 AM   #9
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

I'm using flash fxp 2.2 beta build 961. It's not a client bug because if I disable your script it works. My client send USER and then it freezes and server don't send me anything, and there's a connection timeout.
Everything is ok in ioftpd.env
If you need some files of my config, I can sent you them.
Mr_X is offline   Reply With Quote
Old 01-30-2004, 11:44 AM   #10
fobban
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Jan 2003
Posts: 186
Default

Mr_X:
The client (FFXP) hangs if it doesn't get a response message (like 550 Could not login blabla) or if you have set the path to pre-user wrong (ie it tries to run the script but can't find it = hangs)
fobban is offline   Reply With Quote
Old 01-30-2004, 11:55 AM   #11
Mr_X
Senior Member
FlashFXP Registered User
ioFTPD Foundation User
 
Join Date: Sep 2003
Posts: 142
Default

The client don't get any messages. It wait for a message. The server (script) should send a 530 (If account is disabled. That couldn't be possible because i installed script and make a restart of io and then try to login) or a 331 but don't send anything. I also tested it in DOS with ftp command (Win2K), I got same freezing.
I checked also path before posting and if there was a missing EXEC or something else. I don't know why it's freezing.
Mr_X is offline   Reply With Quote
Old 01-30-2004, 12:14 PM   #12
toki
Senior Member
ioFTPD Foundation User
 
Join Date: Oct 2003
Posts: 221
Default

Quote:
Originally posted by EwarWoo
Alternatively
Allowed_Users = !F *
site change username flags +F
but anybody who should be able to enable or disable users must have site change flags permission for that.

with ed script that is not needed. simple two cmds must be allowd for desired enablers/disablers... u can also set more people to disable then to reenable a user i think *g*

nice script!!!
toki is offline   Reply With Quote
Old 01-30-2004, 04:42 PM   #13
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

remark on alternative: F is reserved flag for fxp denied... use something else or u'll have surprises!
Mouton is offline   Reply With Quote
Old 01-30-2004, 05:42 PM   #14
mr_F_2
Senior Member
 
Join Date: Jan 2004
Posts: 203
Default

Quote:
Originally posted by Mr_X
The client don't get any messages. It wait for a message. The server (script) should send a 530 (If account is disabled. That couldn't be possible because i installed script and make a restart of io and then try to login) or a 331 but don't send anything. I also tested it in DOS with ftp command (Win2K), I got same freezing.
I checked also path before posting and if there was a missing EXEC or something else. I don't know why it's freezing.
I don't know what to tell you It should work, unless you modified the source. Do you have any other scripts on Pre User? that could be screwing it up.

it's weird that it doesn't even work in the console. I just updated the version, get it below:: hopefully that fixes it

also mentioned about the !F * method, (or the !X * method, whatever letter you use) cunhell is right, this requires giving any users "disable/enable" functionality to have access to "site change". that's no good... therefore site enable/disable makes a nice little pack that you can give power to whoever you want on your ftp without consiquence of site change passwd ...etc being avail.
and also what he said, you can give enable or disable permissions to whoever you want to Gadmin can maybe disable users, but only Siteop or Master can enable.. it's up to you
mr_F_2 is offline   Reply With Quote
Old 01-31-2004, 09:23 AM   #15
Mouton
Posse Member
Ultimate Scripter
ioFTPD Administrator
 
Join Date: Dec 2002
Posts: 1,956
Default

other remark: SITE CHANGE permissions are atomic... ie u can give access to SITE CHANGE ... FLAGS and not to any other SITE CHANGE ... XXX

[Change_Permissions]
...
flags = 1MX
...
Mouton is offline   Reply With Quote
Reply

Tags
command, disable, enable, site, users

Thread Tools
Display Modes 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

Forum Jump


All times are GMT -5. The time now is 03:13 PM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)