I have no idea why i can't get my asp page to access my ad,
so all i need to do is make a user on my site by im running into a wall, i think i may need to authenticate but i don't know what to do.
i can get it to recall whatever i put into it
<html>
<body>
<table border="1">
<form action="makeus.asp" method="post">
<tr>
Make user
</tr>
<tr>
<th>
User Name
</th>
<th>
<input type="text" name="uname"/>
</th>
</tr>
<tr>
<th>
Password
</th>
<th>
<input type="text" name="fpass"/>
</th>
</tr>
<tr>
<th>
Re-enter
Password
</th>
<th>
<input type="text" name="spass"/>
</th>
</tr>
<tr>
<th>
First name
</th>
<th>
<input type="text" name="fname"/>
</th>
</tr>
<tr>
<th>
Inital
</th>
<th>
<input type="text" name="iname"/>
</th>
</tr>
<tr>
<th>
Last name
</th>
<th>
<input type="text" name="lname"/>
</th>
</tr>
<tr>
<th>
Display name
</th>
<th>
<input type="text" name="dname"/>
</th>
</tr>
<tr>
<th>
Description
</th>
<th>
<input type="text" name="desc"/>
</th>
</tr>
<tr>
<th>
Telephone #
</th>
<th>
<input type="text" name="tele"/>
</th>
</tr>
<tr>
<th>
E-mail
</th>
<th>
<input type="text" name="email"/>
</th>
</tr>
<tr>
<th>
</th>
<th>
<input type="submit" value="Submit"/>
</th>
</tr>
</form>
</table>
<table>
<%
dim useratr(10)
useratr(0)=Request.Form("uname")
useratr(1)=request.form("fpass")
useratr(2)=request.form("spass")
useratr(3)=request.form("fname")
useratr(4)=request.form("iname")
useratr(5)=request.form("lname")
useratr(6)=request.form("dname")
useratr(7)=request.form("desc")
useratr(8)=request.form("tele")
useratr(9)=request.form("email")
if useratr(1) <> useratr(2) then
response.write("password isn't the same")
else
Set objOU = GetObject("LDAP://cn=Users,dc=someome,dc=domain")
Set objUser = objOU.Create("User", "cn=" & useratr(0))
objUser.Put "sAMAccountName", useratr(0)
objUser.Put "givenName", useratr(3)
objUser.Put "initials", useratr(4)
objUser.Put "sn", useratr(5)
objUser.Put "displayName", useratr(6)
objUser.Put "description", useratr(7)
objuser.Put "telephoneNumber", useratr(8)
objuser.Put "mail", useratr(9)
objUser.SetInfo
objUser.SetPassword useratr(1)
objUser.SetInfo
response.write "user "& useratr(0) &" has been made"
end if
%>
</body>
</html>
so all i need to do is make a user on my site by im running into a wall, i think i may need to authenticate but i don't know what to do.
i can get it to recall whatever i put into it
<html>
<body>
<table border="1">
<form action="makeus.asp" method="post">
<tr>
Make user
</tr>
<tr>
<th>
User Name
</th>
<th>
<input type="text" name="uname"/>
</th>
</tr>
<tr>
<th>
Password
</th>
<th>
<input type="text" name="fpass"/>
</th>
</tr>
<tr>
<th>
Re-enter
Password
</th>
<th>
<input type="text" name="spass"/>
</th>
</tr>
<tr>
<th>
First name
</th>
<th>
<input type="text" name="fname"/>
</th>
</tr>
<tr>
<th>
Inital
</th>
<th>
<input type="text" name="iname"/>
</th>
</tr>
<tr>
<th>
Last name
</th>
<th>
<input type="text" name="lname"/>
</th>
</tr>
<tr>
<th>
Display name
</th>
<th>
<input type="text" name="dname"/>
</th>
</tr>
<tr>
<th>
Description
</th>
<th>
<input type="text" name="desc"/>
</th>
</tr>
<tr>
<th>
Telephone #
</th>
<th>
<input type="text" name="tele"/>
</th>
</tr>
<tr>
<th>
</th>
<th>
<input type="text" name="email"/>
</th>
</tr>
<tr>
<th>
</th>
<th>
<input type="submit" value="Submit"/>
</th>
</tr>
</form>
</table>
<table>
<%
dim useratr(10)
useratr(0)=Request.Form("uname")
useratr(1)=request.form("fpass")
useratr(2)=request.form("spass")
useratr(3)=request.form("fname")
useratr(4)=request.form("iname")
useratr(5)=request.form("lname")
useratr(6)=request.form("dname")
useratr(7)=request.form("desc")
useratr(8)=request.form("tele")
useratr(9)=request.form("email")
if useratr(1) <> useratr(2) then
response.write("password isn't the same")
else
Set objOU = GetObject("LDAP://cn=Users,dc=someome,dc=domain")
Set objUser = objOU.Create("User", "cn=" & useratr(0))
objUser.Put "sAMAccountName", useratr(0)
objUser.Put "givenName", useratr(3)
objUser.Put "initials", useratr(4)
objUser.Put "sn", useratr(5)
objUser.Put "displayName", useratr(6)
objUser.Put "description", useratr(7)
objuser.Put "telephoneNumber", useratr(8)
objuser.Put "mail", useratr(9)
objUser.SetInfo
objUser.SetPassword useratr(1)
objUser.SetInfo
response.write "user "& useratr(0) &" has been made"
end if
%>
</body>
</html>