Posts

Showing posts from April, 2019

Mysql 5.7.x password policy lavel change

Image
I installed ubuntu 18.04 and installed LAMP stack on it. When i created database there was no problem but when i tried to grant privileges to a db user, i got warning and did not succeed with query. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements So here is the solution for you - From mysql version 5.7.x to above default global password validity variable validate_password_policy  is medium and hence this was happens . So i changed the level to low. mysql> SHOW VARIABLES LIKE 'validate_password%'; +--------------------------------------+--------+ | Variable_name | Value | +--------------------------------------+--------+ | validate_password_dictionary_file | | | validate_password_length | 8 | | validate_password_mixed_case_count | 1 | | validate_password_number_count | 1 | | validate_password_policy | MEDIUM | | validate_password_special_char_cou...

Encrypting your shell script in linux using shc utility

Image
Unix or Linux admin often used various shell script to perform automation in project or meaning to reduction in efforts. this is a very good practice for projects and in it helps admin a lot. But some time an admin dont want everyone to see what codes he used to write. A shell script normally a text file of a group of command sequence to perform specific task and hence it is very obvious that any one can read this test file and can find what is written in script and can understand the logic. So here is an option if an admin dont want to show is codes to some one but want to give ability that some one can execute his script for performing the same task. shc is an option. shc encrypts the shell script and it turns into binary mode which cannot be read. Lets understand how we can use it. I have one script for getting VM ip's from my KVM host machine . # vim getvmip content of script is as bellow - #!/bin/bash VMMAC=$(virsh dumpxml $1 | grep "mac address" | ...