LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 02-19-2020, 09:29 AM   #1
kovvuri
LQ Newbie
 
Registered: Feb 2020
Posts: 1

Rep: Reputation: Disabled
Need to create a new Attribute in OpenLDAP and map it with existing attribute


HI,

Can someone please help me to create a new attribute (UserAccountControl) in openldap. And map this with already existing attribute (STATUS).

Existing format

dn: uid=xxxxxx,ou=People,ou=Branch,o=root
loginShell: /bin/bash
employeeNumber: xxxxxxx
gidNumber: xxxxxx
uid: xxxxxx
uidNumber: xxxxxx
homeDirectory: /home/xxxxx
sn: xxxxxx
status: ACTIVE
mail: xxxxxxxxxxxxxx
ntUserDomainId:xxxxxx
givenName: xxxxxxxxx
objectClass: top
objectClass: person
objectClass: nsnPerson
objectClass: posixAccount
objectClass: inetOrgPerson
gecos: xxxxxxxxxxxxxx
employeeType: E
cn: xxxxxxxxxx
displayName: xxxxxxxxxxxx

-----------------------
Required format

dn: uid=xxxxxx,ou=People,ou=Branch,o=root
loginShell: /bin/bash
employeeNumber: xxxxxxx
gidNumber: xxxxxx
uid: xxxxxx
uidNumber: xxxxxx
homeDirectory: /home/xxxxx
sn: xxxxxx
status: ACTIVE
mail: xxxxxxxxxxxxxx
ntUserDomainId:xxxxxx
givenName: xxxxxxxxx
objectClass: top
objectClass: person
objectClass: nsnPerson
objectClass: posixAccount
objectClass: inetOrgPerson
gecos: xxxxxxxxxxxxxx
employeeType: E
cn: xxxxxxxxxx
displayName: xxxxxxxxxxxx
UserAccountControl: (This value should be same as status attribute)

Thanks in advance

Br
Kovvuri
 
Old 02-19-2020, 12:43 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Hi,

You can use ldapmodify in order to add the attribute/value you want. Just make sure that the attribute exists in a schema from those loaded at openldap start.

For example create a ldif file like this:
Code:
dn: uid=xxxxxx,ou=People,ou=Branch,o=root
changetype: modify
add: UserAccountControl
UserAccountControl: ACTIVE
and use ldapmodify to import it in the ldap server

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL 6 - Why makedbbm for NIS Server does not create <map>.dir and <map>.pag adeathd Linux - Networking 1 09-17-2015 10:36 AM
Unable to create Map in MOVE. Is it necessary to install SUMO to create Map in MOVE?? dalalami21 Linux - Software 3 02-01-2013 11:04 AM
update problem "Attribute error object has no attribute 'rsplit' ruse Linux - Newbie 0 08-28-2009 01:46 AM
nss_ldap, openldap and openldap-server ... what is openldap for? chakkerz Linux - Server 2 08-13-2009 07:16 PM
ldap_add: Undefined attribute type (17) additional info: ojectclass: attribute type vinaytp Linux - Newbie 2 05-28-2009 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration