Differences between revisions 4 and 6 (spanning 2 versions)
Revision 4 as of 2006-10-19 13:31:05
Size: 1901
Comment: uid / quota
Revision 6 as of 2007-03-13 02:04:35
Size: 2316
Comment: nav
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
##cipuxfirstlevelpage
Line 29: Line 31:
If you want to do the same for all students, relace "year01" by "student" If you want to do the same for all students, relace "year01" by "student" or better use
"cipux_task_list_students"
Line 37: Line 40:
normally this should be the same as (but that is too easy, isn't it?):

{{{
  cipux_task_list_students >userIDs
}}}
Line 42: Line 51:
done  done
Line 44: Line 53:

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_* [:?../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...

add all users of group $X to group $Y

Remark: CipUX distinguishes between classes and roles. Here, classes are used.

# for i in `cipux_task_list_user_members_of_course $X` ; do \
   cipux_task_add_user_to_course $Y $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