?
Solved

Automate user access to NT ftp server

Posted on 1998-07-21
5
Medium Priority
?
169 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 600 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

752 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