Morning,
Sometimes, you want to have a specified mount point for backing up. But, you could not find any free mount point.
Also I explain why do we need to have a specified mount point.
1. To mark as a backup mount point other purpose, then nobody have a mistake with this.
2. Clearly mount point for managing
So, why did I us "loopback file?
Using "loopback file", I...
[HOW TO] Puppet Validation of Exec[generating file] failed: '....' is not qualified and no path was specified. Please qualify the command or specify a path
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';+---------------+-------+|...
[How To] show multi core of CPUs in Linux "top" command
I believe you did think about how to show multi core of CPUs in "top" command. Don't amaze :D
In fact, "top" only shows CPU usage as a percentage of a single CPU by default. Luckily, you can change this by pressing "1" to show break the CPU usage per CPU.
Easy to understand, easy to do.
top - 03:35:08 up 48 days, 22:30, 2 users, load average: 104.92, 91.69,...