howto: Copy value of attribute "comment" to attribute "mail"

Hello.

At one eDir (nw6.5.6) almost all users were created using NWAdmin.
As it doesn't offer access to "mail" attribute, the email address
of the users was written to the attribute "comment".

I'm looking for a possiblity to 

 - search for user objects throughout the tree
 - check, if there already is a email address in "mail"
 - if not, check, if "comment" has a valid email address
 - if that is fact, *WRITE* this one to "mail"
 - next user


I was wondering if I could do this through LDAP queries, but after searching
quite a while I can only find some free ldap browsers, nothing how to batch
LDAP actions.

Or may be there is some other approach a much better way do do this?

(maybe ICE, which I honestly have no expirience with, I just know it's there...)



Any suggestions appreciated,


Regards, Rudi.
0
Rudolf
8/10/2007 9:53:51 PM
novell.edirectory.netware 7858 articles. 0 followers. Follow

13 Replies
440 Views

Similar Articles

[PageSpeed] 15

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have no idea what "comment" is in LDAP terms (I can't create a user
with 'comment' attributes by default) but let's pretend you had used
description instead and that the only value you could have in
description was this mail address:

ldapsearch -h ipAddressGoesHere -p 389 -D
cn=admin,dc=userAndContext,dc=goes,dc=here -x -ZZZ -W
'(&(!(mail=*))(description=*))' description > ./outputFile.ldif

What we are doing is requesting all users who have no mail address but
do have a description (the filter is '(&(!(mail=*))(description=*))'
which can be used in any LDAP browser (w/out quotes in a GUI environment
probably).  The output looks like the following:

dn: cn=test02,ou=testad0,o=suse,dc=org
description: test02mailaddressehere@suse.org

dn: cn=test03,ou=testad0,o=suse,dc=org
description: test03mailaddresshere@suse.org

So now all you do is search/replace 'description:' with 'mail:' and
reimport as changes with ldapmodify:

ldapmodify -h ipAddressGoesHere -p 389 -D
cn=admin,dc=userAndContext,dc=goes,dc=here -x -ZZZ -W -f ./outputFile.ldif

You may need to add the following line after the 'dn: blah blah' line
but you shouldn't need to:

changetype: modify

You will also probably want to delete that other attribute at some point
but that's easy enough though outside the scope of this.

Good luck.






Rudolf Thilo wrote:
> Hello.
> 
> At one eDir (nw6.5.6) almost all users were created using NWAdmin.
> As it doesn't offer access to "mail" attribute, the email address
> of the users was written to the attribute "comment".
> 
> I'm looking for a possiblity to 
> 
>  - search for user objects throughout the tree
>  - check, if there already is a email address in "mail"
>  - if not, check, if "comment" has a valid email address
>  - if that is fact, *WRITE* this one to "mail"
>  - next user
> 
> 
> I was wondering if I could do this through LDAP queries, but after searching
> quite a while I can only find some free ldap browsers, nothing how to batch
> LDAP actions.
> 
> Or may be there is some other approach a much better way do do this?
> 
> (maybe ICE, which I honestly have no expirience with, I just know it's there...)
> 
> 
> 
> Any suggestions appreciated,
> 
> 
> Regards, Rudi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGvOKt7eGRNwWOK9IRAk3mAJ4hbJ5mKj4L6IgXFlAxxa0m5CFTyQCgnoHR
5A6aTd2RwOvgJ+Q+A3bCWgA=
=J4YT
-----END PGP SIGNATURE-----
0
ab
8/10/2007 10:11:51 PM
Hello

thanks for your reply.

> let's pretend you had used
> description instead and that the only value you could have in
> description was this mail address:

Yes, it's description.

> ldapsearch

Hm. Where to get an ldapsearch.exe? All I can find are references to
cygwin...

> ldapsearch -h ipAddressGoesHere -p 389 -D
> cn=admin,dc=userAndContext,dc=goes,dc=here -x -ZZZ -W
> '(&(!(mail=*))(description=*))' description > ./outputFile.ldif

Let me try to understand:

the leading parameters are for some command line ldapsearch
executable...

 -h <ip> : is the ldap server
-p 389 : is the non secure ldap port. How to use ssl / sldap? just
change the port to 636?
cn .... is the user to authenticate to ldap server.
-x (no clue)
-ZZZ (no clue)
-W (no clue)

You use some LINUX, or you have an EXE file for Windows?

'(& () ..())' is to group search statements?

(!(mail=*))(description=*)) : I get this one, except the '*': '*' here
the "*" seems to be "attribute /HAS/ a value", not "none, one, or
multiple CHAR", right?

I used the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor for my
tests.

Modify is easy: just a option to be checked. (add only, update only,
add and update)

But how to use a LDIF file to *DELETE* the no more necessary value of
attribute "description"?


Thanks a lot for your help.


Regards, Rudi.

0
Rudolf
8/11/2007 11:51:04 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Very good analysis.  Adding to your own comments:

- -x:  Use simple authentication instead of SASL.
- -ZZ: Issue StartTLS (Transport Layer Security) extended operation. If
you use -ZZ, the command will require the operation to be successful.
  I may have been mis-using this.  Using an LDAP Browser that can
natively work on port 636 without specifying a cert file means you don't
have to worry about the -ZZ(Z) or the -x.
- -W: Prompt for a passsword (vs. putting it directly on the command line)

Using the LDAP Browser you are is great.  It's my favorite by far.
While you are correct in that I am using Linux (or at least some OS with
a command-line ldapsearch utility built in, which is about anything but
windows) you can get an ldapsearch utility as well via cygwin or, if you
have ConsoleOne, by adding the eDirectory snapins.  The ldap* utilities
will be in ConsoleOne\bin as .exe files.  The commmand-line parameters
differ somewhat from the ones I used by the vast majority are the same.

'(&(!(mail=*))(description=*))'

This is an interesting exercise in different notations.  Most people are
familiar with 'infix' notation (3 + 3) where the operator goes between
the operands.  Two alternatives are 'prefix' and 'postfix' which would
have the above command like, respectively, (+(3)(3)) or ((3)(3)+) but
all of which have the same meaning.  LDAP takes filters in prefix
notation so the filter above is saying that the two top-level conditions
(!(mail=*)) and (description=*) should both be true (&).  If the first
AND the second THEN return the object.

attribute=* means if it is present (not empty).  As you correctly
surmised it has nothing to do with how many are there or how long they
are or anything like that... just if they exist.  '!' means not.  So the
query says if description is present and mail is not present then return
the result.  Simple enough right?  After a few of those you get used to
it and it's really a very nice, concise way to get a lot of logic in one
shot.

Starting with the following:

dn: cn=test02,ou=testad0,o=suse,dc=org
description: test02mailaddressehere@suse.org

dn: cn=test03,ou=testad0,o=suse,dc=org
description: test03mailaddresshere@suse.org

The first thing I mentioned was search/replacing description for mail so
it adds that value to the 'mail' attribute.

dn: cn=test02,ou=testad0,o=suse,dc=org
mail: test02mailaddressehere@suse.org

dn: cn=test03,ou=testad0,o=suse,dc=org
mail: test03mailaddresshere@suse.org

A longer notation that will do all you want could be the following:

dn: cn=test02,ou=testad0,o=suse,dc=org
changetype: modify
add: mail
mail: test02mailaddressehere@suse.org
- -
delete: description
description: test02mailaddressehere@suse.org

dn: cn=test03,ou=testad0,o=suse,dc=org
changetype: modify
add: mail
mail: test03mailaddresshere@suse.org
- -
delete: description

The examples above are slightly different.  First we're telling LDAP
that we're doing modify operations (the changetype has to do with whole
objects... not attributes and we are modifying (not deleting, adding,
renaming, etc.) and object).

As a note all of that can be in the same LDIF.  The first says we're
going to modify the object specified in the 'dn' section.  It then tells
LDAP to add a mail attribute and gives it the value on the next line.
It then puts in a '-' on its own line (no spaces anywhere around it)
which says we'll continue with that object but with a different
operation.  The next two lines tell LDAP to delete a description
attribute and, because we give the value, which value to delete (in case
there are multiples).  This may be overkill for you if these are the
only descriptions on the objects.  In that case the second example is
the same but says to delete the description attribute's values... all of
them.

note that a blank line goes between different objects' operations
(test03, test02) while a hyphen goes between different sub-operations on
the same object. (attrA, attrB, etc.).

At this point it's just a matter of finding the correct regular
expression to do all of this at once so you don't have to work as hard.
 One example may be to replace 'description:' with 'changetype:
modify\nadd: mail\nmail:' which, if the '\n' characters were treated
properly, would get you very close to your destination.  The last change
would be to replace all of the blank lines with '-\ndelete:
description\n\n' so that the cleaning of the object would be done in the
same operation.  This particular change would require that the only
value in the description field be the one you want to delete as it will
delete them all.

Another option to get just the one value would be to modify the first
time as mentioned above to add the mail attribute.  Then start with the
same beginning LDIF output and modify it to delete that one value by
replacing 'description:' with 'changetype: modify\ndelete:
description\ndescription:' which, I'm sure you'll notice, is very
similar to the first expression used.  Anyway hopefully this gets you on
your way.  If you need recommendations on text editors that are up to
this task I have a few.  First, cygwin comes with 'vi'.  Secondly,
vi/vim for windows is available.  Thirdly I thoroughly-enjoy JEdit
(free, Java-based, works well and runs everywhere).

Good luck.






Rudolf Thilo wrote:
> Hello
> 
> thanks for your reply.
> 
>> let's pretend you had used
>> description instead and that the only value you could have in
>> description was this mail address:
> 
> Yes, it's description.
> 
>> ldapsearch
> 
> Hm. Where to get an ldapsearch.exe? All I can find are references to
> cygwin...
> 
>> ldapsearch -h ipAddressGoesHere -p 389 -D
>> cn=admin,dc=userAndContext,dc=goes,dc=here -x -ZZZ -W
>> '(&(!(mail=*))(description=*))' description > ./outputFile.ldif
> 
> Let me try to understand:
> 
> the leading parameters are for some command line ldapsearch
> executable...
> 
>  -h <ip> : is the ldap server
> -p 389 : is the non secure ldap port. How to use ssl / sldap? just
> change the port to 636?
> cn .... is the user to authenticate to ldap server.
> -x (no clue)
> -ZZZ (no clue)
> -W (no clue)
> 
> You use some LINUX, or you have an EXE file for Windows?
> 
> '(& () ..())' is to group search statements?
> 
> (!(mail=*))(description=*)) : I get this one, except the '*': '*' here
> the "*" seems to be "attribute /HAS/ a value", not "none, one, or
> multiple CHAR", right?
> 
> I used the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor for my
> tests.
> 
> Modify is easy: just a option to be checked. (add only, update only,
> add and update)
> 
> But how to use a LDIF file to *DELETE* the no more necessary value of
> attribute "description"?
> 
> 
> Thanks a lot for your help.
> 
> 
> Regards, Rudi.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGvmlJ7eGRNwWOK9IRAlhVAJ9wHdW2utcpDNAPOubQa5H6sup/qACcCujP
gM5OLZSiTADO1oVFx3+titc=
=5GcM
-----END PGP SIGNATURE-----
0
ab
8/12/2007 1:58:33 AM
Hello Rudolf,

I can offer you much more powerful approach. It is based on the open
source utility named OpenAdaptor(TM). You can freely download it from
http://www.openadaptor.org It is written entirely in Java and may be
used on any platform having JDK version 1.3.1 or later. I've 
successfully implemented the following OA's properties file
(desc2mail.props) to generate required ldif.
#================================================================================== 

#
#                     SET TAB SIZE TO 4
#
# Read LDAP server, write out ldif file. But filter the dataobjects
#
#
#
# Adaptor A:
# ==========
#
#     C1      ->     C2     ->    C3
#
# (LDAPSource)  (FilterPipe)  (FileSink)
#
#================================================================================== 


#
# This defines to component named C1 and C2
#
A.Component1.Name  	= C1
A.Component2.Name  	= C2
A.Component3.Name  	= C3


#
# This defines that C1 is connected to C2.
#
A.C1.LinkTo1	   	= C2
A.C2.LinkTo1	   	= C3



#------------------------------------------------------------------------------
# C1: LDAPSource - Runs a query against an LDAP directory and send the 
matching
# entries individually down the pipeline. The names of the fields in the
# dataobject will match those in the LDAP server, except that any ';'s 
will be
# replaced by '_'.
#
#------------------------------------------------------------------------------
# Directory:		URL of the LDAP server to connect to. Must be ldap://
# Username:		user DN to bind to the LDAP server
# Password:		password for the user DN
# SearchBase:		base from which to run the filter against the server.
#			This must be a valid tree in the LDAP server.
# Filter:		search filter to run against the ldap server
#			Defaults to objectclass=*
# SizeLimit:		max number of entries to return. 0=unlimited
# Scope:		subtree, onelevel or base. Defaults to subtree.
# MultivalueDelimiter:	string to use as a delimiter between multiple values
#                       for the same attribute. If null then only one 
value is
#                       returned per attribute.
# NumToSend:            Allows to batch the resulting LDAP entries into the
#                       adaptor message. Basically, you define how many 
of the
#                       search results you return in the message array.
#                       Subsequent polls will keep returning entries in this
#                       batch size until the resultset is exhausted and then
#                       the search is performed again. The final message may
#                       contain less entries if the batchsize does not 
divide
#                       exactly into the resultset count. If you set 
this to -1
#                       then ALL resulting entries are added to the 
message and
#                       a new search is performed every poll. Defaults to 1.
#			period. If -1 then all results are returned in that
#                       period. Defaults to 1.
# PollPeriod:		the number of milliseconds between each polling cycle.
#                       If not defined then the LDAP search is executed once
#                       and a single entity from the resulting array is 
passed
#                       every poll until there are no more. The NumToSend
#                       property is ignored. The adaptor then terminates.
#			If the PollPeriod is defined then the source goes into
#                       true polling mode with the search being repeated as
#                       necessary.
# DataObjectType:	resulting DO type. Defaults to QueryResult.
# Attributes:           The names of the attributes to return.  This 
should be
#                       a space delimited list of names that match those in
#                       the LDAP server exactly. For instance,
#                       "usercertificate cn" would not bring back attributes
#                       named "usercertificate;binary" or "cn;FR". To 
get all
#                       attributes specify "*". Binary attributes will be
#                       Base64 encoded.
#
A.C1.ClassName		= org.openadaptor.adaptor.ldap.LDAPSource
A.C1.Directory		= 127.0.0.1
A.C1.Username		= cn=dap,o=NW51
A.C1.Password		= novell_netware
A.C1.SearchBase		= ou=peoples,ou=dap_area,o=my51
A.C1.Filter		= (objectClass=inetOrgPerson)
#A.C1.Filter		= 
(&(objectClass=inetOrgPerson)(description=*@somecompany.com))
A.C1.SizeLimit		= 0
#A.C1.Scope			= subtree
A.C1.Scope			= onelevel
A.C1.MultivalueDelimiter	= null
A.C1.NumToSend			= -1
#A.C1.PollPeriod		= 10000
A.C1.DataObjectType		= User
A.C1.Attributes			= dn description mail



#------------------------------------------------------------------------------
# C2: FilterPipe - audit pipe, it is configured to only allow User objects
# where mail attribute is not set and description attribute ends with
# "@somecompany.com".
#------------------------------------------------------------------------------
#
A.C2.ClassName               = org.openadaptor.adaptor.standard.FilterPipe

# If true then filter all the dataobjects in the message array
# individually. If false then filter the entire array based on the first
# dataobject in the array. Defaults to true
A.C2.FilterEntireArray       = true

# If true and a failure occurs, i.e. a DataObject gets blocked by the 
Filter
# then and Exception will be thrown. Defaults to false
A.C2.ExceptionOnFailure      = false

# If ExceptionOnFailure is true then the Exception that is thrown will 
include
# this text
A.C2.ExceptionText           = A User object was blocked

# if the Type is not supplied then all DataObjects are filtered. If the
# AttName is not supplied then all DataObjects are passed. You can have
# multiple filters of the same type ( ie. pass or bock) defined. They are
# all "anded" together
A.C2.Filter1			= block
A.C2.Filter1.FilterEntireArray	= true
A.C2.Filter1.Type		= User
A.C2.Filter1.AttName1		= mail
A.C2.Filter1.AttValueIsSet1	= true

# filters of different types are "anded" together
A.C2.Filter2                 = pass
A.C2.Filter2.AttName1        = description
A.C2.Filter2.AttValueRegExp1 = [a-zA-Z ]*@somecompany.com



#------------------------------------------------------------------------------
# C3: FileSink - SimpleReportWriter produces LDIF file for further 
processing
#------------------------------------------------------------------------------
A.C3.ClassName = org.openadaptor.adaptor.standard.FileSink
A.C3.OutputFileName = desc2mail.ldif
## A.C3.MoveToFileName = desc2mail.ldif
## A.C3.MoveExistingOutputFile = false
## A.C3.CreateOutputFile = true
## A.C3.CreateOutputPath = true
A.C3.WriteMode = Overwrite
## A.C3.WriteMode = Append
## A.C3.RolloverSize = 1K
## A.C3.RolloverPeriod = 60M

A.C3.DOStringWriter = org.openadaptor.dostrings.SimpleReportWriter

# string that is prepended at the start of each message (ie. if you set 
BatchSize=0
# then the header will only be applied at the very start of the file)
#A.C3.Header1 = #This LDIF file was generated by OpenAdaptor(TM) v1.7.2.2

# string that is appended at the end of each message (ie. if you set 
BatchSize=0
# then the footer will only be applied at the very end of the file)
#A.C3.Footer1 =

# each row of the record is a string with attribute value substitution 
defined
# by "{}" attribute name placeholders. Note that the placeholders can 
include
# additional formatting
A.C3.Body1 = dn: {dn}
A.C3.Body2 = changetype: modify

A.C3.Body3 = replace: mail
A.C3.Body4 = mail: {description}\r\n-

A.C3.Body5 = delete: description

## A.C3.Body5 = replace: description
## A.C3.Body6 = description: moved by OpenAdaptor

# defines the char/string to use as a line seperator. defaults to a 
carriage return
#A.C3.LineSeperator = \n

I've successfully test ldap2email.props described above on my NetWare
6.5SP5 and Win2000SP4 Server running eDirectory 8.8SP1 and 8.7.3.9.
On Win2000 i use the following batch file (desc2mail.bat)to execute
OpenAdaptor:

@echo off
REM openadaptor example classpath creation script for Windows
REM and JDK jdk.1.4

set CLASSES_DIR=../classes

REM The release dir (in this case ..) is needed in the CLASSPATH for the
REM for the AFEditor to find help documentation.

set CLASSPATH=".;.."

set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/openadaptor.jar

set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/dom4j-1.5.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/jakarta-oro-2.0.8.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/jaxrpc.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/jdom.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/junit.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/log4j-1.2.9.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/regexp.jar
REM set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/saaj.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/xalan.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/xerces.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/xml-apis.jar
set CLASSPATH=%CLASSPATH%;%CLASSES_DIR%/xml4j.jar

rem echo %CLASSPATH%

java org.openadaptor.adaptor.RunAdaptor desc2mail.props A

Described configuration produces ldif file which will look like follows:

dn: cn=George_Burdell,ou=peoples,ou=dap_area,o=my51
changetype: modify
replace: mail
mail: George.Burdell@somecompany.com
-
delete: description

dn: cn=Fred_Jones,ou=peoples,ou=dap_area,o=my51
changetype: modify
replace: mail
mail: Fred.Jones@somecompany.com
-
delete: description

dn: cn=Nicole_Smith,ou=peoples,ou=dap_area,o=my51
changetype: modify
replace: mail
mail: Nicole.Smith@somecompany.com
-
delete: description

dn: cn=Kyle_Smith,ou=peoples,ou=dap_area,o=my51
changetype: modify
replace: mail
mail: Kyle.Smith@somecompany.com
-
delete: description

dn: cn=Scott_Smith,ou=peoples,ou=dap_area,o=my51
changetype: modify
replace: mail
mail: Scott.Smith@somecompany.com
-
delete: description

This file may be further processed with ICE utility:
ice -o -eerrors.ldif -SLDIF -f desc2mail.ldif -DLDAP -s127.0.0.1 -p389 
-dcn=dap,o=NW51 -wnovell_netware

To avoid ICE utility it is possible to configure OA's component C3 with 
LDAPSink instead of FileSink. Nevertheless i strongly reccommend you 
ldif approach because it will be possible to review or edit some objects 
before ICE execution.

Best Regards,
Andrey Karyagin

ABG Card Technology
Software Development Department
0
Andrey
8/12/2007 6:22:49 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

One-line wonder....

Do the query, parse and change the results, remove the extra
search/result lines, reimport.

You'll be prompted for the password twice (this should all be on one
line, btw, in case it gets munged to six lines in transit).  It may be a
good idea to just use the '-w' and then specify the password for the
alternative listed below this one (assuming password 'novell'):

ldapsearch -h 137.65.215.166 -p 389 -D cn=admin,dc=user,dc=system -x -W
'(&(!(mail=*))(description=*)(objectclass=inetorgperson))' description |
sed 's/description: \(.*\)/changetype: modify\nadd: mail\nmail:
\1\n-\ndelete: description\ndescription: \1/g' | sed
's/^search:.*\|^result:.*//g' | ldapmodify -h 137.65.215.166 -p 389 -D
cn=admin,dc=user,dc=system -x -W




ldapsearch -h 137.65.215.166 -p 389 -D cn=admin,dc=user,dc=system -x -w
novell '(&(!(mail=*))(description=*)(objectclass=inetorgperson))'
description | sed 's/description: \(.*\)/changetype: modify\nadd:
mail\nmail: \1\n-\ndelete: description\ndescription: \1/g' | sed
's/^search:.*\|^result:.*//g' | ldapmodify -h 137.65.215.166 -p 389 -D
cn=admin,dc=user,dc=system -x -w novell




Good luck.





ab@novell.com wrote:
> Very good analysis.  Adding to your own comments:
> 
> -x:  Use simple authentication instead of SASL.
> -ZZ: Issue StartTLS (Transport Layer Security) extended operation. If
> you use -ZZ, the command will require the operation to be successful.
>   I may have been mis-using this.  Using an LDAP Browser that can
> natively work on port 636 without specifying a cert file means you don't
> have to worry about the -ZZ(Z) or the -x.
> -W: Prompt for a passsword (vs. putting it directly on the command line)
> 
> Using the LDAP Browser you are is great.  It's my favorite by far.
> While you are correct in that I am using Linux (or at least some OS with
> a command-line ldapsearch utility built in, which is about anything but
> windows) you can get an ldapsearch utility as well via cygwin or, if you
> have ConsoleOne, by adding the eDirectory snapins.  The ldap* utilities
> will be in ConsoleOne\bin as .exe files.  The commmand-line parameters
> differ somewhat from the ones I used by the vast majority are the same.
> 
> '(&(!(mail=*))(description=*))'
> 
> This is an interesting exercise in different notations.  Most people are
> familiar with 'infix' notation (3 + 3) where the operator goes between
> the operands.  Two alternatives are 'prefix' and 'postfix' which would
> have the above command like, respectively, (+(3)(3)) or ((3)(3)+) but
> all of which have the same meaning.  LDAP takes filters in prefix
> notation so the filter above is saying that the two top-level conditions
> (!(mail=*)) and (description=*) should both be true (&).  If the first
> AND the second THEN return the object.
> 
> attribute=* means if it is present (not empty).  As you correctly
> surmised it has nothing to do with how many are there or how long they
> are or anything like that... just if they exist.  '!' means not.  So the
> query says if description is present and mail is not present then return
> the result.  Simple enough right?  After a few of those you get used to
> it and it's really a very nice, concise way to get a lot of logic in one
> shot.
> 
> Starting with the following:
> 
> dn: cn=test02,ou=testad0,o=suse,dc=org
> description: test02mailaddressehere@suse.org
> 
> dn: cn=test03,ou=testad0,o=suse,dc=org
> description: test03mailaddresshere@suse.org
> 
> The first thing I mentioned was search/replacing description for mail so
> it adds that value to the 'mail' attribute.
> 
> dn: cn=test02,ou=testad0,o=suse,dc=org
> mail: test02mailaddressehere@suse.org
> 
> dn: cn=test03,ou=testad0,o=suse,dc=org
> mail: test03mailaddresshere@suse.org
> 
> A longer notation that will do all you want could be the following:
> 
> dn: cn=test02,ou=testad0,o=suse,dc=org
> changetype: modify
> add: mail
> mail: test02mailaddressehere@suse.org
> -
> delete: description
> description: test02mailaddressehere@suse.org
> 
> dn: cn=test03,ou=testad0,o=suse,dc=org
> changetype: modify
> add: mail
> mail: test03mailaddresshere@suse.org
> -
> delete: description
> 
> The examples above are slightly different.  First we're telling LDAP
> that we're doing modify operations (the changetype has to do with whole
> objects... not attributes and we are modifying (not deleting, adding,
> renaming, etc.) and object).
> 
> As a note all of that can be in the same LDIF.  The first says we're
> going to modify the object specified in the 'dn' section.  It then tells
> LDAP to add a mail attribute and gives it the value on the next line.
> It then puts in a '-' on its own line (no spaces anywhere around it)
> which says we'll continue with that object but with a different
> operation.  The next two lines tell LDAP to delete a description
> attribute and, because we give the value, which value to delete (in case
> there are multiples).  This may be overkill for you if these are the
> only descriptions on the objects.  In that case the second example is
> the same but says to delete the description attribute's values... all of
> them.
> 
> note that a blank line goes between different objects' operations
> (test03, test02) while a hyphen goes between different sub-operations on
> the same object. (attrA, attrB, etc.).
> 
> At this point it's just a matter of finding the correct regular
> expression to do all of this at once so you don't have to work as hard.
>  One example may be to replace 'description:' with 'changetype:
> modify\nadd: mail\nmail:' which, if the '\n' characters were treated
> properly, would get you very close to your destination.  The last change
> would be to replace all of the blank lines with '-\ndelete:
> description\n\n' so that the cleaning of the object would be done in the
> same operation.  This particular change would require that the only
> value in the description field be the one you want to delete as it will
> delete them all.
> 
> Another option to get just the one value would be to modify the first
> time as mentioned above to add the mail attribute.  Then start with the
> same beginning LDIF output and modify it to delete that one value by
> replacing 'description:' with 'changetype: modify\ndelete:
> description\ndescription:' which, I'm sure you'll notice, is very
> similar to the first expression used.  Anyway hopefully this gets you on
> your way.  If you need recommendations on text editors that are up to
> this task I have a few.  First, cygwin comes with 'vi'.  Secondly,
> vi/vim for windows is available.  Thirdly I thoroughly-enjoy JEdit
> (free, Java-based, works well and runs everywhere).
> 
> Good luck.
> 
> 
> 
> 
> 
> 
> Rudolf Thilo wrote:
>> Hello
> 
>> thanks for your reply.
> 
>>> let's pretend you had used
>>> description instead and that the only value you could have in
>>> description was this mail address:
>> Yes, it's description.
> 
>>> ldapsearch
>> Hm. Where to get an ldapsearch.exe? All I can find are references to
>> cygwin...
> 
>>> ldapsearch -h ipAddressGoesHere -p 389 -D
>>> cn=admin,dc=userAndContext,dc=goes,dc=here -x -ZZZ -W
>>> '(&(!(mail=*))(description=*))' description > ./outputFile.ldif
>> Let me try to understand:
> 
>> the leading parameters are for some command line ldapsearch
>> executable...
> 
>>  -h <ip> : is the ldap server
>> -p 389 : is the non secure ldap port. How to use ssl / sldap? just
>> change the port to 636?
>> cn .... is the user to authenticate to ldap server.
>> -x (no clue)
>> -ZZZ (no clue)
>> -W (no clue)
> 
>> You use some LINUX, or you have an EXE file for Windows?
> 
>> '(& () ..())' is to group search statements?
> 
>> (!(mail=*))(description=*)) : I get this one, except the '*': '*' here
>> the "*" seems to be "attribute /HAS/ a value", not "none, one, or
>> multiple CHAR", right?
> 
>> I used the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor for my
>> tests.
> 
>> Modify is easy: just a option to be checked. (add only, update only,
>> add and update)
> 
>> But how to use a LDIF file to *DELETE* the no more necessary value of
>> attribute "description"?
> 
> 
>> Thanks a lot for your help.
> 
> 
>> Regards, Rudi.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGv9rs7eGRNwWOK9IRAoBMAJ9dXd7KPuyOHJE7JmKJXq6bQ42elQCcCarL
L2H2IIInm6t/1uIxDbk1yfY=
=kxSC
-----END PGP SIGNATURE-----
0
ab
8/13/2007 4:15:47 AM
Hello,

thanks to both of you, I should get it going now ;-)


Regards, Rudi.
0
Rudolf
8/14/2007 4:58:52 PM
Hello.


Using the ldap query you told me is working fine with the
the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor.

Search: 

Search DN: ou=av, o=goepfert
Filter: (&(objectclass=user)(description=*)(!(mail=*)))
Attributes: description

the search result in the GUI interface look fine, showing normal
email addresses for the attribute description.

But when exporting the same search, the exported values look very strange ... :

dn: cn=pd,ou=av, o=Goepfert
description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=

.... but seem to be some special coding, as when I delete attribute "description"
and run a LDIF *IMPORT*, the old value (a valid email address) correctly *DOES* 
show up again in the user object.

When placing a "mail:: " in front of that 40 character sting, and I do then
an import, nothing happens (number of processed entries is not displayed, so
was 0)

Using C1 ICE I get for the same user the same string:

dn: cn=pd,ou=av,o=Goepfert
changetype: add
description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=


What type of encoding is this? How to convert to the clear text email stored
in "description"?


Tried with same results using different ws: Win2000SP4, WinXPsp2, W2k3R2.

BTW: what is the correct DER file for ICE? sys:public/rootcert.der seems not to work...


Any suggestions appreciated, Rudi.
0
Rudolf
8/17/2007 6:10:27 PM
They are Base64 encoded. With a decoder you can convert.

Don

Rudolf Thilo wrote:
> Hello.
> 
> 
> Using the ldap query you told me is working fine with the
> the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor.
> 
> Search: 
> 
> Search DN: ou=av, o=goepfert
> Filter: (&(objectclass=user)(description=*)(!(mail=*)))
> Attributes: description
> 
> the search result in the GUI interface look fine, showing normal
> email addresses for the attribute description.
> 
> But when exporting the same search, the exported values look very strange ... :
> 
> dn: cn=pd,ou=av, o=Goepfert
> description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=
> 
> ... but seem to be some special coding, as when I delete attribute "description"
> and run a LDIF *IMPORT*, the old value (a valid email address) correctly *DOES* 
> show up again in the user object.
> 
> When placing a "mail:: " in front of that 40 character sting, and I do then
> an import, nothing happens (number of processed entries is not displayed, so
> was 0)
> 
> Using C1 ICE I get for the same user the same string:
> 
> dn: cn=pd,ou=av,o=Goepfert
> changetype: add
> description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=
> 
> 
> What type of encoding is this? How to convert to the clear text email stored
> in "description"?
> 
> 
> Tried with same results using different ws: Win2000SP4, WinXPsp2, W2k3R2.
> 
> BTW: what is the correct DER file for ICE? sys:public/rootcert.der seems not to work...
> 
> 
> Any suggestions appreciated, Rudi.

-- 
D.Lohr
Technical Services
James Madison University

++ Bad command or file name  ++
0
D
8/17/2007 6:20:42 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The encoding is base64.  You can decode it with any base64 decoder.

If you do your re-create with mail:: it should work properly.  Are they
all being exported with the encoding?  This isn't what I saw on my
description attribute but I guess ICE could be forcing it.  I only have
values exporting with base64 encoding when they have non-ascii
characters in them which isn't normal for my tree (though I have one).
Doing what you said changing mail: to mail:: allowed it to import
properly.  The first time I tried because there was already something in
'mail' and apparently it's single-valued.

What error are you getting?  Do you have any non-base-ascii characters
in the descriptions?

Good luck.





Rudolf Thilo wrote:
> Hello.
> 
> 
> Using the ldap query you told me is working fine with the
> the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor.
> 
> Search: 
> 
> Search DN: ou=av, o=goepfert
> Filter: (&(objectclass=user)(description=*)(!(mail=*)))
> Attributes: description
> 
> the search result in the GUI interface look fine, showing normal
> email addresses for the attribute description.
> 
> But when exporting the same search, the exported values look very strange ... :
> 
> dn: cn=pd,ou=av, o=Goepfert
> description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=
> 
> ... but seem to be some special coding, as when I delete attribute "description"
> and run a LDIF *IMPORT*, the old value (a valid email address) correctly *DOES* 
> show up again in the user object.
> 
> When placing a "mail:: " in front of that 40 character sting, and I do then
> an import, nothing happens (number of processed entries is not displayed, so
> was 0)
> 
> Using C1 ICE I get for the same user the same string:
> 
> dn: cn=pd,ou=av,o=Goepfert
> changetype: add
> description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=
> 
> 
> What type of encoding is this? How to convert to the clear text email stored
> in "description"?
> 
> 
> Tried with same results using different ws: Win2000SP4, WinXPsp2, W2k3R2.
> 
> BTW: what is the correct DER file for ICE? sys:public/rootcert.der seems not to work...
> 
> 
> Any suggestions appreciated, Rudi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGxejH7eGRNwWOK9IRAhpVAKCjtG//ruDwKIT9Y6kNyodAPgPtwwCggwZI
kIBX1QpnDA/0HcY0qt3D0VA=
=zd6e
-----END PGP SIGNATURE-----
0
ab
8/17/2007 6:28:00 PM
On Fri, 17 Aug 2007 18:10:27 +0000, Rudolf Thilo wrote:

> Hello.
> 
> 
> Using the ldap query you told me is working fine with the the GUI LDAP
> Browser / Editor 2.8.2 by  Jarek Gawor.
> 
> Search:
> 
> Search DN: ou=av, o=goepfert
> Filter: (&(objectclass=user)(description=*)(!(mail=*))) Attributes:
> description
> 
> the search result in the GUI interface look fine, showing normal email
> addresses for the attribute description.
> 
> But when exporting the same search, the exported values look very
> strange ... :
> 
> dn: cn=pd,ou=av, o=Goepfert
> description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=
> 
> ... but seem to be some special coding, as when I delete attribute
> "description" and run a LDIF *IMPORT*, the old value (a valid email
> address) correctly *DOES* show up again in the user object.
> 
> When placing a "mail:: " in front of that 40 character sting, and I do
> then an import, nothing happens (number of processed entries is not
> displayed, so was 0)
> 
> Using C1 ICE I get for the same user the same string:
> 
> dn: cn=pd,ou=av,o=Goepfert
> changetype: add
> description:: cC5kb2VyckBnb2VwZmVydC5kZQ0KDQoNCg0KDQo=
> 
> 
> What type of encoding is this? How to convert to the clear text email
> stored in "description"?
> 
> 
> Tried with same results using different ws: Win2000SP4, WinXPsp2,
> W2k3R2.
> 
> BTW: what is the correct DER file for ICE? sys:public/rootcert.der seems
> not to work...
> 
> 
> Any suggestions appreciated, Rudi.

Using the ICE command line, you can pass a parameter (-b, I think, but 
check the help) to tell it to not Base64 encode the data.

Jim



-- 
 Jim Henderson, CNA6, CDE, CNI, LPIC-1
 Novell Training Services
0
Jim
8/17/2007 7:11:37 PM
ab@novell.com wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> The encoding is base64. 

"nice" $$(=/)($=/%"

> You can decode it with any base64 decoder.

This "any base64 decoder" would need to be a command line tool, then I
easyly could write a script

 - reading LDIF export file
 - base64 decode the description attribute's content
 - write a LDIF import file with this value for attribute mail.


> Are they
> all being exported with the encoding?  

No. some of the users are exported clear text, funny.
These lines start with "description: " in stead of "description:: "

> This isn't what I saw on my
> description attribute but I guess ICE could be forcing it.  

The GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor is doing exactly the same.


> I only have
> values exporting with base64 encoding when they have non-ascii
> characters in them which isn't normal for my tree (though I have one).

Hm. valid email addresses should *ONLY* include ASCII chars, isn't it?

> Doing what you said changing mail: to mail:: 

Ah, ":" is clear text, "::" is base64.

> allowed it to import
> properly.  The first time I tried because there was already something in
> 'mail' and apparently it's single-valued.

No. Just tried it: In consoleOne you *CAN* add multiple email addresses,
and the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor is exporting all
of them, one address per line, clear text:

dn: cn=testedv1, ou=edv, o=company
mail: testedv-dummy@company.de
mail: Dummy-2nd-email@company.de
mail: 2rd-foobar@company.de

> What error are you getting?

No error, just that base64 is exported.

>  Do you have any non-base-ascii characters
> in the descriptions?

I honestly can't find any: it's just email addresses.


Do you have some base64 command line tool? I found one, Sophos Antivirus
catches it as virus "MAL/Packer".

I've sent it to samples at sophos dot com to check, if it's a false positive.




Regards, Rudi.

-- 
IT-Beratung Rudolf Thilo
Schweinfurter Str. 131
97464 Niederwerrn
t: +49 (0)9721/6464840
f: +49 (0)9721/6464841
m: +49(0)171/685 9 685
0
Rudolf
8/17/2007 7:22:56 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Good point... I had my attributes (and eyes) crossed.

If I knew of a command-line decoder that would be great, but
unfortunately I've never done it that way.  It's strange you cannot
import once you export.  Would you mind sending me the encoded stuff so
I can try?  Also you're not seeing any errors in C1 which makes
troubleshooting a mite difficult.  How about iManager;
Mobile/Workstation iManager if nothing else may be useful.  As Jim
mentions I think you can suppress the encoding though I've never done
it.  If that helps then it's very strange IMO.

Yes, single-colon means text, double means something encoded.

Looks like there is a CoolSolution on this even:

http://www.novell.com/coolsolutions/toools/19460.html

I'm not sure if it will work as we want it to where we're just decoding
a part of the file.

Any chance you can install cygwin on your windows box to use some native
LDAP tools?  Maybe even do the same with the ConsoleOne eDirectory snapins?

Good luck.




Rudolf Thilo wrote:
> ab@novell.com wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> The encoding is base64. 
> 
> "nice" $$(=/)($=/%"
> 
>> You can decode it with any base64 decoder.
> 
> This "any base64 decoder" would need to be a command line tool, then I
> easyly could write a script
> 
>  - reading LDIF export file
>  - base64 decode the description attribute's content
>  - write a LDIF import file with this value for attribute mail.
> 
> 
>> Are they
>> all being exported with the encoding?  
> 
> No. some of the users are exported clear text, funny.
> These lines start with "description: " in stead of "description:: "
> 
>> This isn't what I saw on my
>> description attribute but I guess ICE could be forcing it.  
> 
> The GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor is doing exactly the same.
> 
> 
>> I only have
>> values exporting with base64 encoding when they have non-ascii
>> characters in them which isn't normal for my tree (though I have one).
> 
> Hm. valid email addresses should *ONLY* include ASCII chars, isn't it?
> 
>> Doing what you said changing mail: to mail:: 
> 
> Ah, ":" is clear text, "::" is base64.
> 
>> allowed it to import
>> properly.  The first time I tried because there was already something in
>> 'mail' and apparently it's single-valued.
> 
> No. Just tried it: In consoleOne you *CAN* add multiple email addresses,
> and the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor is exporting all
> of them, one address per line, clear text:
> 
> dn: cn=testedv1, ou=edv, o=company
> mail: testedv-dummy@company.de
> mail: Dummy-2nd-email@company.de
> mail: 2rd-foobar@company.de
> 
>> What error are you getting?
> 
> No error, just that base64 is exported.
> 
>>  Do you have any non-base-ascii characters
>> in the descriptions?
> 
> I honestly can't find any: it's just email addresses.
> 
> 
> Do you have some base64 command line tool? I found one, Sophos Antivirus
> catches it as virus "MAL/Packer".
> 
> I've sent it to samples at sophos dot com to check, if it's a false positive.
> 
> 
> 
> 
> Regards, Rudi.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGxf937eGRNwWOK9IRAvm7AJ0UGXIZxNj7mlttdCLrsUAH9sYg7gCeIWwD
ez8XZMYAtui0Y/kJTyqXQH0=
=tLft
-----END PGP SIGNATURE-----
0
ab
8/17/2007 8:04:47 PM
Hello Jim,

thanks for your reply.

With the ICE.EXE I wasn't happy at all, personally I prefered to use
the GUI LDAP Browser / Editor 2.8.2 by  Jarek Gawor.

BTW: Also the Username is Base64 exported encoded if it contains non ASCII
character. (Like ä, ö, ü).

I used the Base 64 Deconder "b64dec.exe", http://www.4mhz.de/b64dec.html.
It's GUI, but also command line capable, so it was easy to use it with
file spooling.

The Coolsolutions tool http://www.novell.com/coolsolutions/tools/19460.html
gave me *WRONG* (!) results for those Base64 encoded values with Umlaut Characters
in them: äöü,ÄÖÜ, also I failed to use it with commandline options. It not only
scans the clipboard every 2 seconds, if this is activated, it also CLEARS it every
2 seconds.



So the email addresses are where they shall be right now. Thanks to all of you for
your help.

Kicking out the email addresses from attribute "description" will be a different
task in September ;-)



Regards, Rudi.


-- 
IT-Beratung Rudolf Thilo
Schweinfurter Str. 131
97464 Niederwerrn
t: +49 (0)9721/6464840
f: +49 (0)9721/6464841
m: +49(0)171/685 9 685
0
Rudolf
8/18/2007 6:35:24 AM
Reply:

Similar Artilces:

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

"SSL" "Mail" and "Code"
Does anybody know of any discussions taking place within Mozilla regarding these 3 bits in the certificate manager? Perhaps I've missed something in the discussions here. In any case, I think a new mechanism for indicating trust w/in the Mozilla apps are needed. Take for example the "StartCom Certification Authority" root. The Certificate Manager (I'm using Firefox on Windows) says it can identify web sites, email users, and code yet the cert itself says it can only be used for signing other certs (essentially, that is). At a minimum this is confusing but I have...

