Administrace
" response.write "Verze 2.0
" response.write "% strName = request.form("name") strSurname = request.form("surname") strUser = request.form("username") strOU = request.form("orgunit") authuser = Request.ServerVariables("auth_user") authpass = Request.ServerVariables("auth_password") domainname="ZSSLAPANOV" if strUser="" then response.write "" response.write "" response.write "
" response.write "" response.write "" response.write "" response.write "" response.write "Verze 2.0
" response.write "Copyright © 2010 Aleš Pospíchal
" response.write "Webové rozhraní: xadmin.cz
" response.write "" response.end else if not empty strName and strSurname and strUser then Set objConnection = CreateObject("ADODB.Connection") Set objCommand = CreateObject("ADODB.Command") objConnection.Provider = "ADsDSOObject" objConnection.Properties("User ID") = domainname+"\" + authuser objConnection.Properties("Password") = authpass objConnection.Properties("Encrypt Password") = TRUE objConnection.Properties("ADSI Flag") = 3 objConnection.Open "Active Directory Provider" Set objCommand.ActiveConnection = objConnection Set objOU = GetObject("LDAP://OU='" & strOU & "',dc=test,dc=local") Set objUser = objOU.Create("User", cn=strName+" " + StrSurname) objUser.Put "sAMAccountName", StrUser objUser.SetInfo Set objUser = GetObject _ ("LDAP://cn='"strName+" " + StrSurname"',ou='" & strOU & "',dc=test,dc=local") objUser.Put "userPrincipalName", "'" & strUser & "'@test.local" objUser.Put "givenName", strName objUser.Put "SN", strSurname objUser.Put "displayName", strName+" " + strSurname objUser.Put "profilePath", "\\WIN-7SLGU4B55R1\Profiles\'" & strUser & "'" objUser.AccountDisabled = False objUser.SetPassword abc123 objUser.Put "pwdLastSet", "0" objUser.SetInfo Set objUser = GetObject("LDAP://cn='"strName+" " + StrSurname"',ou='" & strOU & "',dc=test,dc=local") Set objGroup = GetObject("LDAP://cn=Zaci,dc=test,dc=local") objGroup.add(objUser.ADsPath) response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "Verze 2.0
" response.write "Copyright © 2010 Aleš Pospíchal
" response.write "Webové rozhraní: xadmin.cz
" response.write "" response.end else response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "" response.write "Verze 2.0
" response.write "Copyright © 2010 Aleš Pospíchal
" response.write "Webové rozhraní: xadmin.cz
" response.write "" response.end end if end if %>