Voici la solution que j'utilise au Lycée sur un SME 6.01-01 modifié.
Source :
http://tehvand.com/tehvand/index.cgi
create a new template fragment in /etc/e-smith/templates-custom/etc/smb/smb.conf
- I call mine 55adminhomes
# vi /etc/e-smith/templates-custom/etc/smb.conf/55adminhomes
add the following to the template:
[admin_shares]
comment = home_directories
path = /home/e-smith/files/users/
valid users = admin root *your_user_name
admin users = admin root *your_username
write list = admin root *your_user_name
public = no
browsable = yes
writable = yes
* you may add as many users as you like here as long as they are separated by a space
then refresh the template:
/sbin/e-smith/expand-template /etc/smb.conf
Attention : Les utilsateurs ont des droits administrateurs, et donc si l'un d'entrtes eux dépose un document dans le repertoire d'un élève celui-ci ne pourra le lire !
Autre chose de bien utile : L'affectation de lecteurs réseaux suivant le groupe d'apartenance de l'utilisateur.
A installer :
e-smith-loginscript-0.2-2.noarch.rpm
et ensuite en ligne de commande :
ln -s /home/e-smith/files/samba/netlogon /home/netlogon
/sbin/e-smith/signal-event post-upgrade
/sbin/e-smith/signal-event reboot
Le script que j'utilise :
@ECHO OFF
REM To set the time when clients logon to the domain:
REM net time \\servername /set /yes
REM
REM To map a home directory to drive h:
REM net use s: /home
rem Script d'ouverture de session
rem echo "Contrôle effectué par callisto"
net time \\callisto /set /y
net use s: /home /PERSISTENT:NO
net use m: /delete /yes
net use n: /delete /yes
net use o: /delete /yes
net use p: /delete /yes
net use l: /delete /yes
net use q: /delete /yes
net use r: /delete /yes
net use t: /delete /yes
net use u: /delete /yes
net use w: /delete /yes
net use x: /delete /yes
net use y: /delete /yes
#ifg eleves-1ge
net use q: \\callisto\com-1ge /PERSISTENT:NO
#endif
#ifg eleves-tge
net use r: \\callisto\com-tge /PERSISTENT:NO
#endif
#ifg eleves-ts1
net use t: \\callisto\com-ts1 /PERSISTENT:NO
#endif
#ifg eleves-ts2
net use u: \\callisto\com-ts2 /PERSISTENT:NO
#endif
#ifg eleves-lipro
net use w: \\callisto\com-lipro /PERSISTENT:NO
#endif
#ifg profs-1ge
net use x: \\callisto\com-1ge /PERSISTENT:NO
#endif
#ifg profs-tge
net use y: \\callisto\com-tge /PERSISTENT:NO
#endif
#ifg profs-ts1
net use m: \\callisto\com-ts1 /PERSISTENT:NO
#endif
#ifg profs-ts2
net use n: \\callisto\com-ts2 /PERSISTENT:NO
#endif
#ifg profs-lipro
net use o: \\callisto\com-lipro /PERSISTENT:NO
#endif
#ifg profs
net use p: \\callisto\com-profs /PERSISTENT:NO
net use l: \\callisto\applications /PERSISTENT:NO
#endif
net use z: /delete /yes