Directory Security via ASP / Or Adding user to Win2000 users

R

Richard Morey

Hello,

I am working on a document management system for a client. I am planning to
set up the system so that documents are protected, sort of.. A user has an
access level and based on that access level, a list of available documents
will display as an HTML page and the user can click a hyperlink to download
or view the selected document.

I am planning to handle this all through a SQL database and ASP..

What I would REALLY like to do, though, is protect a set of directories so
that a user could not just enter a URL and download a document without being
prompted for a username and password if he/she hasn't already logged in.

I have done something like this using AuthnetiX from Flicks Software, but
this current client is trying to create a solution "on the cheap", and so
I'd like to see if I can build the solution using the secuirty mechanisms
built into the O/S.

What I'm thinking is that I'll set up the directories and assign a group
access to each directory.. My question then is, can I add users to the
"Local Users and Groups" for Windows 2000 via ASP?

Thanks,

Rich
 
J

Joerg

Hi Rich,

I had the same problem. I write the following script to add users to
a local group.

Sincerly,

Joerg

******
dim server, group,user

group= "localGroupName"
server= "pcName"
user = "domainuser"

Set obj = GetObject("WinNT://" & server & ",computer")

set oGroup = obj.GetObject("group", group)
oGroup.ADD "WinNT:" & "//Domain" & "/" & user
If Err.Number <> 0 Then
Response.Write "could not add user to group<br>"
Response.End
End if

oGroup.SetInfo

set oGroup = nothing
set obj = nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top