Solved

Automate user access to NT ftp server

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now