Differences between revisions 2 and 9 (spanning 7 versions)
Revision 2 as of 2006-10-17 09:02:36
Size: 1462
Comment:
Revision 9 as of 2009-03-16 03:36:29
Size: 2404
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from DebianEdu/CipUX/Tweaks
##cipuxfirstlevelpage
Line 3: Line 6:
This page collects tweaks and scripts for daily administration that make use of cipux_task_* [:../ShellTasks: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... This page collects tweaks and scripts for daily administration that make use of cipux_task_* [[../ShellTasks|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...
Line 7: Line 10:
{{{
# for i in `cipux_task_list_user_members_of_course $X` ; do \
   cipux_task_add_user_to_course $Y $i; done }}}
{{{# script 'cipux_task_add_course_to_course'
for i in `cipux_task_list_user_members_of_course $1`
do
   cipux_task_add_user_to_course $2 $i
done
}}}
Line 28: Line 34:

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
}}}

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

  • cipux_task_add_user_to_course $2 $i

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