Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-28-2009, 11:09 PM
|
#1
|
Member
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38
Rep:
|
ldap_add:Invalid Syntax Error (23)
Hi,
I am sorry if this is in the wrong forum, wasnt sure where to put it. Can someone PLEASE help!? I have searched google and had no luck.
I have RHEL 4.5, I am running openLDAP.
I have managed to get the server up and running, slapd is started. I have created my groups and I have run into problems trying to add my first user..
People ldif entry:
Code:
dn: ou=people,dc=example,dc=aus,dc=edu,dc=net,dc=com
objectClass: top
objectClass: organizationalUnit
ou: people
dn: ou=group,dc=example,dc=aus,dc=edu,dc=net,dc=com
objectClass: top
objectClass: organizationalUnit
ou: group
Group ldif entry:
Code:
dn: cn=dcs,ou=group,dc=example,dc=aus,dc=edu,dc=net,dc=com
objectClass: posixGroup
objectClass: top
cn: dcs
gidNumber: 9000
memberuid: testusr
User ldif entry:
Code:
dn: cn=testusr,ou=people,dc=example,dc=aus,dc=edu,dc=net,dc=com
objectClass: top
objectClass: posixAccount
objectClass: account
objectClass: shadowAccount
cn: testusr
sn: usr
uid: testusr
uidNumber: 600
gidNumber: 9000
homeDirectory: /userdirs/testusr
userPassword: change123
loginShell: /bin/csh
shadowMax: 60
Then when i type:
Code:
ldapadd -x -D "cn=Administrator,dc=example,dc=aus,dc=edu,dc=net,dc=com" -W -f testusr.ldif
Enter LDAP Password:
adding new entry "cn=testusr,ou=people,dc=example,dc=aus,dc=edu,dc=net,dc=com"
ldap_add: Invalid syntax (23)
additional info: gidNumber: value #0 invalid per syntax
I have no idea what I am doing wrong. When I try and add the user without adding into a group i get:
Code:
ldap_add: Invalid syntax (21)
additional info: uidNumber: value #0 invalid per syntax
Any help would be greatly appreciated!! I am borderline newbie on this so apologies if this is a simple error I am making?!?
|
|
|
04-29-2009, 01:23 AM
|
#2
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep: 
|
Hi -
I honestly don't see anything wrong with what you've shown...
... but I'm virtually certain it's some simple spelling or punctuation error somewhere. Here's an example:
http://archives.devshed.com/forums/n...d-2397459.html
Quote:
EXAMPLE ERROR:
dapadd -x -D "cn=Manager,dc=mdah,dc=state,dc=ms,dc=us" -W -f main.ldif
Enter LDAP Password:
adding new entry "dc=mdah,dc=state,dc=ms,dc=us"
adding new entry "cn=Manager,dc=mdah,dc=state,dc=ms,dc=us"
ldapadd: Invalid syntax (21)
additional info: objectclass: value #0 invalid per syntax
|
Quote:
ROOT CAUSE:
dn: cn=Manager,dc=mdah,dc=state,dc=ms,dc=us
objectclass: organzationalRole
cn: Manager
<= "organizationalRole" was mis-spelled
|
'Hope that helps .. PSM
|
|
|
04-29-2009, 11:30 PM
|
#3
|
Member
Registered: Sep 2008
Location: Perth, Australia
Distribution: RedHat, Solaris
Posts: 38
Original Poster
Rep:
|
Hi Paulsm4,
thanks for your suggestion. I have fixed the problem, however unfortunately I cannot be certain as to what the solution was. Sorry all those people who read this for help!!
However, here are my suggestions or rather the things I did change just before it miraculously worked!!
I modified the group entry to include attribute memberuid: as below.
Code:
#Groups
dn: cn=dcs,ou=group,dc=apgsis88,dc=perth,dc=oilfield,dc=slb,dc=com
objectClass: posixGroup
objectClass: top
cn: dcs
gidNumber: 9000
memberuid: testusr
I also restarted slapd server.
Code:
[root@testsrv88 ldap]# service ldap restart
I'm sure it was something simple that I did above but unfortunately dont know which of these things was the key!
Thanks for your suggestions paulsm4.
|
|
|
09-07-2011, 09:33 AM
|
#4
|
LQ Newbie
Registered: Sep 2011
Posts: 1
Rep: 
|
Invisible typo
I had exactly the same error, it turned out in my ldif file I had:
Code:
loginShell: /bin/bash
uidNumber: 9015
gidNumber: 20
for clarity:
and not as it should have been:
There was a space at the end of the numeric uidNumber value. I'd copied the value out of another file and didn't see the space, but it was enough to waste an hour of my life.
|
|
|
All times are GMT -5. The time now is 07:44 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|