Subversion Repositories ALCASAR

Rev

Rev 1342 | Rev 1349 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1342 Rev 1348
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
#  $Id: alcasar.sh 1342 2014-05-06 10:10:39Z richard $ 
2
#  $Id: alcasar.sh 1348 2014-05-13 22:13:45Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
 
5
 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
6
# ALCASAR Install script -  CopyLeft ALCASAR Team [Rexy + 3abtux + Steweb + Crox + ...] 
7
# Ce programme est un logiciel libre ; This software is free and open source
7
# Ce programme est un logiciel libre ; This software is free and open source
Line 252... Line 252...
252
# On crée aléatoirement les mots de passe et les secrets partagés
252
# On crée aléatoirement les mots de passe et les secrets partagés
253
	rm -f $PASSWD_FILE
253
	rm -f $PASSWD_FILE
254
	grubpwd=`cat /dev/urandom | tr -dc [:alnum:] | head -c8`	# mot de passe de protection du menu Grub
254
	grubpwd=`cat /dev/urandom | tr -dc [:alnum:] | head -c8`	# mot de passe de protection du menu Grub
255
	echo -n "Password to protect the boot menu (GRUB) : " > $PASSWD_FILE
255
	echo -n "Password to protect the boot menu (GRUB) : " > $PASSWD_FILE
256
	echo "$grubpwd" >> $PASSWD_FILE
256
	echo "$grubpwd" >> $PASSWD_FILE
257
	md5_grubpwd=`/usr/bin/md5pass $grubpwd`
257
	md5_grubpwd=`/usr/bin/openssl passwd -1 $grubpwd`
258
	$SED "/^password.*/d" /boot/grub/menu.lst
258
	$SED "/^password.*/d" /boot/grub/menu.lst
259
	$SED "1ipassword --md5 $md5_grubpwd" /boot/grub/menu.lst
259
	$SED "1ipassword --md5 $md5_grubpwd" /boot/grub/menu.lst
260
	mysqlpwd=`cat /dev/urandom | tr -dc [:alnum:] | head -c8`	# mot de passe de l'administrateur Mysqld
260
	mysqlpwd=`cat /dev/urandom | tr -dc [:alnum:] | head -c8`	# mot de passe de l'administrateur Mysqld
261
	echo -n "Name and password of Mysql/mariadb administrator : " >> $PASSWD_FILE
261
	echo -n "Name and password of Mysql/mariadb administrator : " >> $PASSWD_FILE
262
	echo "root / $mysqlpwd" >> $PASSWD_FILE
262
	echo "root / $mysqlpwd" >> $PASSWD_FILE