My question was more concerning the webapps installed via a contrib.
I will certainly blame myself, but it doesn't matter: I had a look into the source file of the contrib "smeserver-kplaylist" some times ago and I saw into /root/etc/e-smith/db/configuration/migrate/85kplaylist:
{
my $rec = $DB->get('kplaylist')
|| $DB->new_record('kplaylist', {type => 'service'});
my $pw = $rec->prop('DbPassword');
return "" if $pw;
if (not $pw or length($pw) < 25)
{
use MIME::Base64 qw(encode_base64);
$pw = "not set due to error";
if ( open( RANDOM, "/dev/urandom" ) )
{
my $buf;
if ( read( RANDOM, $buf, 25 ) != 25 )
{
warn("Short read from /dev/random: $!");
}
else
{
$pw = encode_base64($buf);
chomp $pw;
}
close RANDOM;
}
else
{
warn "Could not open /dev/urandom: $!";
}
$rec->set_prop('DbPassword', $pw);
}
}
/root/etc/e-smith/templates/etc/e-smith/sql/init/80kplaylist_mysql.sql:
# KPLAYLIST MySQL init template
#
# This files creates/updates KPLAYLIST's MySQL database infos
USE mysql;
CREATE DATABASE IF NOT EXISTS { $kplaylist{DbName} };
REPLACE INTO user (
host,
user,
password)
VALUES (
'localhost',
'{ $kplaylist{DbUser} }',
PASSWORD ('{ $kplaylist{DbPassword} }'));
REPLACE INTO db (
host,
db,
user,
select_priv, insert_priv, update_priv, delete_priv,
create_priv, alter_priv, index_priv, drop_priv, create_tmp_table_priv,
grant_priv, lock_tables_priv, references_priv)
VALUES (
'localhost',
'{ $kplaylist{DbName} }',
'{ $kplaylist{DbUser} }',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y',
'N', 'Y', 'Y');
FLUSH PRIVILEGES;
And into the spec file there is: KPLPASS=$(/sbin/e-smith/db configuration getprop kplaylist DbPassword)
I interpreted this by a generation of a password with re-use in the config.
Arnaud
most of the contribs and the core do this way:
we search for an existing password in the config db, if not we generate one.
The same, we usually have migrate fragments for all config to correct previous version and match them to the new version.
In other words, if you restore a sme8 backup on a new sme9, after the post-upgrade and reboot all the migrate fragments will act to adapt obsolete values to the new version.
so for all passwrod you do not have to worry.
as long as you backup and restore mysql db almost all should be fine.
one last thing to know with contribs is that their main folder is out of SME backup targeted folders.
In other word, if the contribs store your music in /var/www/mymusic, this is not part of base backup and will not be restored, unless you make a separate backup.
The same apply for example for sme*admin db folder in /var/lib/sme*admin ... and almost all contribs.
We are moving toward integrate a backup for contribs, but it is still on ongoing work.
There is a wonderful work done at firewall service to help migrate contribs :
https://wikit.firewall-services.com/doku.php/tuto/ipasserelle/divers/mise_a_jour_sme8_vers_sme9?s[]=sme9&s[]=sme8 (sorry French)