Creating active directory users with dscl

Our mac workstations (OSX 10.8) are bound to a 2008 Active Directory server.  We are attempting to use some existing dscl scripts on the mac client computer to create Active directory users.  We can successfully read and change AD attributes of an existing user with dscl, but creating new users or new attributes for an existing user gives us an error.  Here are some examples.
SUCCESSFUL READ OF AD USER ATTRIBUTE:
root# dscl -u administrator  "/Active Directory/CXAD/All Domains" -read /Users/jholmes SMBHomeDrive
Password:
SMBHomeDrive: H:
root#
SUCCESSFUL DELETE OF ABOVE USER ATTRIBUTE
root# dscl -u administrator  "/Active Directory/CXAD/All Domains" -delete /Users/jholmes SMBHomeDrive
Password:
root#
FAILED ATTEMPT AT RE-CREATING THE DELETED ATTRIBUTE
root# dscl -u administrator "/Active Directory/CXAD/All Domains" -create /Users/jholmes SMBHomeDrive
Password:
<main> attribute status: eDSInvalidRecordType
<dscl_cmd> DS Error: -14130 (eDSInvalidRecordType)
root#
The same error occurs when attempting to create a new user.  Any ideas?  Thanks in advance for any suggestions.

In the end I could not find them; account info is ONLY stored locally in Open Directory when they have mobile accounts.
However, I found I could migrate their user directories in Terminal via ditto ( I connected the old macs via Firewire Target mode) , and when they log in all their stuff and settings are there.
the command is: ditto /Volumes/<old mac hard drive>/Users/<username> /Users/<username>

Similar Messages

  • Adobe Form that Creates Active Directory User Account

    Hello all!  Hopefully someone can help me with this.  I am using Adobe LiveCycle Designer ES 8.2 to create a user account request form.  I have the form created and now am working on a submit button that will email the form to the approving officials.  Once its emailed to the approving officials I would like to have a button available in which the approval person can select resulting in the creation of an Active Directory user account.  I need the fields in the form to populate cooresponding fields inside of Active Directory.  Current AD structure is on Server 2003.  Are there any ideas for how to accomplish this?

    I don't know. However, you might get a better or faster answer in the LiveCycle forum that deals with Designer.

  • Bulk create Active Directory Users and Groups in PowerShell using Excel XLSX source file instead of CSV

    Hi Scripting Guy.  I am a Server Administrator who is very familiar with Active Directory, but new to PowerShell.  Like many SysAdmins, I often need to create multiple accounts (ranging from 3-200) and add them multiple groups (ranging
    from 1 - 100).  Previously I used VBS scripts in conjunction with an Excel .XLS file (not CSV file).  Since VBS is essentially out the door and PowerShell is in - I am having to re-create everthing.
    I have written a PowerShell script that bulk creates my users and adds them to their corresponding groups - however, this can only use a CSV file (NOT an XLS file).  I understand that "CSV is much easier to use than Excel worksheets", but
    most times I have three sets of nearly identical groups (for Dev, QA and Prod).  Performing Search and Replace on the Excel template across all four Worksheets ensures the names used are consistent throughout the three environments.
    I know each Excel Worksheet can be exported as a separate CSV file and then use the PowerShell scripts as is, but since I am not the only SysAdmin who will be using these it leads to "unnecessary time lost", not to mention the reality that even
    though you clearly state "These tabs need to be exported using this naming standard" (to work with the PowerShell scripts) that is not the result.
    I've been tasked to find a way to modify my existing PowerShell/CSV scripts to work with Excel spreadsheets/workbooks instead - with no success.  I have run across many articles/forums/scirpts that let you update Excel or export AD data into an Excel
    spreadsheet (even specifying the worksheet, column and row) - but nothing for what I am trying to do.
    I can't imagine that I am the ONLY person who is in this situation/has this need.  So, I am hoping you can help.  How do I modify my existing scripts to reference "use this Excel spreadsheet, and this specific worksheet in the spreadsheet
    prior to performing the New-ADUser/Add-ADGroupMember commands".
    For reference, I am including Worksheet/Column names of my Excel Spreadsheet Template as well as the first part of my PowerShell script.  M-A-N-Y T-H-A-N-K-S in advance.
       Worksheet:  Accounts
         Columns: samAccountName, CN_DisplayName_Name, sn_LastName, givenName_FirstName, Password, Description, TargetOU
       Worksheets:  DevGroups / QAGroups / ProdGroups
         Columns:  GroupName, Members, MemberOf, Description, TargetOU
    # Load PowerShell Active Directory module
    Write-Host "Loading Active Directory PowerShell module." -foregroundcolor DarkCyan # -backgroundcolor Black
    Import-Module ActiveDirectory
    Write-Host " "
    # Set parameter for location of CSV file (so source file only needs to be listed once).
    $path = ".\CreateNewUsers-CSV.csv"
    # Import CSV file as data source for remaining script.
    $csv = Import-Csv -path $path | ForEach-Object {
    # Add '@saccounty.net' suffix to samAccountName for UserPrincipalName
    $userPrincinpal = $_."samAccountName" + "@saccounty.net"
    # Create and configure new AD User Account based on information from the CSV source file.
    Write-Host " "
    Write-Host " "
    Write-Host "Creating and configuring new user account from the CSV source file." -foregroundcolor Cyan # -backgroundcolor Black
    New-ADUser -Name $_."cn_DisplayName_Name" `
    -Path $_."TargetOU" `
    -DisplayName $_."cn_DisplayName_Name" `
    -GivenName $_."givenName_FirstName" `
    -SurName $_."sn_LastName" `
    -SamAccountName $_."samAccountName" `
    -UserPrincipalName $userPrincinpal `

    Here is the same script as a function:
    Function Get-ExcelSheet{
    Param(
    $fileName = 'C:\scripts\test.xls',
    $sheetName = 'csv2'
    $conn = New-Object System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = $fileName;Extended Properties=Excel 8.0")
    $cmd=$conn.CreateCommand()
    $cmd.CommandText="Select * from [$sheetName$]"
    $conn.open()
    $cmd.ExecuteReader()
    It is called like this:
    Get-ExcelSheet -filename c:\temp\myfilename.xslx -sheetName mysheet
    Do NOT change anything in the function and post the exact error.  If you don't have Office installed correctly or are running 64 bits with a 32 bit session you will have to adjust your system.
    ¯\_(ツ)_/¯
    HI JRV,
    My apologies for not responding sooner - I was pulled off onto another project this week.  I have included and called your Get-ExcelSheet function as best as I could...
    # Load PowerShell Active Directory module
    Write-Host "Loading Active Directory PowerShell module." -foregroundcolor DarkCyan # -backgroundcolor Black
    Import-Module ActiveDirectory
    Write-Host " "
    # JRV This Function Loads the Excel Reader
    Function Get-ExcelSheet{
    Param(
    $fileName = 'C:\scripts\test.xls',
    $sheetName = 'csv2'
    $conn = New-Object System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source = $fileName;Extended Properties=Excel 8.0")
    $cmd=$conn.CreateCommand()
    $cmd.CommandText="Select * from [$sheetName$]"
    $conn.open()
    $cmd.ExecuteReader()
    # Set parameter for location of CSV file (so source file only needs to be listed once) as well as Worksheet Names.
    $sourceFile = ".\NewDocClass-XLS-Test.xlsx"
    # Add '@saccounty.net' suffix to samAccountName for UserPrincipalName
    $userPrincinpal = $_."samAccountName" + "@saccounty.net"
    # Combine GivenName & SurName for DisplayName
    $displayName = $_."sn_LastName" + ". " + $_."givenName_FirstName"
    # JRV Call the Get-ExcelSheet function, providing FileName and SheetName values
    # Pipe the data from source for remaining script.
    Get-ExcelSheet -filename "E:\AD_Bulk_Update\NewDocClass-XLS-Test.xlsx" -sheetName "Create DocClass Accts" | ForEach-Object {
    # Create and configure new AD User Account based on information from the CSV source file.
    Write-Host " "
    Write-Host " "
    Write-Host "Creating and configuring new user account from the CSV source file." -foregroundcolor Cyan # -backgroundcolor Black
    New-ADUser -Name ($_."sn_LastName" + ". " + $_."givenName_FirstName") `
    -SamAccountName $_."samAccountName" `
    -UserPrincipalName $userPrincinpal `
    -Path $_."TargetOU" `
    Below is the errors I get:
    Exception calling "Open" with "0" argument(s): "The 'Microsoft.Jet.OLEDB.4.0'
    provider is not registered on the local machine."
    At E:\AD_Bulk_Update\Create-BulkADUsers-XLS.ps1:39 char:6
    + $conn.open()
    + ~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException
    Exception calling "ExecuteReader" with "0" argument(s): "ExecuteReader
    requires an open and available Connection. The connection's current state is
    closed."
    At E:\AD_Bulk_Update\Create-BulkADUsers-XLS.ps1:40 char:6
    + $cmd.ExecuteReader()
    + ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

  • Automate the creation of Active Directory users with organization/address information

    On one of our Domain Controllers we regularly have to create new users with fully populated organisation/address information, as they use a server-side application which appends email signatures at the end of all of their emails created from this information.
    At the moment we have to fill this information out manually and it can sometimes cause inconsistencies if the information is not uniform or is typed incorrectly.
    Is there any way to automate this/do it in bulk?

    This is another Powershell script that can be used:
    http://www.wictorwilen.se/how-to-use-powershell-to-populate-active-directory-with-plenty-enough-users-for-sharepoint
    Note that you have two ways to do that:
    Create a new User account Provisioning script and include the Street update as part of it
    Have a daily scheduled script that will run against your users OUs and update the Street address for user accounts having it wrong or missing
    From my point of view, option 2 would be the best as it will make a Bulk update and Bulk correction if required.
    This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Setting disk quota on Mac server for Active Directory users

    I'm having trouble setting disk quotas for Active Directory users with home folders on our Mac server.
    I've enabled disk quotas on the disk I'm putting home folders on, and I can set disk quotas for local users on the server just fine. But it doesn't seem to work for Active Directory users. I've tried setting disk quotas via Workgroup Manager and via the command line using edquota. But when I use the repquota command there is no quota entry for the AD user. I've run quotacheck and that didn't help either.
    I also understand there's a setquota command but there's no man page on how that works.
    Has anyone got disk quota for AD users working.
    Better still has someone got a shell or perl script for setting quotas they could post.
    Thanks
    - Cameron

    sorry.. I am soooooo stupid... I have to activate "File Sharing" as well.. for the user everything was already pre-activated, not for the AD users, I just saw the Time Machine checkbox grayed out ...

  • Unable to login @ login window with Active Directory User

    I successfully bound my test machine to Active Directory and can search using dscl and id. I can also su to my active directory user account an authenticate perfectly. All search bases are correct and everything else looks fine.
    When I attempt to login from the login window as an AD user, the window shakes. Clicking under Mac OS X shows that "Network Accounts Available". Looks like the CLI tool "dirt" is now gone as well, although insecure it would possibly show something here.
    Anyone else having issues after binding to AD? I bound using the Directory Utility gui... I have not tried using my leopard bind script yet.
    Thanks,
    Ken

    I have pretty well the same problem. The machine was already bound to AD prior to upgrade. After could not login on with my account (jball). Can log on with other accounts from the same domain (we only have one AD domain). Can also su to jball in a terminal session. Can't access network resources with jball when I try to connect to a windows server through the finder, instantly comes up with bad username or password, doesn't even think about it.
    I have removed any copies of the home folder under either /Users or /Domain as I have had problems with that before. Have repaired permissions and unbind and bind the machine to AD. Have been at this all day now and no closer. Get these error messages in console:
    31/08/09 4:49:27 PM SecurityAgent[666] Could not get the user record for 'jball@domainname' from Directory Services
    31/08/09 4:49:27 PM SecurityAgent[666] User info context values set for jball@domainname
    31/08/09 4:49:27 PM SecurityAgent[666] unknown-user (jball@domainname) login attempt PASSED for auditing

  • Exporting Active directory users to excel with conditions

    I'm trying to export AD users with selected fields out to a spreadsheet, with the condition that the employeeid field is greater than 99999.    I found a VBScript elsewhere on this site that does everything i need, even filtering on the employeeid
    field except that when it export to the spreadsheet the employeeid field comes back as if it's blank.  But i know it's not as it will do the filtering correctly.  Below is the script i've been using.   As i said it will correctly list all users
    with employeeid greated than 5 digits but it just won't export the actual employeeid field
    Dim ObjWb 
    Dim ObjExcel 
    Dim x, zz 
    Set objRoot = GetObject("LDAP://RootDSE") 
    strDNC = objRoot.Get("DefaultNamingContext") 
    Set objDomain = GetObject("LDAP://" & strDNC) ' Bind to the top of the Domain using LDAP using ROotDSE 
    Call ExcelSetup("Sheet1") ' Sub to make Excel Document 
    x = 1 
    Call enummembers(objDomain) 
    Sub enumMembers(objDomain) 
    On Error Resume Next 
    Dim Secondary(20) ' Variable to store the Array of 2ndary email alias's 
    For Each objMember In objDomain ' go through the collection 
    if ObjMember.EmployeeID > 199999 Then  'if employee id greater than 199999 then add to spreadsheet (meaning physician)
    x = x +1 ' counter used to increment the cells in Excel 
    ' I set AD properties to variables so if needed you could do Null checks or add if/then's to this code 
    ' this was done so the script could be modified easier. 
    SamAccountName = ObjMember.samAccountName 
    FirstName = objMember.GivenName 
    LastName = objMember.sn 
    EmployeeID = ojbMember.employeeID
    EmailAddr = objMember.mail 
    Addr1 = objMember.streetAddress 
    Title = ObjMember.Title 
    Department = objMember.Department
    ' Write the values to Excel, using the X counter to increment the rows. 
    objwb.Cells(x, 1).Value = EmployeeID
    objwb.Cells(x, 2).Value = SamAccountName 
    objwb.Cells(x, 3).Value = FirstName 
    objwb.Cells(x, 4).Value = LastName 
    objwb.Cells(x, 5).Value = EmailAddr
    objwb.Cells(x, 6).Value = Addr1 
    objwb.Cells(x, 7).Value = Title 
    objwb.Cells(x, 8).Value = Department 
    ' Write out the Array for the 2ndary email addresses. 
    For ll = 1 To 20 
    objwb.Cells(x,26+ll).Value = Secondary(ll) 
    Next 
    ' Blank out Variables in case the next object doesn't have a value for the property 
    EmployeeID = "-"
    SamAccountName = "-" 
    FirstName = "-" 
    LastName = "-" 
    EmailAddr = "-" 
    Addr1 = "-" 
    Title = "-" 
    Department = "-" 
    For ll = 1 To 20 
    Secondary(ll) = "" 
    Next 
    End If 
    ' If the AD enumeration runs into an OU object, call the Sub again to itinerate 
    If objMember.Class = "organizationalUnit" or OBjMember.Class = "container" Then 
    enumMembers (objMember) 
    End If 
    Next 
    End Sub 
    Sub ExcelSetup(shtName) ' This sub creates an Excel worksheet and adds Column heads to the 1st row 
    Set objExcel = CreateObject("Excel.Application") 
    Set objwb = objExcel.Workbooks.Add 
    Set objwb = objExcel.ActiveWorkbook.Worksheets(shtName) 
    Objwb.Name = "Active Directory Users" ' name the sheet 
    objwb.Activate 
    objExcel.Visible = True 
    objwb.Cells(1, 1).Value = "EmployeeID"
    objwb.Cells(1, 2).Value = "SAMAccountName"
    objwb.Cells(1, 3).Value = "FirstName" 
    objwb.Cells(1, 4).Value = "LastName"  
    objwb.Cells(1, 5).Value = "Email" 
    objwb.Cells(1, 6).Value = "Addr1" 
    objwb.Cells(1, 7).Value = "Title" 
    objwb.Cells(1, 8).Value = "Department" 
    End Sub 
    MsgBox "User dump has completed.", 64, "AD Dump" ' show that script is complete

    Here is a test version
    Set xl = CreateObject("Excel.Application")
    xl.Visible = True
    Set wb = xl.Workbooks.Add()
    Set sheet = wb.Worksheets("sheet1")
    sheet.Name = "Active Directory Users"
    i = 1
    With sheet
    .Cells(i, 1).Value = "EmployeeID"
    .Cells(i, 2).Value = "SAMAccountName"
    .Cells(i, 3).Value = "FirstName"
    .Cells(i, 4).Value = "LastName"
    .Cells(i, 5).Value = "Email"
    .Cells(i, 6).Value = "Addr1"
    .Cells(i, 7).Value = "Title"
    .Cells(i, 8).Value = "Department"
    End With
    Set users = GetADUsers()
    While Not users.EOF
    i = i + 1
    With sheet
    .Cells(i, 1).Value = users("employeeID")
    .Cells(i, 2).Value = users("samAccountName")
    .Cells(i, 3).Value = users("GivenName")
    .Cells(i, 4).Value = users("sn")
    .Cells(i, 5).Value = users("mail")
    .Cells(i, 6).Value = users("streetAddress")
    .Cells(i, 7).Value = users("Title")
    .Cells(i, 8).Value = users("Department")
    End With
    users.MoveNext
    Wend
    Function GetADUsers()
    Set rootDSE = GetObject("LDAP://RootDSE")
    base = "<LDAP://" & rootDSE.Get("defaultNamingContext") & ">"
    filt = "(&(objectClass=user)(objectCategory=Person))"
    attr = "employeeid,SAMAccountName,mail,GivenName,sn,streetAddress,Title,Department"
    scope = "subtree"
    Set conn = CreateObject("ADODB.Connection")
    conn.Provider = "ADsDSOObject"
    conn.Open "Active Directory Provider"
    Set cmd = CreateObject("ADODB.Command")
    Set cmd.ActiveConnection = conn
    cmd.CommandText = base & ";" & filt & ";" & attr & ";" & scope
    Set GetADUsers = cmd.Execute()
    End Function
    ¯\_(ツ)_/¯

  • Cannot log into DTR with Active Directory User

    Greetings,
    I have set up and installed JDI correctly.  I can log into /devinf, the cbs, cms and sld systems with no problem using both Administrator and my JDI.Administrator that I assigned to an Active Directory user.  I can log into the DTR using a user from the database (i.e. Administrator), however, when trying to access the DTR with an Active Directory user, I get the following message:
    500   Internal Server Error
      SAP J2EE Engine/6.40 
      Application error occurred during the request procession.
      Details:   Error [javax.servlet.ServletException: Group found, but unique name "businessUnit.all.guests" is not unique!], with root cause [com.tssap.dtr.server.deltav.InternalServerException: Group found, but unique name "businessUnit.all.guests" is not unique!].  The ID of this error is
    Exception id: [0012798F81680042000000090000165C0003FE9AA3C0B86B].
    This group exists in multiple domainshowever, this has not caused us any issues to date with our portal and other pieces of SAP WASit's only this DTR error. 
    Any help is greatly appreciated.
    Thanks,
    Marty

    Hi Marty,
    In the document available at the link enclosed below, there is a part that explains how to configure DTR so that it always uses "Unique-IDs".
    http://help.sap.com/saphelp_nw04/helpdata/en/20/f4a94076b63713e10000000a155106/frameset.htm
    It is mentioned that this is valid for LDAP, but the information is applicable for Active Directory as well.
    Regards,
    Manohar

  • Issue with Active Directory User Target Recon

    Hi ,
    I am facing an issue with Active Directory User Target Recon
    My environment is OIM 11g R2 with BP03 patch applied
    AD Connector is activedirectory-11.1.1.5 with bundle patch 14190610 applied
    In my Target there are around 28000 users out of which 14000 have AD account (includes Provisioned,Revoked,Disabled accounts)
    When i am running Active Directory User Target Recon i am not putting any filter cleared the batch start and batch size parameters and ran the recon job .Job ran successfully but it stopped after processing around 3000 users only.
    Retried the job two three times but every time it is stopping after processing some users but not processing all the users.
    Checked the log file oimdiagnostic logs and Connector server logs cannot see any errors in it.
    Checked the user profile of users processed can see AD account provisioned for users
    My query is why this job is not processing allthe users.Please point if i am missing some thing .
    thanks in advance

    Check the connector server load when you are running the recon. Last time I checked the connector, the way it was written is that it loads all the users from AD into the connector server memory and then sends them to OIM. So if the number was huge, then the connector server errored out and did not send data to OIM. We then did recon based on OUs to load/link all the users into OIM. Check the connector server system logs and check for memory usage etc.
    -Bikash

  • How to create "folders" in Active Directory Users and Computers?

    Hello Community
        In Windows Server 2008R2 when you go to Active Directory Users and Computer
    you will see icons of folders such as:
        -  Builtin has a folder icon
        - Computers has a folder icon
        - ForeignSecurityPrinicpals has a folder icon
        - Domain Controller as a folder icon
        - Managed Service Accounts has a folder icon
        - Users has a folder icon
        All of the above folders are visually identical.
        If you right click and select “File” –  “New”
     on any of the selections the icon
    will not look like the folder icon they have their own icons which look different
    from the "Folder" icon.
        I would like to create a “Folder” that looks just visually exactly like the ones
    mentioned above, how can I create those types of Folders in Active Directory User
    and Computers?
        Note: I would like to put users in the folders.
        Thank you
        Shabeaut

    Hi,
    you should use OUs (an OU is they type of object (folder) that is available for you to easily create.
    The object type you are asking about is a "container", and there are various reasons why an OU is more flexible (applying GPO, etc).
    Refer: Delegating Administration by Using OU Objects
    http://technet.microsoft.com/en-us/library/cc780779(v=ws.10).aspx   
    and the sub-articles:
    Administration of Default Containers and OUs
    http://technet.microsoft.com/en-us/library/cc728418(v=ws.10).aspx
    Delegating Administration of Account and Resource OUs
    http://technet.microsoft.com/en-us/library/cc784406(v=ws.10).aspx
    Also: http://technet.microsoft.com/en-us/library/cc961764.aspx
    Don
    (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable.
    This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)

  • How to import your MS Active Directory users in an Oracle table

    Hello,
    I first tried to get a Heterogenous Connection to my MS Active Directory to get information on my Active Directory users.
    This doesn't work so I used an alternative solution:
    How to import your MS Active Directory users in an Oracle table
    - a Visual Basic script for export from Active Directory
    - a table in my database
    - a SQL*Loader Control-file
    - a command-file to start the SQL*Loader
    Now I can schedule the vsb-script and the command-file to get my information in an Oracle table. This works fine for me.
    Just to share my scripts:
    I made a Visual Basic script to make an export from my Active Directory to a CSV-file.
    'Export_ActiveDir_users.vbs                              26-10-2006
    'Script to export info from MS Active Directory to a CSV-file
    '     Accountname, employeeid, Name, Function, Department etc.
    '       Richard de Boer - Wetterskip Fryslan, the Nethterlands
    '     samaccountname          Logon Name / Account     
    '     employeeid          Employee ID
    '     name               name     
    '     displayname          Display Name / Full Name     
    '     sn               Last Name     
    '     description          Description / Function
    '     department          Department / Organisation     
    '     physicaldeliveryofficename Office Location     Wetterskip Fryslan
    '     streetaddress          Street Address          Harlingerstraatweg 113
    '     l               City / Location          Leeuwarden
    '     mail               E-mail adress     
    '     wwwhomepage          Web Page Address
    '     distinguishedName     Full unique name with cn, ou's, dc's
    'Global variables
        Dim oContainer
        Dim OutPutFile
        Dim FileSystem
    'Initialize global variables
        Set FileSystem = WScript.CreateObject("Scripting.FileSystemObject")
        Set OutPutFile = FileSystem.CreateTextFile("ActiveDir_users.csv", True)
        Set oContainer=GetObject("LDAP://OU=WFgebruikers,DC=Wetterskip,DC=Fryslan,DC=Local")
    'Enumerate Container
        EnumerateUsers oContainer
    'Clean up
        OutPutFile.Close
        Set FileSystem = Nothing
        Set oContainer = Nothing
        WScript.Echo "Finished"
        WScript.Quit(0)
    Sub EnumerateUsers(oCont)
        Dim oUser
        For Each oUser In oCont
            Select Case LCase(oUser.Class)
                   Case "user"
                        If Not IsEmpty(oUser.distinguishedName) Then
                            OutPutFile.WriteLine _
                   oUser.samaccountname      & ";" & _
                   oUser.employeeid     & ";" & _
                   oUser.Get ("name")      & ";" & _
                   oUser.displayname      & ";" & _
                   oUser.sn           & ";" & _
                   oUser.description      & ";" & _
                   oUser.department      & ";" & _
                   oUser.physicaldeliveryofficename & ";" & _
                   oUser.streetaddress      & ";" & _
                   oUser.l           & ";" & _
                   oUser.mail           & ";" & _
                   oUser.wwwhomepage      & ";" & _
                   oUser.distinguishedName     & ";"
                        End If
                   Case "organizationalunit", "container"
                        EnumerateUsers oUser
            End Select
        Next
    End SubThis give's output like this:
    rdeboer;2988;Richard de Boer;Richard de Boer;de Boer;Database Administrator;Informatie- en Communicatie Technologie;;Harlingerstraatweg 113;Leeuwarden;[email protected];;CN=Richard de Boer,OU=Informatie- en Communicatie Technologie,OU=Afdelingen,OU=WFGebruikers,DC=wetterskip,DC=fryslan,DC=local;
    tbronkhorst;201;Tjitske Bronkhorst;Tjitske Bronkhorst;Bronkhorst;Configuratiebeheerder;Informatie- en Communicatie Technologie;;Harlingerstraatweg 113;Leeuwarden;[email protected];;CN=Tjitske Bronkhorst,OU=Informatie- en Communicatie Technologie,OU=Afdelingen,OU=WFGebruikers,DC=wetterskip,DC=fryslan,DC=local;I made a table in my Oracle database:
    CREATE TABLE     PG4WF.ACTD_USERS     
         samaccountname          VARCHAR2(64)
    ,     employeeid          VARCHAR2(16)
    ,     name               VARCHAR2(64)
    ,     displayname          VARCHAR2(64)
    ,     sn               VARCHAR2(64)
    ,     description          VARCHAR2(100)
    ,     department          VARCHAR2(64)
    ,     physicaldeliveryofficename     VARCHAR2(64)
    ,     streetaddress          VARCHAR2(128)
    ,     l               VARCHAR2(64)
    ,     mail               VARCHAR2(100)
    ,     wwwhomepage          VARCHAR2(128)
    ,     distinguishedName     VARCHAR2(256)
    )I made SQL*Loader Control-file:
    LOAD DATA
    INFILE           'ActiveDir_users.csv'
    BADFILE      'ActiveDir_users.bad'
    DISCARDFILE      'ActiveDir_users.dsc'
    TRUNCATE
    INTO TABLE PG4WF.ACTD_USERS
    FIELDS TERMINATED BY ';'
    (     samaccountname
    ,     employeeid
    ,     name
    ,     displayname
    ,     sn
    ,     description
    ,     department
    ,     physicaldeliveryofficename
    ,     streetaddress
    ,     l
    ,     mail
    ,     wwwhomepage
    ,     distinguishedName
    )I made a cmd-file to start SQL*Loader
    : Import the Active Directory users in Oracle by SQL*Loader
    D:\Oracle\ora92\bin\sqlldr userid=pg4wf/<password>@<database> control=sqlldr_ActiveDir_users.ctl log=sqlldr_ActiveDir_users.logI used this for a good list of active directory fields:
    http://www.kouti.com/tables/userattributes.htm
    Greetings,
    Richard de Boer

    I have a table with about 50,000 records in my Oracle database and there is a date column which shows the date that each record get inserted to the table, for example 04-Aug-13.
    Is there any way that I can find out what time each record has been inserted?
    For example: 04-Aug-13 4:20:00 PM. (For my existing records not future ones)
    First you need to clarify what you mean by 'the date that each record get inserted'.  A row is not permanent and visible to other sessions until it has been COMMITTED and that commit may happen seconds, minutes, hours or even days AFTER a user actually creates the row and puts a date in your 'date column'.
    Second - your date column, and ALL date columns, includes a time component. So just query your date column for the time.
    The only way that time value will be incorrect is if you did something silly like TRUNC(myDate) when you inserted the value. That would use a time component of 00:00:00 and destroy the actual time.

  • Best practice for Active Directory User Templates regarding Distribution Lists

    Hello All
    I am looking to implement Active Directory User templates for each department in the company to make the process of creating user accounts for new employees easier. Currently when a user is created a current user's Active directory account is copied, but
    this has led to problems with new employees being added to groups which they should not be a part of.
    I have attempted to implement this in the past but ran into an issue regarding Distribution Lists. I would like to set up template users with all group memberships that are needed for the department, including distribution lists. Previously I set this up
    but received complaints from users who would send e-mail to distribution lists the template accounts were members of.
    When sending an e-mail to the distribution list with a member template user, users received an error because the template account does not have an e-mail address.
    What is the best practice regarding template user accounts as it pertains to distribution lists? It seems like I will have to create a mailbox for each template user but I can't help but feel there is a better way to avoid this problem. If a mailbox is created
    for each template user, it will prevent the error messages users were receiving, but messages will simply build up in these mailboxes. I could set a rule for each one that deletes messages, but again I feel like there is a better way which I haven't thought
    of.
    Has anyone come up with a better method of doing this?
    Thank you

    You can just add arbitrary email (not a mailbox) to all your templates and it should solve the problem with errors when sending emails to distribution lists.
    If you want to further simplify your user creation process you can have a look at Adaxes (consider it's a third-party app). If you want to use templates, it gives you a slightly better way to do that (http://www.adaxes.com/tutorials_WebInterfaceCustomization_AllowUsingTemplatesForUserCreation.htm)
    and it also can automatically perform tasks such as mailbox creation for newly created users (http://www.adaxes.com/tutorials_AutomatingDailyTasks_AutomateExchangeMailboxesCreationForNewUsers.htm).
    Alternatively you can abandon templates at all and use customizable condition-based rules to automatically perform all the needed tasks on user creation such as OU allocation, group membership assignment, mailbox creation, home folder creation, etc. based on
    the factors you predefine for them.

  • Not able to open active directory user and computer in windows server 2008r2

    Hi All techies,
    i would like to know one issue which i am facing mostly, i have created 5 virtual machine all with window server2008r2 and one windows 7 on vm-ware now when ever i start my virtual machines everything going rite but when i try to open active directory user/
    computer or domain and trust i get a following error "data from active directory user and computers is not available from dc(null) bcoz unspecified error" even when i chk in events log its give me no help, and after 15-30 min everything works good
    Please let me know the cause of it and really appreciate it .
    Thanks
    Atul

    You need to ensure that
    1. group policy that says "wait for network before logon" is applied to all computers including servers and workstations is applied
    2. DNS record exists for all DCs in DNS
    3. If there are multiple Domain Controllers in Forests, then they point them as secondary DNS server. This way they will be able to resolve IPs if local DNS server service takes time to start.
    As Chris mentioned, you need to start all DCs first, give a time of 5 minutes and then start member servers and workstations for successful logon.
    - Sarvesh Goel - Enterprise Messaging Administrator

  • Getting Active Directory Users in UCM User Admin - Users Tab

    Hello All
    We have integrated WLS with our Active Directory. And we are getting all the active directory users under Security Realms >myrealm >Users and Groups tab in WLS Console.
    We are also able to login to webcenter spaces and Content server using those userid and credentials. But our problem is in UCM under Admin Applets - User Admin - Users tab all the active directory users are not listed. So we are not able to assign particular roles to the users.
    When a particular Active Directory user logins in UCM (First Time) after that the admisistrator (weblogic) is able to get that user under Admin Applets - User Admin - Users tab. And also it comes as an External user so we are not able to assign role.
    So basically UCM requires a login to get all the users listed in users tab.
    Our requirement is we want all the Active Directory users to get listed in UCM without the condition that the users has to login in content server once.
    Thanks

    Hi Navin ,
    First and foremost the requirement that you have posted is not possible and the reason for that is :
    Users are created on AD which is outside the realm of UCM hence there is no way that the users created on AD will be shown up under Users tab without they login atleast once . UCM does not know which all users are part of the realm until and unless the AD users login in atleast once .
    Secondly external users cannot be assigned roles from UCM because when the Auth type is set to External UCM sees it as external entity hence not giving it any way to relate roles / groups from UCM . As a workaround you can change the AuthType for the External users to Global from User Admin applet after the users login for the first time . This will enable you to assign roles / groups for the AD users .
    Hope this helps .
    Thanks
    Srinath

  • SMB access for Active Directory users

    Hi there,
    My server is an OD Master bound to AD for authentication and my institution's Kerberos realm.
    When I try to share files from the server via SMB and connect as an Active Directory user I get the following error in the logs:
    [2009/06/11 12:02:27, 1, pid=5308] /SourceCache/samba/samba-187.8/samba/source/libads/kerberosverify.c:ads_verifyticket(428)
    adsverifyticket: smbkrb5_parse_name(myserver$) failed (Configuration file does not specify default realm)
    [2009/06/11 12:02:27, 1, pid=5308] /SourceCache/samba/samba-187.8/samba/source/smbd/sesssetup.c:replyspnegokerberos(340)
    Failed to verify incoming ticket with error NTSTATUS_LOGONFAILURE!
    I've read something vague about having to Kerberize the SMB service seperately so I'm not sure if that's the problem.
    My smb.conf file is as follows:
    ; Configuration file for the Samba software suite.
    ; ============================================================================
    ; For the format of this file and comprehensive descriptions of all the
    ; configuration option, please refer to the man page for smb.conf(5).
    ; The following configuration should suit most systems for basic usage and
    ; initial testing. It gives all clients access to their home directories and
    ; allows access to all printers specified in /etc/printcap.
    ; BEGIN required configuration
    ; Parameters inside the required configuration block should not be altered.
    ; They may be changed at any time by upgrades or other automated processes.
    ; Site-specific customizations will only be preserved if they are done
    ; outside this block. If you choose to make customizations, it is your
    ; own responsibility to verify that they work correctly with the supported
    ; configuration tools.
    [global]
    debug pid = yes
    log level = 1
    server string = Mac OS X
    printcap name = cups
    printing = cups
    encrypt passwords = yes
    use spnego = yes
    passdb backend = odsam
    idmap domains = default
    idmap config default: default = yes
    idmap config default: backend = odsam
    idmap alloc backend = odsam
    idmap negative cache time = 5
    map to guest = Bad User
    guest account = nobody
    unix charset = UTF-8-MAC
    display charset = UTF-8-MAC
    dos charset = 437
    vfs objects = darwinacl,darwin_streams
    ; Don't become a master browser unless absolutely necessary.
    os level = 2
    domain master = no
    ; For performance reasons, set the transmit buffer size
    ; to the maximum and enable sendfile support.
    max xmit = 131072
    use sendfile = yes
    ; The darwin_streams module gives us named streams support.
    stream support = yes
    ea support = yes
    ; Enable locking coherency with AFP.
    darwin_streams:brlm = yes
    ; Core files are invariably disabled system-wide, but attempting to
    ; dump core will trigger a crash report, so we still want to try.
    enable core files = yes
    ; Configure usershares for use by the synchronize-shares tool.
    usershare max shares = 1000
    usershare path = /var/samba/shares
    usershare owner only = no
    usershare allow guests = yes
    usershare allow full config = yes
    ; Filter inaccessible shares from the browse list.
    com.apple:filter shares by access = yes
    ; Check in with PAM to enforce SACL access policy.
    obey pam restrictions = yes
    ; Don't be trying to enforce ACLs in userspace.
    acl check permissions = no
    ; Make sure that we resolve unqualified names as NetBIOS before DNS.
    name resolve order = lmhosts wins bcast host
    ; Pull in system-wide preference settings. These are managed by
    ; synchronize-preferences tool.
    include = /var/db/smb.conf
    [printers]
    comment = All Printers
    path = /tmp
    printable = yes
    guest ok = no
    create mode = 0700
    writeable = no
    browseable = no
    ; Site-specific parameters can be added below this comment.
    ; END required configuration.
    Any help would be much appreciated!!
    Thanks.

    I am now having the same problem - a Windows server trying to access a file share on the Mac Server is presented with the same error message in the log files:
    [2009/06/29 21:34:56, 2, pid=485] /SourceCache/samba/samba-187.8/samba/source/smbd/sesssetup.c:setupnew_vcsession(1260)
    setupnew_vcsession: New VC == 0, if NT4.x compatible we would close all old resources.
    [2009/06/29 21:34:56, 1, pid=485] /SourceCache/samba/samba-187.8/samba/source/libads/kerberosverify.c:ads_verifyticket(428)
    adsverifyticket: smbkrb5_parsename(vifile$) failed (Configuration file does not specify default realm)
    [2009/06/29 21:34:56, 1, pid=485] /SourceCache/samba/samba-187.8/samba/source/smbd/sesssetup.c:replyspnegokerberos(340)
    Failed to verify incoming ticket with error NTSTATUS_LOGONFAILURE!
    Workgroup manager can read from Active Directory - seems to be jiving correctly - my server (SMB) is in Domain Member mode...
    When I try to access system from \\UNC command, I am presented with username/password prompt and nothing works.
    Not feeling the Mac OS X love tonight.
    Bill
    System is bound to active directory - green light in Directory Utility

Maybe you are looking for

  • Verizon Wireless Network Extender and the Terrible, Horrible, No Good, Very Bad Customer Service experience

    It was a dark and stormy night... For the past eight years, I had been happy with Verizon wireless service. Great coverage and rarely a dropped call. However, all of that changed when I moved into a lovely mid-century modern condominium. The solid co

  • Business Partner Error while staffing

    when i enter a valid business partner (employee) in cProjects Staffing tab, i get error messages as follows 'Enter Valid Business partner' Message was caused by reference object 'Business Partner Link' Please help me to resolve this issue Thanks yasa

  • North Dakota state tax problema

    Hi guys! I am running october payroll for an employee in ND with W4 status married. The problem is when I see ND tax part I get $119.00 for the basic salary of $4,375.76 but if I use paycheckcity.com to compare that amount I get $105.00 Employee is b

  • Knowldge management - Repository Framework- Repository manager- Repositor

    Dear all, We have a requirement to store different kinds of documents could you please explain Wha is Repository Framework->Repository manager-> Repository i have seen WebDV, Lotus notes, File system, Webrepository for above scenario which repsoitory

  • Hp officejet 4500 goes into powersave mode and won't wakeup

    my hp officejet 4500 wireless printer will not wakeup from powersave mode unless the power is unplugged and plugged back in again . you can't even shut it off when in powersave mode I've had this problem since it was new and HP didn't seem to be able