I am importing computer records from an /etc/passwd file on a UNIX host into Active Directory. All is working fine using the ldapadd command, but I need to set an attribute to a Windows constant, and I am not sure how to do it from perl.

In VBScript, I would do this:

' ADS_USER_FLAG_ENUM
Const ADS_UF_WORKSTATION_TRUST_ACCOUNT = &h1000

How do I write this constant in perl to my ldif file? My entries look like this:

my $strOutput = 'dn: CN='.$pieces[0].',OU=Computers,DC=foo,DC=edu'."\n".
                'changetype: add'."\n".
                'cn: '.$pieces[0]."\n".
                'sAMAccountName: '.uc($pieces[0]).'$'."\n".
                'dnsHostName: '.$pieces[0].'.plymouth.edu'."\n".:
                'description: Faculty and staff computer'."\n".
                'userAccountControl: &h1000'."\n".
                'objectClass: Computer'."\n".
                "\n";

Which gives me the following error:

ldap_add: Invalid syntax (21)
additional info: 00000057: LdapErr: DSID-0C090B38, comment: Error in attribute conversion operation, data 0, vece


-Erich-
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to