Skip to content
Snippets Groups Projects
Verified Commit 803343e7 authored by David Beniamine's avatar David Beniamine
Browse files

Several Bug fix

+ Fix bad Links
+ Fix handymenu broken
+ Fix bad handymenu configuration files
+ ADD: One groupe per level
parent 54683eb0
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,13 @@ SKELS[cycle_3]="03-maxi" ...@@ -7,6 +7,13 @@ SKELS[cycle_3]="03-maxi"
SKELS[professeur]="prof" SKELS[professeur]="prof"
SKELS[direction]="direction" SKELS[direction]="direction"
declare -A GRPS
GRPS[cycle_1]="Cycle1"
GRPS[cycle_2]="Cycle2"
GRPS[cycle_3]="Cycle3"
GRPS[professeur]="Profs"
GRPS[direction]="Administratifs"
user="$1" user="$1"
level="$2" level="$2"
TEMPF="$$_temp" TEMPF="$$_temp"
...@@ -64,6 +71,8 @@ fi ...@@ -64,6 +71,8 @@ fi
# Add Primtux to user group # Add Primtux to user group
echo -e "dn: cn=Primtux,ou=Groups,$LDAP_BASE_DN\nchangetype: modify\nadd: memberUid\nmemberUid: $user" > $TEMPF.1.ldiff echo -e "dn: cn=Primtux,ou=Groups,$LDAP_BASE_DN\nchangetype: modify\nadd: memberUid\nmemberUid: $user" > $TEMPF.1.ldiff
ldapmodify -x -D "cn=$LDAP_ADMIN_RDN,$LDAP_BASE_DN" -w $LDAP_ADMIN_PW -f $TEMPF.1.ldiff ldapmodify -x -D "cn=$LDAP_ADMIN_RDN,$LDAP_BASE_DN" -w $LDAP_ADMIN_PW -f $TEMPF.1.ldiff
echo -e "dn: cn=${GRPS[$level]},ou=Groups,$LDAP_BASE_DN\nchangetype: modify\nadd: memberUid\nmemberUid: $user" > $TEMPF.1.ldiff
ldapmodify -x -D "cn=$LDAP_ADMIN_RDN,$LDAP_BASE_DN" -w $LDAP_ADMIN_PW -f $TEMPF.1.ldiff
# Retrieve files from skels # Retrieve files from skels
skel="$DIR/skels/${SKELS[$level]}" skel="$DIR/skels/${SKELS[$level]}"
home=`grep home $TEMPF.ldiff | cut -d ' ' -f 2` home=`grep home $TEMPF.ldiff | cut -d ' ' -f 2`
...@@ -72,12 +81,12 @@ cp -r $skel $home ...@@ -72,12 +81,12 @@ cp -r $skel $home
cp -r $home.bak/* $home/ cp -r $home.bak/* $home/
rm -rf $home.bak rm -rf $home.bak
# fix links # fix links
if [ -e "$home/.wine/drive_c/users/01-mini/Bureau" ] find $home/.wine/drive_c/ -type l ! -exec test -e {} \; -print | while read f
then do
ln -sf $home/Bureau $home/.wine/drive_c/users/01-mini/Bureau ln -sf "$home/`basename \"$f\" | sed 's/.* \(.*\)/\u\1/'`" "$f"
fi done
sed -i s@${SKELS[$level]}@$user@g $home/.config/xfce4/panel/launcher-4/14504679941.desktop
# fix samba passwd # fix samba passwd
# TODO: test me
echo "You will be prompted twice for samba password, please enter the same as for LDAP" echo "You will be prompted twice for samba password, please enter the same as for LDAP"
smbpasswd -U $user smbpasswd -U $user
# fix Rights # fix Rights
......
...@@ -4,7 +4,4 @@ then ...@@ -4,7 +4,4 @@ then
echo "This script should be run on the LCS" echo "This script should be run on the LCS"
exit 1 exit 1
fi fi
# Create basic users 1 per cycle + prof + direction DIR=`dirname $0`
## Homedirs
## LDIF
## ldapadd
dn: cn=Primtux,ou=Groups,ou=DSIT,BASE dn: cn=Cycle1,ou=Groups,BASE
gidNumber: 5007
description: Utilisateurs du Cycle 1
objectClass: posixGroup
objectClass: top
cn: Cycle1
dn: cn=Cycle2,ou=Groups,BASE
gidNumber: 5008
description: Utilisateurs du Cycle 2
objectClass: posixGroup
objectClass: top
cn: Cycle2
dn: cn=Cycle3,ou=Groups,BASE
gidNumber: 5009
description: Utilisateurs du Cycle 3
objectClass: posixGroup
objectClass: top
cn: Cycle3
dn: cn=Primtux,ou=Groups,BASE
gidNumber: 5006 gidNumber: 5006
description: Utilisateurs visibles sur Primtux description: Utilisateurs visibles sur Primtux
objectClass: posixGroup objectClass: posixGroup
......
File deleted
File deleted
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment