HowTo prepare for an exam Here is a short howto on how we prepared the prep-exam on Ulsrud VGS. First some background We have the following share-layout at Ulsrud /skole/tjener/ home0 home1 elev04 elev05 elev06 felles eksamen home0 was the orignal home directory for the users home1 was added for the teatchers elev0[4-6] was later added and student from home0 (and home1) was moved into elev0[4-6] after which year they are supposed to graduate felles is a common file share made to share files. to be able to access this share, you have to be a member of the group "felles" eksamen is a directory where we put our users home directory during exam. Then we get a list of users who shall have an exam: this list is on the form finnarne andreas pere markus and so on. there are different scenarios, but here we take the assumption that the users are not allowed to acces the common share "felles" and not their home directories there are two tasks that are needed: To remove the accesss to felles, run ( echo "dn: cn=felles,ou=Group,dc=skole,dc=skolelinux,dc=no" echo "changetype: modify" echo "delete: memberUid" for EXAM_USER in $(cat exam-users) ; do echo "memberUid: $EXAM_USER" done ) > felles_delete.ldif this will produce a file like this: dn: cn=felles,ou=Group,dc=skole,dc=skolelinux,dc=no changetype: modify delete: memberUid memberUid: finnarne memberUid: andreas memberUid: pere memberUid: markus then you may use this ldif-file to remove the acces for those users: ldapmodify -D "cn=admin,ou=People,dc=skole,dc=skolelinux,dc=no" \ -H "ldaps://ldap/" -W -x -f felles_delete.ldif then you need to create new exam-homes for the users for EXAM_USER in $(cat exam-users) ; do cp -r /etc/skel /skole/tjener/eksamen/$EXAM_USER chown -R $EXAM_USER:$EXAM_USER /skole/tjener/eksamen/$EXAM_USER echo "dn: uid=$EXAM_USER,ou=People,dc=skole,dc=skolelinux,dc=no" echo "changetype: modify" echo "replace: homeDirectory" echo "homeDirectory: /skole/tjener/eksamen/$EXAM_USER" echo done > exam_home.ldif then you may use this ldif-file to change the homedir of the exam users: ldapmodify -D "cn=admin,ou=People,dc=skole,dc=skolelinux,dc=no" \ -H "ldaps://ldap/" -W -x -f exam_home.ldif Also you may need to lock out users from accessing internet. That is a topic for later