[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Small Report of Dev WE in France 18-19/03 - Work on user administration tool



Hi Steffen,

I take you mail serious and answer fast.

Steffen Joeris wrote:
On Wednesday 21 June 2006 16:11, Christian Külker wrote:

Does Cipux use the Perl LDAP API?
no.

I am not against it, if some will implement it, I will apply the patch.
If I have time, I will do it by my own. But I can't see it the next 2 month. There are question from other distros like ubuntu, edubuntu and others ... and changing the inner API adds no functionallity.

I guess it would make things easier and it has a very good ldap handling and there is no need to use the tools ldapsearch, ldapadd ... and friends.

It doesn't change a bit. Ok your arguments are:
- "easier": CipUX uses 2 commands: ldapsearch and ldapmodify (which includes ldapadd and ldapdelete) It isn't difficult. And has not to be developed because it is existing. Ok if I would implement it in 2006, I would use that modules. But they where not usable in 1999 on Trustix.
 - "good ldap handling": this not a real argument, or do I miss the point?
- "no need to use": well yes, but it works since 6 years.

So how does it work now?

This are the lowlevel commands:

Operates on LDAP attributes:
cipux_get_value     -> ldapsearch
cipux_set_value     -> ldapmodify

Operrates on LDAP objects:
cipux_add           -> ldapmodify (and cipux_get_value cipux_set_value)
cipux_del           -> ldapmodify (and cipux_get_value cipux_set_value)
cipux_change        -> ldapmodify

there are objects (somtimes a single object, somtimes a single object or all objects) on which this commands can operate:

* user
* course (a group)
* machine
* room
* hardware type
* image slot
* configuration

For example: change the login shell for every user on the system to /bin/bash can be done like this:

cipux_set_value -U -e loginShell -v '/bin/bash'

To set the login shell for stjoeris to the Debian Almquist Shell:

cipux_set_value -u stjoeris -e loginShell -v '/bin/dash'

This are the Highlevel commands:

The highlevel commands can be reached through the XML-RPC server and the command line. They start with cipux_task_* and are for convinience.

cipux_task_list_users
...
see: http://wiki.debian.org/DebianEdu/CipUX/ShellTasks

So "cipux_task_list_users" is nearly the same as "cipux_get_value -U -e uid"

An example for the Shell tasks:

for i in `cipux_task_list_teachers`; do
  cipux_refine_homedir restore /skole/tjener/home0 teacher $i;
done

What does this do?

cipux_refine_homedir MODE HOMEDIRPATH SKELUSER USER
It restore the (teachers) skel files for every existing teacher home directory with rsync. Ok this can be a dangerous function. I probably will do this for students and not for teachers ;-) But it shows the potential.

So teachers like this:

for i in `cipux_task_list_students`; do
  cipux_refine_homedir restore /skole/tjener/home0 student $i;
done

You can also look into the wlus code for doing ldap interaction.

Yes, it is not a matter of not knowing this. I added patches to the wlus code several times, which then was commited or ask for commitment by others. I never did it personaly because of time lack. Or my changes where used on special occasion without adding. So I read the source code several times. The code is good.

E.g. look into the LDAP.pm which is IMHO a good example for some nice ldap interaction in perl.

Yes you are right.

So if somebody on this list like to change CipUX to add the LDAP Perl modules like Steffen suggest or would like to contribute in other ways to the code, you are welcome.

Yours
Christian



Reply to: