Sponsored Content
Top Forums UNIX for Beginners Questions & Answers ERROR: ldapmodify: wrong attributeType at line 6, entry "olcDatabase={0}hdb,cn=config" Post 303040550 by Bibhusisa on Thursday 31st of October 2019 11:20:37 AM
Old 10-31-2019
ERROR: ldapmodify: wrong attributeType at line 6, entry "olcDatabase={0}hdb,cn=config"

Moderator's Comments:
Mod Comment please use code tags, thanks

Initially olcDatabase={2}config.ldif file was in non-prod and it does not have any entries of database and password as well that is why I was getting error as “ldap_bind: Invalid credentials (49)”¯ , I was comparing with my production olcDatabase={2}config.ldif file then I got to know that many entries are not present in my non prod olcDatabase={2}config.ldif, so trying to modify the same based on production entries but I am getting an error as “ldapmodify: wrong attributeType at line 6, entry "olcDatabase={2}hdb,cn=config"”¯ .Please find all the entry detail as mentioned below. Please suggest

Initially NON-Prod olcDatabase={2}config.ldif
***************************************

Code:
[root@******B cn=config]# cat olcDatabase={2}config.ldif
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 6cc08c20
dn: olcDatabase={2}config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
structuralObjectClass: olcDatabaseConfig
entryUUID: 7d38f93a-8a93-1039-8a5b-e71f3acefefd
creatorsName: cn=config
createTimestamp: 20191024101921Z
olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=extern
al,cn=auth" manage by dn.base="cn=Manager,dc=np,dc=bigdata,dc=eqh" manage b
y * none
olcRootPW:: e1NTSEF9dGVSTlBBOGp4Y3hBUEFyV0FhVk5JYmgwN04zM3gwV1Q=
entryCSN: 20191029071513.693484Z#000000#000#000000
modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
modifyTimestamp: 20191029071513Z

PROD Entries of olcDatabase={2}config.ldif
*************************************
Code:
[root@********A cn=config]# cat olcDatabase={2}hdb.ldif
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
# CRC32 69367fd5
dn: olcDatabase={2}hdb
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {2}hdb
olcDbDirectory: /var/lib/ldap
olcDbIndex: objectClass eq,pres
olcDbIndex: ou,cn,mail,surname,givenname eq,pres,sub
structuralObjectClass: olcHdbConfig
entryUUID: a18c51e2-721a-1039-90fa-db25c3c74803
creatorsName: cn=config
createTimestamp: 20190923065345Z
olcSuffix: dc=bigdata,dc=eqh
olcRootDN: cn=Manager,dc=bigdata,dc=eqh
olcRootPW:: e1NTSEF9RmZJZ3I0czZ1SHc5QmNlQXpnNS9EaHF2Yms0aDd0d3E=
olcAccess: {0}to dn.base="" by * read
olcAccess: {1}to dn.base="cn=Subschema" by * read
olcAccess: {2}to attrs=userPassword,userPKCS12 by self write by * auth
olcAccess: {3}to attrs=shadowLastChange by self write by * read
olcAccess: {4}to dn.subtree="ou=Kerberos,dc=bigdata,dc=eqh" by dn.exact="cn= kdc-service,ou=Services,dc=bigdata,dc=eqh" read by dn.exact="cn=adm-service,ou=Services,dc=bigdata,dc=eqh" write by * none
olcAccess: {5}to dn.subtree="ou=Users,dc=bigdata,dc=eqh" by dn.exact="cn=kdc-service,ou=Services,dc=bigdata,dc=eqh" read by dn.exact="cn=adm-service,ou=Services,dc=bigdata,dc=eqh" write by * read
olcAccess: {6}to * by * write
olcDbConfig: {0}set_cachesize 0 10485760 0
olcDbConfig: {1}set_lg_regionmax 262144
olcDbConfig: {2}set_lg_bsize 2097512
olcDbConfig: {3}set_flags DB_LOG_AUTOREMOVE
entryCSN: 20190924125413.148008Z#000000#000#000000
modifiersName: cn=Manager,dc=bigdata,dc=eqh
modifyTimestamp: 20190924125413Z