"Attribute" vs. "Property"
I just want to verify that I properly understand the use of these two terms in Perl 6. * An "attribute" is a data member of a class. * A "property" is a piece of metadata on a...uh...thing -- e.g., on an attribute, on a class, or on a method. Do I have it right? For some reason, I've always referred to class data members as "properties", and thought of metadata on such things as "attributes" -- the reverse of the above. This despite the use of "attribute" in the above usage in Damian's book. So do I just need to t...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

superreview requested: [Bug 224215] Edit Attribute says "Enter the attribute name" instead of "Enter the attribute value" : [Attachment 134494] fix
timeless@myrealbox.com <timeless@bemail.org> has asked Heikki Toivonen <hjtoi-bugzilla@comcast.net> for superreview: Bug 224215: Edit Attribute says "Enter the attribute name" instead of "Enter the attribute value" http://bugzilla.mozilla.org/show_bug.cgi?id=224215 Attachment 134494: fix http://bugzilla.mozilla.org/attachment.cgi?id=134494&action=edit ...

superreview granted: [Bug 224215] Edit Attribute says "Enter the attribute name" instead of "Enter the attribute value" : [Attachment 134494] fix
Heikki Toivonen <hjtoi-bugzilla@comcast.net> has granted timeless@myrealbox.com <timeless@bemail.org>'s request for superreview: Bug 224215: Edit Attribute says "Enter the attribute name" instead of "Enter the attribute value" http://bugzilla.mozilla.org/show_bug.cgi?id=224215 Attachment 134494: fix http://bugzilla.mozilla.org/attachment.cgi?id=134494&action=edit ...

Get "Mail"/"Get "News" / "Write"/"Post" buttons?
If the "Get Mail" button text changed to "Get News", and "Write" changed to "Post" when TB's in the news-reading mode, it would save me and probably others from constantly forgetting to make the change before proceeding. :-) Or is there an extension to do this which I don't know about? Thanks! Bob Bob P wrote: > If the "Get Mail" button text changed to "Get News", and "Write" > changed to "Post" when TB's in the news-reading mode, it would save me > and probably others...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

value of attribute "ID" invalid: "_" cannot start a name
Can somebody throw a bone to someone who up until recently has just done the artsy side of things. I just want to make things more w3 friendly if not full compliant on a 2.1.2 install. Could someone point me in the direction of of fixing how all this _blah stuff is called? I'm sure others have had this dilemma. Thanks for any help... cheers!...

"-" not "_"
I wrote a SQL statement in the data tab. I wrote a bunch of alaises as example ' word-type ' but when I hit the layout tab it converts the "-" to "_". So now my field name is ' word_type '. Is there any way to prevent this? CardGunner Don' use a hypen ( - ).  It isn't a valid character for column names.   See http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1188931,00.html   Here's an excerpt about column names: Letters as defined in the Unicode Standard 2.0 Decimal numbers from either B...

"To" and "From" missing
When I print emails, the words "To" and "From" are blank, even though the "To" name and "From name (addresser, addressee) do show up. This is not a problem for other users on my system. Suggestions In mailbox right click, view. On the message window, right click and choose print options. Make sure print header is checked. -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** > In mailbox right click, view. On the message window, right click and > choose print options. Make sure prin...

replace the "." with a ","
Oi.... I need to build a small programm in ASP.NET and chose to use C# for it.Now i got everything working but there's one little problem.the first textbox is a double. I need to make it so that when someone enters a "." then it gets replaced by a ","any ideas?Ghan  string blah = "4.2.2.2";blah = blah.Replace(".", ",");Ryan Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

"Using" or "With"
Hi all Please can someone enlighten to me as regards the difference with the "Using" and "With" statement when accessing data - which is better, what are the limitations and/or any pointers. Many thanks. Regards DaveDavid WinchesterPlease mark as answer if this is the solution.  using gives you the ability to use the connection and it closes the connection directlly after you finish using it. and there is no need to try- cach - finaly. there is no limitation on using USING keywordMuhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I have a dataobject the re...

Web resources about - howto: Copy value of attribute "comment" to attribute "mail" - novell.edirectory.netware

Resources last updated: 11/23/2015 4:48:24 AM