Problème de sécurité pendant migration de mysql

Bonjour
Pendant un “upgrade”, on me lance ce que suit et dont,n’etant pas un expert, Je ne sais pas que faire.D’autant plus que mon anglais est assez mauvais.

[quote]mysql-5.5 (5.5.33+dfsg-0+wheezy1) wheezy-security; urgency=high

mysql-server-5.5 ships with the upstream mysql_install_db script which
creates a database “test” and sets up permissions that allow anonymous
access, without a password, from localhost to the “test” database and
any databases starting with “test_” that users might have created
after installing mysql-server.

During the migration of mysql-5.1 to mysql-5.5 in Debian the patches
to drop these permissions and the creation of the test databases were
not applied. This update resolves this issue for new installations of
mysql-server-5.5.

If you are updating from a previous version of mysql-5.5 it is
recommended to check your installation and to drop these privileges
and databases manually.

Further information can be found at the MySQL 5.5 Reference Manual[1].

[1] dev.mysql.com/doc/refman/5.5/en/ … leges.html

– Salvatore Bonaccorso carnil@debian.org Sat, 14 Dec 2013 22:15:25 +0100[/quote]

Merci de votre aide

mysql-server-5.5 est livré avec le script amont (comprendre : fourni par les développeurs d’origine) [i]mysql_install_db script qui crée une base de données “test” et définit des permissions qui permettent l’accès anonyme, sans mot de passe, depuis localhost à la base “test” et n’importe quelle base commençant par “test” que les utilisateurs auraient pu créer après l’installation de mysql-server.

Durant la migration de mysql-5.1 vers mysql-5.5 dans Debian, les patches pour supprimer ces permissions et la création des bases de test n’ont pas été appliqués. Cette mise à jour résout le problème pour les nouvelles installations de mysql-server-5.5.

Si vous mettez à jour depuis une précédente version de mysql-5.5 il est recommandé de vérifier votre installation et de supprimer ces bases et ces privilèges manuellement.[/i]

Salut,

Lances donc en tant que root. (le mdp mysql est demandé à la suite)

[mono]:~# mysql_secure_installation[/mono]

Et réponds comme suit :

[code]:~# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

You already have a root password set, so you can safely answer ‘n’.

Change the root password? [Y/n] n
… skipping.

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MySQL comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y

  • Dropping test database…
    ERROR 1008 (HY000) at line 1: Ne peut effacer la base ‘test’; elle n’existe pas
    … Failed! Not critical, keep moving…
  • Removing privileges on test database…
    … Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

:~# [/code]

Je ne connaissait pas cette commande bien pratique.
Merci de l’info!

@BelZéButh Merci pour cette technique , c’est formidable , tu es formidable … :smiley:

Merci bien. Mais la commande n’est pas reconnue:

[quote]root@nexus:~# mysql_secure_installation
bash: mysql_secure_installation : commande introuvable
[/quote]

[quote=“nereu”]Merci bien. Mais la commande n’est pas reconnue:

[quote]root@nexus:~# mysql_secure_installation
bash: mysql_secure_installation : commande introuvable
[/quote][/quote]

As-tu au moins effectué la mise à niveau de ton serveur SQL :083

Salut,

[quote=“nereu”]Merci bien. Mais la commande n’est pas reconnue:

[quote]root@nexus:~# mysql_secure_installation
bash: mysql_secure_installation : commande introuvable
[/quote][/quote]

Tu as plus que probablement des paquets manquants (non installés).


[code][20:57:32] ~ # mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we’ll need the current
password for the root user. If you’ve just installed MySQL, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): [/code]

$ apt-file search mysql_secure_installation mysql-server-5.5: /usr/bin/mysql_secure_installation mysql-server-5.5: /usr/share/man/man1/mysql_secure_installation.1.gz
Comme indiqué par Clochette, faut que tu fasses la mise à jour…

Merci. Il y a des erreurs, du reste,le système est devenu instable après l’upgrade.

[quote] dpkg -l | grep mysql
ii akonadi-backend-mysql 1.7.2-3 all MySQL storage backend for Akonadi
ii libmysqlclient18:i386 5.5.33+dfsg-0+wheezy1 i386 MySQL database client library
ii libqt4-sql-mysql:i386 4:4.8.2+dfsg-11 i386 Qt 4 MySQL database driver
ii mysql-common 5.5.33+dfsg-0+wheezy1 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server-core-5.5 5.5.33+dfsg-0+wheezy1 i386 MySQL database server binaries
carlos@nexus:~$ apt-file search mysql_secure_installation
bash: apt-file : commande introuvable
carlos@nexus:~$ sudo aptitude update
[sudo] password for carlos:
Ignoré ppa.launchpad.net wheezy Release.gpg
Atteint ftp.fr.debian.org stable Release.gpg
Atteint security.debian.org stable/updates Release.gpg
Ignoré ppa.launchpad.net wheezy Release.gpg
Ignoré ppa.launchpad.net wheezy Release
Ignoré deb.opera.com lenny Release.gpg
Atteint security.debian.org wheezy/updates Release.gpg
Atteint ftp.fr.debian.org stable-updates Release.gpg
Ignoré ppa.launchpad.net wheezy Release
Ignoré deb.opera.com lenny Release
Atteint security.debian.org stable/updates Release
Ignoré debian-multimedia.org wheezy Release.gpg
Atteint security.debian.org wheezy/updates Release
Atteint ftp.fr.debian.org wheezy Release.gpg
Atteint security.debian.org stable/updates/main i386 Packages
Atteint ftp.fr.debian.org wheezy-updates Release.gpg
Atteint security.debian.org stable/updates/main Translation-en
Atteint security.debian.org wheezy/updates/main i386 Packages
Atteint ftp.fr.debian.org stable Release
Atteint security.debian.org wheezy/updates/contrib i386 Packages
Atteint security.debian.org wheezy/updates/non-free i386 Packages
Atteint ftp.fr.debian.org stable-updates Release
Atteint security.debian.org wheezy/updates/contrib Translation-en
Atteint ftp.fr.debian.org wheezy Release
Atteint security.debian.org wheezy/updates/main Translation-en
Atteint security.debian.org wheezy/updates/non-free Translation-en
Atteint ftp.fr.debian.org wheezy-updates Release
Ignoré debian-multimedia.org wheezy Release
Atteint ftp.fr.debian.org stable/main i386 Packages
Atteint ftp.fr.debian.org stable/main Translation-fr
Erreur deb.opera.com lenny/non-free i386 Packages
404 Not Found
Ignoré deb.opera.com lenny/non-free Translation-fr_FR
Atteint ftp.fr.debian.org stable/main Translation-en
Ignoré deb.opera.com lenny/non-free Translation-fr
Ignoré deb.opera.com lenny/non-free Translation-en
Atteint ftp.fr.debian.org stable-updates/main i386 Packages/DiffIndex
Atteint ftp.fr.debian.org stable-updates/main Translation-en/DiffIndex
Atteint ftp.fr.debian.org wheezy/main i386 Packages
Atteint ftp.fr.debian.org wheezy/contrib i386 Packages
Atteint ftp.fr.debian.org wheezy/non-free i386 Packages
Atteint ftp.fr.debian.org wheezy/contrib Translation-en
Atteint ftp.fr.debian.org wheezy/main Translation-fr
Erreur debian-multimedia.org wheezy/main i386 Packages
404 Not Found
Atteint ftp.fr.debian.org wheezy/main Translation-en
Erreur ppa.launchpad.net wheezy/main Sources
404 Not Found
Erreur ppa.launchpad.net wheezy/main i386 Packages
404 Not Found
Atteint ftp.fr.debian.org wheezy/non-free Translation-en
Ignoré ppa.launchpad.net wheezy/main Translation-fr_FR
Ignoré ppa.launchpad.net wheezy/main Translation-fr
Ignoré ppa.launchpad.net wheezy/main Translation-en
Atteint ftp.fr.debian.org wheezy-updates/main i386 Packages/DiffIndex
Erreur ppa.launchpad.net wheezy/main Sources
404 Not Found
Ignoré debian-multimedia.org wheezy/main Translation-fr
Erreur ppa.launchpad.net wheezy/main i386 Packages
404 Not Found
Atteint ftp.fr.debian.org wheezy-updates/contrib i386 Packages
Ignoré ppa.launchpad.net wheezy/main Translation-fr_FR
Ignoré ppa.launchpad.net wheezy/main Translation-fr
Ignoré ppa.launchpad.net wheezy/main Translation-en
Atteint ftp.fr.debian.org wheezy-updates/non-free i386 Packages
Atteint ftp.fr.debian.org wheezy-updates/contrib Translation-en
Atteint ftp.fr.debian.org wheezy-updates/main Translation-en/DiffIndex
Atteint ftp.fr.debian.org wheezy-updates/non-free Translation-en
91% [En cours]W: impossible de récupérer ppa.launchpad.net/efl/trunk/ubun … ce/Sources : 404 Not Found
W: impossible de récupérer ppa.launchpad.net/efl/trunk/ubun … 6/Packages : 404 Not Found
W: impossible de récupérer ppa.launchpad.net/webupd8team/y- … ce/Sources : 404 Not Found
W: impossible de récupérer ppa.launchpad.net/webupd8team/y- … 6/Packages : 404 Not Found
W: impossible de récupérer deb.opera.com/opera/dists/lenny/ … 6/Packages : 404 Not Found
W: impossible de récupérer debian-multimedia.org/dists/ … 6/Packages : 404 Not Found
E: Échec du téléchargement pour certains fichiers d’index. Soit ils ont été ignorés, soit les anciens fichiers ont été utilisés à la place.
E: Impossible de reconstruire le cache des paquets

carlos@nexus:~$ mysql_secure_installation
bash: mysql_secure_installation : commande introuvable
carlos@nexus:~$ sudo aptitude dist-upgrade
Aucun paquet ne va être installé, mis à jour ou enlevé.
0 paquets mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
Il est nécessaire de télécharger 0 o d’archives. Après dépaquetage, 0 o seront utilisés.

:~$
[/quote]

Salut,

Pour faire court.

# aptitude install mysql-server-5.5
# aptitude install apt-file

[quote=“nereu”]
[strike]http://ppa.launchpad.net[/strike] wheezy/main Translation-en

[strike]http://ppa.launchpad.net/efl/trunk/ubun … ce[/strike]/Sources [/quote]

Et tu t’étonnes de rencontrer des soucis avec un tel sources.list … À corriger :mrgreen: !

sources-list-au-carre-ou-minimaliste-t5659.html

isalo.org/wiki.debian-fr/L%2 … references

isalo.org/wiki.debian-fr/Sou … _les_bases

wiki.debian-facile.org/manuel:ap … ble_wheezy

isalo.org/wiki.debian-fr/in … urces.list

$ ls -al /etc/apt/
$ ls -al /etc/apt/sources.list.d
$ cat /etc/apt/sources.list
Merci!

Donc, si J'ai bien compris, on peut altérer le fichier sources.list en terminal comme tu as indiqué? Car j’avais l'habitude de le faire en environnement graphique.
Avec tes commandes, le fichier s'est trouvé modifié.
On va voir maintenant si tout redevient comme avant.
Merci encore.

Merci!

Donc, si J’ai bien compris, on peut altérer le fichier sources.list en terminal comme tu as indiqué? Car j’avais l’habitude de le faire en environnement graphique.
Avec tes commandes, le fichier s’est trouvé modifié.
On va voir maintenant si tout redevient comme avant.
Merci encore.

Salut,

Comment cela ?

Voudrais tu t’en expliquer … :083

:017

]Salut
Je me suis peut-être trompé.
Tu m’as dit de corriger mes sources.list, et m’as donné quelques commandes, que j’ai utilisé.
Or voici mon fichier de sources.lits. Ou est l’erreur? Il n’y a pas de launchpad.

[quote]Debian stable - dépôts officiels

deb ftp.fr.debian.org/debian/ stable main
deb ftp.fr.debian.org/debian/ stable-updates main

deb security.debian.org/ stable/updates main

Debian Wheezy - dépôts officiels

deb ftp.fr.debian.org/debian/ wheezy main contrib non-free
deb ftp.fr.debian.org/debian/ wheezy-updates main contrib non-free

deb security.debian.org/ wheezy/updates main contrib non-free

multimedia

deb debian-multimedia.org wheezy main
[/quote]

Bonjour
Hier, J’avais oublié d’ajouter le fichier des sources.list que j’ai ajouté aujourd’hui.
Cependant, il continue d’avoir de problèmes, alors que mon Debian étais le système le plus stable.
Maintenant, par exemple,je n’ai pas d’accès à mes autres disques, alors que je n’ai rien fait là-dessus.
Encore, hier soir, Je n’ai pas pu entrer, il acceptait mon mot de passe mais ne démarrait pas.

Salut,

Corriges ce dernier par ce qui suit.

[code]## wheezy
deb http://ftp.fr.debian.org/debian/ stable main contrib non-free
#deb-src http://ftp.fr.debian.org/debian/ stable main contrib non-free

wheezy security

deb http://security.debian.org/ stable/updates main contrib non-free
#deb-src http://security.debian.org/ stable/updates main contrib non-free

wheezy update

deb http://ftp.fr.debian.org/debian/ wheezy-updates main contrib non-free
#deb-src http://ftp.fr.debian.org/debian/ oldstable-updates main contrib non-free

Blackports

#deb http://ftp.debian.org/debian/ wheezy-backports main contrib non-free

wheezy multimedia

deb http://www.deb-multimedia.org stable main non-free
#deb-src http://www.debian-multimedia.org/ wheezy main
[/code]
Suivit de la mise à jour du cache et upgrade, si tu rencontres un souci, fais nous part du retour console complet de cette dernière.

[code]# aptitude update

aptitude upgrade[/code]


En mode simulation full-upgrade.

à remplacer par

Ce n’est certes qu’un commentaires, mais autant qu’il soit correct!

Merci et bonjour
J’ai fait ce qu’on ma demandé de faire. Je vais voir comment ça marche. Je dirai si ça marche mal encore.