trying to modify NON-Prod entries of olcDatabase={2}hdb.ldif
****************************************************
Code:
cat <<EOF > olcDatabase={2}hdb.ldif
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: objectClass
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
add: olcdatabase
olcDatabase: {2}hdb
add: olcDbDirectory
olcDbDirectory: /var/lib/ldap
add: olcDbIndex
olcDbIndex: objectclass eq,pres
olcDbIndex: ou,cn,mail,surname,givenname eq,pres,sub
replace: olcSuffix
olcSuffix: dc=np,dc=bigdata,dc=eqh
replace: olcRootDN
olcRootDN: cn=Manager,dc=np,dc=bigdata,dc=eqh
add: olcRootPW
olcRootPW: {SSHA}hdkz5LTdlU0QYfuAIdIxlvaoswiVJanY
add: olcAccess
olcAccess: {0}to dn.base="" by * read
olcAccess: {1}to dn.base="cn=Subschema" by * read
olcAccess: {2}to attrs=userPassword,userPKCS12 by self write by * auth
olcAccess: {3}to attrs=shadowLastChange by self write by * read
olcAccess: {4}to dn.subtree="ou=Kerberos,dc=bigdata,dc=eqh" by dn.exact="cn=kdc-service,ou=Services,dc=np,dc=bigdata,dc=eqh" read by dn.exact="cn=adm-service,ou=Services,dc=bigdata,dc=eqh" write by * none
olcAccess: {5}to dn.subtree="ou=Users,dc=bigdata,dc=eqh" by dn.exact="cn=kdc-service,ou=Services,dc=np,dc=bigdata,dc=eqh" read by dn.exact="cn=adm-service,ou=Services,dc=bigdata,dc=eqh" write by * read
olcAccess: {6}to * by * write
add: olcDbConfig
olcDbConfig: {0}set_cachesize 0 10485760 0
olcDbConfig: {1}set_lg_regionmax 262144
olcDbConfig: {2}set_lg_bsize 2097512
olcDbConfig: {4}set_flags DB_LOG_AUTOREMOVE
EOF

Getting Below error while running ldapmodify
*************************************************************
Code:
[root@*******B openldap]# sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f olcDatabase={2}hdb.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapmodify: wrong attributeType at line 6, entry "olcDatabase={0}hdb,cn=config"


Last edited by jim mcnamara; 10-31-2019 at 08:19 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. Shell Programming and Scripting

"syntax error at line 21 :'done' unexpected." error message"

I am trying to run the script bellow but its given me "syntax error at line 20 :'done' unexpected." error message" can someone check to see if the script is ok? and correct me pls. Today is my first day with scripting. Gurus should pls help out #!/bin/ksh # Purpose: Check to see if file... (3 Replies)
Discussion started by: ibroxy
3 Replies

3. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Find lines with "A" then change "E" to "X" same line

I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies

6. Shell Programming and Scripting

Move a line containg "char" above line containing "xchar"

Okay, so I have a rather large text file and will have to process many more and this will save me hours of work. I'm not very good at scripting, so bear with me please. Working on Linux RHEL I've been able to filter and edit and clean up using sed, but I have a problem with moving lines. ... (9 Replies)
Discussion started by: rex007can
9 Replies

7. Solaris

Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

I am following the "Compilling and Installing" guide from Apache > HTTP Server > Documentation > Version 2.4 page The configure running OK: # export CC="gcc -m64" # ./configure \ --prefix=/usr/local/apache2/httpd-2.4.20 \ --with-port=80 \ --with-mpm=worker \ --enable-mods-shared=most \... (0 Replies)
Discussion started by: jhuang
0 Replies

8. Shell Programming and Scripting

How to replace multiple "&nbsp;" entry with in <td> tag into single entry using sed?

I have the input file like this. Input file: 12.txt 1) There are one or more than one <tr> tags in same line. 2) Some tr tags may have one <td> or more tna one <td> tags within it. 3) Few <td> tags having "<td> &nbsp; </td>". Few having more than one "&nbsp;" entry in it. <tr> some td... (4 Replies)
Discussion started by: thomasraj87
4 Replies

9. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

10. Shell Programming and Scripting

Failure: if grep "$Var" "$line" inside while read line loop

Hi everybody, I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o My code: #!/bin/sh set -e set -u export IFS= optl="Optl" LOCSTORCLI="/opt/lsi/storcli/storcli" ($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
All times are GMT -4. The time now is 07:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy