I just run executable resource in Puppet and could not run successful. Here is content of Puppet file.
root@puppet:/etc/puppet/manifests# cat exec.ppexec { 'generating file': cwd => '/tmp/', command => 'for i in {1.2}.txt; do touch $name; done', creates => '/tmp/1.txt',}
root@puppet:/etc/puppet/manifests# puppet apply --noop exec.ppNotice: Compiled catalog for puppet in environment...
[HOW TO] create a shadow hash of password
Sometimes, you may need to create a critical script to change the password of root or another user. Of course, you don't use the clear text of password. It is very risk and can leak. Then, what should we do on this case?
I want to bring you focus /ect/shadow. For sure, it is salted hash file where stores all of user's password. And it already hashed.
It looks like this
catrulez:$6$3lOhJgJD$lUKZ0Q9LHT6YO3u1pS/0hM9yJOYTkqOh/XaR2O5xYwaPKI6TWIOEjYQSsa2XWJI7Ty.i2XQmHVdqNZDnGYiUT.:17482:0:99999:7:::
and
$6$3lOhJgJD$lUKZ0Q9LHT6YO3u1pS/0hM9yJOYTkqOh/XaR2O5xYwaPKI6TWIOEjYQSsa2XWJI7Ty.i2XQmHVdqNZDnGYiUT
is...
[HOW TO] black list Postfix
Once upon a time I met a problem with Postfix. The customer sent to me the ticket, in this she told me that she received many email spams from @e-m-a-i-l.com
Politely I said to her that I will find the solution for this case. So, she can save time. I drank a cup of water before discovering.
In the first, I have to check the log to find the exactly email who is spammer?
So easy, because the...
[HOW TO] get the server ID in MySQL
Sometimes, you have to know the Server ID of MySQL, and you don't know how to get it?
Here I show you.
What is Server ID?
Server always use in MySQL Replication. It defines in numeric to classify the server.
As always, server ID 1 is master server. Then server ID n+1 is slave server.
How to find it?
You use below MySQL command
# Get MySQL server_idmysql> SHOW VARIABLES LIKE 'server_id';+---------------+-------+|...