The customer I’m working for in these days, asked me to reset a hunderd of iDRAC consoles root password because they were still using the default root/calvin credentials.
Having fun for this request, I wrote a perl script using Net::OpenSSH module. This script checks for root account index, and it changes the password using this index. If something does not work as expected, the script will let u know on which host it faced the issue.
It’s very easy to use, for example:
$ perl idrac_pwd.pl 188.8.131.52
Connection to host 184.108.40.206
Reset password succesfully executed on 220.127.116.11 – index 2
You can download the script here.
Have fun 😀
Today i needed to understand if a Perl installation was 32 or 64 bit.
Looking on the web i found that is possible to know this even using perl command itself , as follow:
system2 # perl -V:use64bitall
system2 # perl -V:use64bitint
With these commands there are 2 possibilities:
define = says “yes”
undefined = says “no”
So , where i ran these commands Perl running was in 32 bit.
Today in my free time at job , i wrote a perl script that works as uniq command:
[cr@eseross01 tmp]$ cat test
The test file contains three “alessio” , so this string is replicated.
I run my script on this file:
[cr@eseross01 tmp]$ perl uniq.pl test
He returns the singles strings!
The code is here