Hi, How do I persuade fedora-ds to load new schema? Restarting the slapd daemon doesn''t seem to do it. Completing removing a directory and then recreating it does, but I don''t want to have to keep doing that if possible... Thanks Graham
I''d just restart dirsrv, and probably even dirsrv-admin too. On 8/4/08, Graham Seaman <G.Seaman@lse.ac.uk> wrote:> > Hi, > > How do I persuade fedora-ds to load new schema? Restarting the slapd daemon > doesn''t seem to do it. Completing removing a directory and then recreating > it does, but I don''t want to have to keep doing that if possible... > > Thanks > Graham > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
solarflow99 wrote:> I''d just restart dirsrv, and probably even dirsrv-admin too. > >I''m not running the admin server. Restarting dirsrv doesn''t appear to do it. If it should normally, I guess I''ve got something else wrong... Graham> > On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk>> wrote: > > Hi, > > How do I persuade fedora-ds to load new schema? Restarting the > slapd daemon doesn''t seem to do it. Completing removing a > directory and then recreating it does, but I don''t want to have to > keep doing that if possible... > > Thanks > Graham > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > ------------------------------------------------------------------------ > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
what platform are you running on? a service restart should have dirsrv take the new schema, do the logs show anything wrong? On 8/4/08, Graham Seaman <G.Seaman@lse.ac.uk> wrote:> > solarflow99 wrote: > >> I''d just restart dirsrv, and probably even dirsrv-admin too. >> >> >> I''m not running the admin server. Restarting dirsrv doesn''t appear to do > it. If it should normally, I guess I''ve got something else wrong... > > Graham > > > On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk <mailto:G.Seaman@lse.ac.uk>> >> wrote: >> >> Hi, >> >> How do I persuade fedora-ds to load new schema? Restarting the >> slapd daemon doesn''t seem to do it. Completing removing a >> directory and then recreating it does, but I don''t want to have to >> keep doing that if possible... >> >> Thanks >> Graham >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> ------------------------------------------------------------------------ >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
solarflow99 wrote:> what platform are you running on? a service restart should have > dirsrv take the new schema, do the logs show anything wrong?uname -a says: Linux enterprise1.lse.ac.uk 2.6.18-53.1.14.el5 #1 SMP Tue Feb 19 07:18:21 EST 2008 i686 i686 i386 GNU/Linux ns-slapd -version says: Fedora-Directory/1.1.0 B2007.354.1236 There are no errors reported in access or errors when I restart; the only error I''m getting is when I try to create an entry using the new schema I''m trying to load, which gives me: [04/Aug/2008:10:12:25 +0100] conn=1 op=5 RESULT err=65 tag=105 nentries=0 etime=0 [04/Aug/2008:11:02:12 +0100] - Entry "cn=test,ou=flame users,dc=lse,dc=ac,dc=uk" has unknown object class "eduPerson" eduPerson is a standard schema which works fine. It is the schema I accidentally missed out when I started and am trying to add. I have the same problem with Fedora-ds on another system running CentOS: I can add a new schema only by deleting the directory and populating it from scratch. I am new to Ldap, so am not sure what is expected behaviour and what isn''t. Graham> > > On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk>> wrote: > > solarflow99 wrote: > > I''d just restart dirsrv, and probably even dirsrv-admin too. > > > I''m not running the admin server. Restarting dirsrv doesn''t appear > to do it. If it should normally, I guess I''ve got something else > wrong... > > Graham > > > On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk> <mailto:G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk>>> wrote: > > Hi, > > How do I persuade fedora-ds to load new schema? Restarting the > slapd daemon doesn''t seem to do it. Completing removing a > directory and then recreating it does, but I don''t want to > have to > keep doing that if possible... > > Thanks > Graham > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > <mailto:Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com>> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > ------------------------------------------------------------------------ > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > ------------------------------------------------------------------------ > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
On 8/4/08, Graham Seaman <G.Seaman@lse.ac.uk> wrote:> > solarflow99 wrote: > >> what platform are you running on? a service restart should have dirsrv >> take the new schema, do the logs show anything wrong? >> > uname -a says: > > Linux enterprise1.lse.ac.uk 2.6.18-53.1.14.el5 #1 SMP Tue Feb 19 07:18:21 > EST 2008 i686 i686 i386 GNU/Linux > > ns-slapd -version says: > > Fedora-Directory/1.1.0 B2007.354.1236 > > There are no errors reported in access or errors when I restart; the only > error I''m getting is when I try to create an entry using the new schema I''m > trying to load, which gives me: > > [04/Aug/2008:10:12:25 +0100] conn=1 op=5 RESULT err=65 tag=105 nentries=0 > etime=0 > [04/Aug/2008:11:02:12 +0100] - Entry "cn=test,ou=flame > users,dc=lse,dc=ac,dc=uk" has unknown object class "eduPerson" > > eduPerson is a standard schema which works fine. It is the schema I > accidentally missed out when I started and am trying to add. > > I have the same problem with Fedora-ds on another system running CentOS: I > can add a new schema only by deleting the directory and populating it from > scratch. > > I am new to Ldap, so am not sure what is expected behaviour and what isn''t. > > Grahamok, it sounds like what I think it is. When you created the existing users, they were not added with the eduPerson objectclass since the schema didn''t exist in FDS, so now only new users will automatically get it assuming your front end provides it, not sure what you are using since you said its not dirsrv-admin, you must have a way of adding new users, etc. Thats why its best to add the schema to FDS first, then start creating new users. The way I understand it, the schema only makes it possible for an ldap server to allow the extra feature, but its the user (object) that has its necessary objectclasses assigned to it, for each objectclass, you can assign the values and attributes. For example: samba requires adding the samba schema into FDS, then each user needs to have the "sambasamaccount" objectclass which has numerous values that samba accounts use. I was new with ldap not long ago too, hope this helps.. On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk <mailto:G.Seaman@lse.ac.uk>>>> wrote: >> >> solarflow99 wrote: >> >> I''d just restart dirsrv, and probably even dirsrv-admin too. >> >> >> I''m not running the admin server. Restarting dirsrv doesn''t appear >> to do it. If it should normally, I guess I''ve got something else >> wrong... >> >> Graham >> >> >> On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk >> <mailto:G.Seaman@lse.ac.uk> <mailto:G.Seaman@lse.ac.uk >> <mailto:G.Seaman@lse.ac.uk>>> wrote: >> >> Hi, >> >> How do I persuade fedora-ds to load new schema? Restarting the >> slapd daemon doesn''t seem to do it. Completing removing a >> directory and then recreating it does, but I don''t want to >> have to >> keep doing that if possible... >> >> Thanks >> Graham >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> <mailto:Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com>> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> >> ------------------------------------------------------------------------ >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> ------------------------------------------------------------------------ >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
solarflow99 wrote:> > ok, it sounds like what I think it is. When you created the existing > users, they were not added with the eduPerson objectclass since the > schema didn''t exist in FDS, so now only new users will > automatically get it assuming your front end provides it, not sure > what you are using since you said its not dirsrv-admin, you must have > a way of adding new users, etc. Thats why its best to add the schema > to FDS first, then start creating new users.I''m tinkering with new schema as well as including the standard eduPerson and was hoping to avoid having to strip out all the data and then repopulate each time I make a minor change to the schema. I''m populating it from a large Active Directory by script, which already has quite a long run time. But I don''t have any users in the directory at all yet, which is why I was a bit surprised at the behaviour. I thought at least adding new users with a new schema wouldn''t be a problem. I guess if that is out the next thing I need to check is what happens if I add a new ''may'' field to an existing schema - will it force me to drop all the old data to install that, too.> The way I understand it, the schema only makes it possible for an > ldap server to allow the extra feature, but its the user (object) that > has its necessary objectclasses assigned to it, for each objectclass, > you can assign the values and attributes. For example: samba > requires adding the samba schema into FDS, then each user needs to > have the "sambasamaccount" objectclass which has numerous values that > samba accounts use. > > I was new with ldap not long ago too, hope this helps..:-) Thanks Graham> > > On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk> <mailto:G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk>>> wrote: > > solarflow99 wrote: > > I''d just restart dirsrv, and probably even dirsrv-admin > too. > > > I''m not running the admin server. Restarting dirsrv doesn''t > appear > to do it. If it should normally, I guess I''ve got > something else > wrong... > > Graham > > > On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk> > <mailto:G.Seaman@lse.ac.uk <mailto:G.Seaman@lse.ac.uk>> > <mailto:G.Seaman@lse.ac.uk <mailto:G.Seaman@lse.ac.uk> > > <mailto:G.Seaman@lse.ac.uk > <mailto:G.Seaman@lse.ac.uk>>>> wrote: > > Hi, > > How do I persuade fedora-ds to load new schema? > Restarting the > slapd daemon doesn''t seem to do it. Completing > removing a > directory and then recreating it does, but I don''t > want to > have to > keep doing that if possible... > > Thanks > Graham > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > <mailto:Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com>> > <mailto:Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > <mailto:Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com>>> > > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > > ------------------------------------------------------------------------ > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > <mailto:Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com>> > > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > <mailto:Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com>> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > ------------------------------------------------------------------------ > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > <mailto:Fedora-directory-users@redhat.com> > https://www.redhat.com/mailman/listinfo/fedora-directory-users > > > ------------------------------------------------------------------------ > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
Graham Seaman wrote:> I''m tinkering with new schema as well as including the standard > eduPersonPerhaps best to get it working with the standard before changing anything?> and was hoping to avoid having to strip out all the data and > then repopulate each time I make a minor change to the schema.That should not be neccessary unless your new or altered schema removed or redefines attributes or classes that are already in place in the directory. I added three or four new schemata to the directory I just installed, including EduPerson, and each time the data remained in place but I became able to add new attribute types to existing directory objects What order are you loading the schema files in? (Controlled by the two digits at the start of the file name) > I''m> populating it from a large Active Directory by script, which already has > quite a long run time.Pretty much exactly what I''m doing!> But I don''t have any users in the directory at all yet, which is why I > was a bit surprised at the behaviour. I thought at least adding new > users with a new schema wouldn''t be a problem. I guess if that is out > the next thing I need to check is what happens if I add a new ''may'' > field to an existing schema - will it force me to drop all the old data > to install that, too.I do not think it should not do this at all. As far as I know adding EduPerson (or any other new schema) ought not to change what is in the directory already as long as you do not delete or redefine old classes or attributes that are used by existing entries. Are there no error messages at startup? Does the "new schema" you say you are "tinkering with" contain any attributes or classes with the same names or OIDs as ones in any other schema? Does the version of the eduPerson schema you are using contain a "changetype:" or any "add:" or "delete:" attributes? (I had to strip them all out to get mine working because Fedora didn''t like an attempt to modify things that didn''t exist) I wouldn''t want to bet on what happens if a class is defined in one schema, then referred to in another, then redefined in a third!
> Graham Seaman wrote:>> will it force me to drop all the old >> data to install that, too.and I incompetently replied:> I do not think it should not do this at all.which of course should have been either "I do not think it should do this..." or else "I think it should not do this..." Whoops
ken wrote:> Graham Seaman wrote: > >> I''m tinkering with new schema as well as including the standard >> eduPerson > > Perhaps best to get it working with the standard before changing > anything?Well, it does work on another Fedora install so I know there''s nothing syntactically wrong with the schema. But I just know I''m going to have to make changes to my new schema after the thing goes live... (I''m not modifying eduPerson, the new schema is something separate)> >> and was hoping to avoid having to strip out all the data and then >> repopulate each time I make a minor change to the schema. > > That should not be neccessary unless your new or altered schema > removed or redefines attributes or classes that are already in place > in the directory. I added three or four new schemata to the directory > I just installed, including EduPerson, and each time the data remained > in place but I became able to add new attribute types to existing > directory objectsOK, that''s the way I thought it should work. So I must have something setup wrong. What Fedora version are you using?> What order are you loading the schema files in? (Controlled by the > two digits at the start of the file name)60pam-plugin.ldif 65eduperson200806.ldif 70edumember.ldif 80testperson.ldif 99user.ldif> > > I''m >> populating it from a large Active Directory by script, which already >> has quite a long run time. > > Pretty much exactly what I''m doing! > >> But I don''t have any users in the directory at all yet, which is why >> I was a bit surprised at the behaviour. I thought at least adding new >> users with a new schema wouldn''t be a problem. I guess if that is >> out the next thing I need to check is what happens if I add a new >> ''may'' field to an existing schema - will it force me to drop all the >> old data to install that, too. > > I do not think it should not do this at all. As far as I know adding > EduPerson (or any other new schema) ought not to change what is in the > directory already as long as you do not delete or redefine old > classes or attributes that are used by existing entries. > > Are there no error messages at startup?None. Maybe I should look at increasing the log level. But I just realised the admin server (which I''m not using) does have a problem - [13:39 g_seaman@enterprise1:~/Ldap] sudo /etc/init.d/dirsrv-admin start Starting dirsrv-admin: grep: /etc/dirsrv/admin-serv/adm.conf: No such file or directory /var/run/dirsrv is not writable for Odd, since /var/run/dirsrv is world writeable (and the main directory is writing to it fine). But there genuinely is no adm.conf. All the same, I can''t see how this would relate to my original problem.> > Does the "new schema" you say you are "tinkering with" contain any > attributes or classes with the same names or OIDs as ones in any other > schema? >No. It works fine in another fedora-ds install anyway. It''s mainly just to mop up a few Active Directory attributes I want to keep which don''t have equivalents in the other schema I''m using (things like department (not departmentNumber), coursecode, etc). It''s there exactly because those names don''t exist anywhere else.> Does the version of the eduPerson schema you are using contain a > "changetype:" or any "add:" or "delete:" attributes? (I had to strip > them all out to get mine working because Fedora didn''t like an attempt > to modify things that didn''t exist) >No, I didn''t even know you could do that in a schema. Mine is a straight version of the latest one on the educause site.> I wouldn''t want to bet on what happens if a class is defined in one > schema, then referred to in another, then redefined in a third!Nor me, but I''m sure that''s not the problem. Graham
Graham Seaman wrote:> solarflow99 wrote: >> what platform are you running on? a service restart should have >> dirsrv take the new schema, do the logs show anything wrong? > uname -a says: > > Linux enterprise1.lse.ac.uk 2.6.18-53.1.14.el5 #1 SMP Tue Feb 19 > 07:18:21 EST 2008 i686 i686 i386 GNU/Linux > > ns-slapd -version says: > > Fedora-Directory/1.1.0 B2007.354.1236 > > There are no errors reported in access or errors when I restart; the > only error I''m getting is when I try to create an entry using the new > schema I''m trying to load, which gives me: > > [04/Aug/2008:10:12:25 +0100] conn=1 op=5 RESULT err=65 tag=105 > nentries=0 etime=0 > [04/Aug/2008:11:02:12 +0100] - Entry "cn=test,ou=flame > users,dc=lse,dc=ac,dc=uk" has unknown object class "eduPerson" > > eduPerson is a standard schema which works fine. It is the schema I > accidentally missed out when I started and am trying to add. > > I have the same problem with Fedora-ds on another system running > CentOS: I can add a new schema only by deleting the directory and > populating it from scratch.Deleting which directory? To which directory are you adding the schema files?> > I am new to Ldap, so am not sure what is expected behaviour and what > isn''t. > > Graham > > > >> >> >> On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk >> <mailto:G.Seaman@lse.ac.uk>> wrote: >> >> solarflow99 wrote: >> >> I''d just restart dirsrv, and probably even dirsrv-admin too. >> >> >> I''m not running the admin server. Restarting dirsrv doesn''t appear >> to do it. If it should normally, I guess I''ve got something else >> wrong... >> >> Graham >> >> >> On 8/4/08, *Graham Seaman* <G.Seaman@lse.ac.uk >> <mailto:G.Seaman@lse.ac.uk> <mailto:G.Seaman@lse.ac.uk >> <mailto:G.Seaman@lse.ac.uk>>> wrote: >> >> Hi, >> >> How do I persuade fedora-ds to load new schema? Restarting >> the >> slapd daemon doesn''t seem to do it. Completing removing a >> directory and then recreating it does, but I don''t want to >> have to >> keep doing that if possible... >> >> Thanks >> Graham >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> <mailto:Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com>> >> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> >> ------------------------------------------------------------------------ >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> <mailto:Fedora-directory-users@redhat.com> >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> >> >> ------------------------------------------------------------------------ >> >> -- >> Fedora-directory-users mailing list >> Fedora-directory-users@redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-directory-users >> > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users
Rich Megginson wrote:> Graham Seaman wrote: >> >> I have the same problem with Fedora-ds on another system running >> CentOS: I can add a new schema only by deleting the directory and >> populating it from scratch. > Deleting which directory? To which directory are you adding the > schema files?I am adding the schema files to /etc/dirsrv/schema I am having to delete /etc/dirsrv/slapd-[directory server identifier] and rerun the setup-ds.pl script to get a new schema loaded. Graham
Graham Seaman wrote:> Rich Megginson wrote: >> Graham Seaman wrote: >>> >>> I have the same problem with Fedora-ds on another system running >>> CentOS: I can add a new schema only by deleting the directory and >>> populating it from scratch. >> Deleting which directory? To which directory are you adding the >> schema files? > I am adding the schema files to /etc/dirsrv/schemaAh. That is the source of the confusion. /etc/dirsrv/schema stores the default schema to use for new instances. If you already have an instance (/etc/dirsrv/slapd-something) you should put the schema you want to use in /etc/dirsrv/slapd-something/schema, then restart the server.> I am having to delete /etc/dirsrv/slapd-[directory server identifier] > and rerun the setup-ds.pl script to get a new schema loaded. > > Graham > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users
Rich Megginson wrote:> Graham Seaman wrote: >> I am adding the schema files to /etc/dirsrv/schema > Ah. That is the source of the confusion. /etc/dirsrv/schema stores > the default schema to use for new instances. If you already have an > instance (/etc/dirsrv/slapd-something) you should put the schema you > want to use in /etc/dirsrv/slapd-something/schema, then restart the > server.Ahhh. So simple. Thank you. Graham