Solved

Automate user access to NT ftp server

Posted on 1998-07-21
5
163 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.

749 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