2

I'm making a script that installs MariaDB, and I'd like to set a root password. I've got the following in said script:

DEBIAN_FRONTEND=noninteractive

echo mariadb-server-10.0 mariadb-server-10.0/root_password password tmpsetup | debconf-set-selections
echo mariadb-server-10.0 mariadb-server-10.0/root_password_again password tmpsetup | debconf-set-selections
apt-get install -y mariadb-server

This doesn't seem to work, as I can't log into the root account with the "tmpsetup" password. What am I doing wrong?

ffxsam
  • 383
  • 2
  • 3
  • 9
  • I'm experiencing the same on Zesty w/ mariadb-server-10.1. Can't figure out the secret sauce to make this work. – Rich Remer Jun 20 '17 at 04:12
  • I'm experiencing the same on Xenial w/ mariadb-server-10.0. Can't figure out the secret sauce to make this work. – jah Jul 07 '17 at 11:33

1 Answers1

0

Please try instead with

DEBIAN_FRONTEND=noninteractive

echo mariadb-server-10.0 mariadb-server/root_password password tmpsetup | debconf-set-selections
echo mariadb-server-10.0 mariadb-server/root_password_again password tmpsetup | debconf-set-selections
apt-get install -y mariadb-server

That way the changes will be applied also to mariadb-server meta-package, and not only for the specific version.

Janne Pikkarainen
  • 31,454
  • 4
  • 56
  • 78
  • That didn't work. And I don't think that's correct, because the other MariaDB debconf entries (made by the installer) show up as `mariadb-server-10.0`. – ffxsam Jun 30 '16 at 17:04