Also cf. http://wiki.skolelinux.de/CipUX/Skripte

This page collects tweaks and scripts for daily administration that make use of cipux_task_* ?commandline tools. These tweaks can not only give an example on how to use the cipux API efficiently, but also could give hints to developers who will possibly create a Qt-GUI for CipUX in order to make webmin entirely superflicious...

add all users of group $X to group $Y

Remark: CipUX distinguishes between classes and roles. Here, classes are used. {{{# script 'cipux_task_add_course_to_course' for i in cipux_task_list_user_members_of_course $1 do

done }}}

restore home dir according to course specific skel

Each course $X has its default skeleton file which is virtually the home directory of user $X (this user is created with any course and might be enabled to login with his own password). During restore process, corresponding config files are resynced, so user documents will be kept.

# for i in `cipux_task_list_user_members_of_course $X` ; do \
   cipux_task_restore_user_homedir  $i; done 

create public_html for all users in course year01

First, go to cipux CAT and create skel group "html". in ~html create public_html and, also, create index.html.'

for i in `cipux_task_list_user_members_of_course year01` \
   ; do cipux_task_restore_user_homedir $i /skole/tjener/home0 html \
;done              

If you want to do the same for all students, relace "year01" by "student" or better use "cipux_task_list_students"

create a list of all user IDs in student group

for i in `cipux_task_list_user_members_of_course student` ; do id $i ; done \
  | cut "-d(" -f1 | cut "-d=" -f2  >userIDs

normally this should be the same as (but that is too easy, isn't it?):

  cipux_task_list_students >userIDs

set user quota to 100000 for all users in user ID list

for i in `cat userIDs` ; do  \
   cipux_set_quota /skole/tjener/home0  $i 100000 0 ; \
done

We do not know what in "userIDs" is, but if you would like to do it for all teachers users, try this:

for i in `cipux_task_list_teachers` ; do  \
   cipux_set_quota /skole/tjener/home0  $i 100000 0 ; \
done