Solved

Automate user access to NT ftp server

Posted on 1998-07-21
5
161 Views
Last Modified: 2013-11-20
I have a server-client application. Server side runs on NT with IIS 3.0. I have 2 questions:

1. How to add users to NT domain from inside my server-side application. I need to dynamically to add or demove users from the machine domain (during run time and based on user input to my application).

2. Is there a way to set the FTP directory and alias from inside my application.

I know that I can do 1 and 2 from NT adminstration programs but I need to do them from my application.

I hope someone will post me a code or show me the API to do that.

Thanks
0
Comment
Question by:khaledo
5 Comments
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1319509
I don't think these functions are documented. But if you really want to get to these functions, they are in NETUI0.DLL, NETUI1.dll, and NETUI2.dll. The one that seems the most interesting is NETUI1.dll.

0
 

Author Comment

by:khaledo
ID: 1319510
Thank you Thui, but how can I use them from *.DLL without documentation? If you have experience with them or can show me a sample code it will be great.
0
 
LVL 2

Expert Comment

by:duneram
ID: 1319511
if you have access to a debugger, you can get the gist of how they work by analyzing what gets popped and pushed from the stack when you call them when you experiment.

I know you can direct ftp to run as a script and in the script its possible to use the commands to set your local directory.
0
 
LVL 8

Accepted Solution

by:
trestan earned 200 total points
ID: 1319512
Use the following functions to do your job. Please refer to online help for more information.
The NetUserDel function deletes a user account from a server.
The NetUserAdd function adds a user account and assigns a password and privilege level.

FtpGetCurrentDirectory Retrieves the current directory for the specified FTP session.
FtpSetCurrentDirectory Changes to a different working directory on the FTP server.
0
 

Author Comment

by:khaledo
ID: 1319513
Comment to : trestan

Thnaks for the answer.
The NetUserDel , NetUserAdd functions seem to be what I am looking for in part 1 of my question. I am testing them now.

FtpGetCurrentDirectory, FtpSetCurrentDirectory do not seem to be the functions that I can use to _create_ a new  FTP directory and alias from inside my application.

I will accept your answer for now but I will appreciate any comments about FTP account creation on NT.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
haveThree challenge 22 121
abstract class with all non abstract mentods 6 80
sumHeights2  challenge 7 115
wordappend challenge 8 200
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question