Re: Help - need to change an attribute value

Tech-Archive recommends: Fix windows errors by optimizing your registry



I think so. I haven't done a ton of schema mods in my day and have never
activated a defuncted attribute, but that sounds reasonable.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Sabo, Eric" <sabo_e@xxxxxxx> wrote in message
news:9CE91812-E6D0-438C-B9EB-1E15D07A4B7F@xxxxxxxxxxxxxxxx
Joe,

Would this work:

1. Activate the defuncted Attribute
2. Rename the attribute
3. Upload the schema changes
4. Defuncted the renamed attribute
5. Create the attribute again

Would this by any chance work?

"Joe Kaplan (MVP - ADSI)" wrote:

I think he's trying to change the schema for an attribute's syntax, not
change the values. His subject on his post is misleading.

I'm pretty sure you can't change the syntax after creation though. The
attribute would need to be defuncted and a new attribute would need to be
created. This is why you always try to practice on an ADAM instance if
possible.

The vendor is probably making a good suggestion though. Case-sensitive
string syntaxes are the devil. They make all your queries case sensitive
and cause many head-scratching moments. They are best avoided unless
absolutely required. If you poke around in the AD schema, very few
attributes use case sensitive syntaxes.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services
Programming"
http://www.directoryprogramming.net
--
"Richard Mueller" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> wrote in
message
news:%23DeFfdFpGHA.4408@xxxxxxxxxxxxxxxxxxxxxxx
Sabo, Eric wrote:

Is there any way to change an attribute value?

All I need to change is the syntax - we have it set at "Case Sensitive
String" and the vendor is saying it needs to be "Case Insensitive
String".

What tool could I use to accomplish this?

If all users have the same value for the attribute, it can be done in
ADUC. Otherwise, if everyone has a different value, you need to use a
script. If by case insensitive you mean all lower case, you can use the
LCase function in VBScript. If the attribute is a single valued string,
a
script can modify the attribute value for all users in the domain (or
in
an Organizational Unit) to make it lower case.

What is the attribute?
Does everyone have the same value assigned?
Do you want the existing value made lower case?
Should this be done to all users in the domain, all in an OU?

A quick example for all users in an OU:
========
' Bind to OU.
Set objOU = GetObject("LDAP://ou=Sales,dc=MyDomain,dc=com";)
' Filter on user objects.
objOU.Filter = Array("user")
' Enumerate users in the OU.
For Each objUser In objOU
' Retrieve attribute value.
strDeparment = objUser.department
' Make lower case.
strDepartment = LCase(strDepartment)
' Assign new value.
objUser.department = strDepartment
' Save changes.
objUser.SetInfo
Next
==========
To modify users in many OU/Containers throughout, you would use ADO to
retrieve all user distinguishedNames and the value of the attribute.
ADO
would return recordset with one row for each usere. You would loop
through
the recordset, bind to each user with the distingiushedName, retrieve
the
attribute value, modify it, and update the attribute value of the user
object.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net






.



Relevant Pages

  • Re: Help - need to change an attribute value
    ... What tool can I use to rename? ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... All I need to change is the syntax - we have it set at "Case Sensitive ...
    (microsoft.public.windows.server.active_directory)
  • Re: Need info on field sizes in AD
    ... The first thing to look at would be the schema reference in MSDN: ... schema will show the syntax defined for the attribute. ... The directory also enforces some other constraints on certain attributes ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: sql server 2005 security and schemas: an example please?
    ... First of all what vesrion of SQL Server are you using? ... permission only for schema that belongs to them. ... CREATE USER Joe FOR LOGIN Joe ... CREATE USER Paul FOR LOGIN Paul WITH DEFAULT_SCHEMA = Paul ...
    (microsoft.public.sqlserver.security)
  • Re: Domain registration requirement in federated web sso with fore
    ... Thanks a lot Joe for this useful information. ... We have some applications, written in non microsoft languages like Java, ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... internet, then the DNS entries for the resources will need to be ...
    (microsoft.public.windows.server.active_directory)
  • Re: Error setting DirecotrySearchers new ExtendedDN
    ... Thanks Joe, but now I'm worried and confused. ... 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, ... The .NET Framework does not support all versions of every platform. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.platformsdk.security)