Betting My Future

October 15, 2014 · Posted in Uncategorized · Comments Off 

Friends, readers and other animals. Let me communicate some exciting news: After more than 6 years at Ingenico, I’m off! I have accepted a position at BetVictor to help them maintain their infrastructure, so I’m moving to Gibraltar.

I think this is going to be a lot of fun. Hoping to have my internet connection at home to feed you with fresh news.

> reboot

June 16, 2014 · Posted in Andrade · Comments Off 

 

I started this site almost five years ago, since then a lot of things have happened. But I couldn’t keep the blog updated due a lot of different excuses reasons: family, work, studies… and mainly a lack of constancy. But now I have the commitment to change this.

Now it is time for a reboot and to do everything different, I’ll try to share everything to force myself to get things done. In this time I’ve found what best works for me is constantly challenge myself, and that is what I will do.

It is time to go back to college and finish my degree, it is time to get that certification, it is time to improve my English and learn other languages, and it is time to explore new places. One challenge at a time.

And I am starting today.

 

Rebooting

Matt’s Book Club

September 9, 2012 · Posted in Books · Comments Off 

The Super-Sysadmin Matt Simmons has created an IT book club called The On-Call Pagers (awesome). I have the intention of participate in this club if I find time for it, and encourage you to do the same. The more people participate, the better. Computer Book

In fact,  I have a couple of books to suggest:

1. Learning the Vi and Vim editors
Besides improves our skills with this editor, Vim donates part of their benefit to ICCF, an NGO that helps the children in Uganda.

2. Perl for System Administration
Like a system administrator Perl can make your life easier. If you have some knowledge of Perl this book teaches you how apply it to your day-to-day work, if not it’s time to learn and improve your performance.

A lot of ideas are emerging around the club, a forum to discuss the books sounds good.
What are you waiting for? Join The On-Call Pagers!

Shell: Extract the last character from a string

April 12, 2012 · Posted in Scripting, Shell · Comments Off 

With the command ‘cut’ it is easy to extract the first, second, third or any character of a string.

$ echo qwerty | cut -c 1
q
$ echo qwerty | cut -c 2
w
$ echo qwerty | cut -c 3
e

But this is not useful if you want to extract the last character of the string without know the lenght of it. To do it the first thing is know the position of this character. You can do this with the ‘#’ modificator to get the size.


$ word="qwerty"
$ echo ${#word}
6

Now you can use this tip to extract the last character.


$ echo $word | cut -c ${#word}
y

 

100 Reasons Why You Can’t Find Your System Administrator

June 20, 2011 · Posted in BOFH · Comments Off 

1. They are hiding under the stairs
2. They are on holiday for the first time in 5 years
3. They are in the cellars conducting the rituals to keep the machines running
4. They are in hospital suffering from an overdose of caffeine
5. Taken away by the police after killing the last user who asked a stupid question
6. You *have* a system administrator ?
7. You walked past the table they were gibbering under
8. The Sysadmin has built a maze with the door to their office at the center
9. You *are* the system administrator
10. You missed seeing the system administrator asleep under their desk
11. The admin is chained to their desk in a dungeon only the CEO has the key for
12. The admin’s off explaining to the management why they need an assistant.
13. The admin is suffering so bad from sleep deprivation that they may as well not be there for all the sense you can make of the words they are saying.
14. You are afraid that the admin will use you as a punch bag so you are searching for them, but desperately pray that you don’t find them.
15. The admin came to work disguised as a tea boy to avoid talking to users
16. The admin electrocuted themselves whilst installing some cabling near the main power cable. Since the admin’s body is the only thing keeping the power flowing, the management boarded up the body and pretended they still had a system administrator
17. The admin is stuck in a lift shaft pulling network cable to another floor
18. The admin is getting Jolt out of their under-floor cache
19. The admin is hiding on the roof
20. The admin is looking up the BOFH excuse of the day.
21. The admin is out buying some caffeine.
22. The admin is busy installing xfishtank on the main file server.
23. The admin is out buying refills for the Nerf(TM) crossbow.
24. The admin is locked in the computer room playing Deathmatch.
25. The admin is booted to DOS and is playing doom across the network.
26. The admin went to Stop&Go to get ANOTHER case of insert favorite caffeinated beverage here
27. The admin went to the room with padded walls that nobody dares open when the door’s closed
28. The admin managed to find time to sleep for an hour or two
29. The admin just found out he had a two-month-old child, and is getting re-acquainted with his SO (and the new child)
30. The admin is playing netrek
31. The admin is in the hospital after being severely injured by a falling soda can mountain
32. The admin is closeted with boss trying to explain why (s)he uploaded a user to seven.rings.of.hell.com
33. The admin is at the hospital having his/her fingers splinted after typing 100 times “NO, you cannot use your old address after our domain name changes. Please go read the announcements that we have been posting for the last three months.”
34. The admin is catching twenty winks under the floorboards, tread gingerly
35. The admin is watching the building electrician trip a circuit breaker that will reduce the company ‘frame to rainbow-colored slag
36. The admin is out by the turnpike waiting for a case of Jolt to bounce out of the truck after it hits the speed bump
37. The admin is out back beating a luser into corn mash who asked “When will the system be back up” one time too many
38. The admin finished a double shift and is out back wondering what that big burning ball in the sky is
39. The admin is busy packing up to go to a site that has contemporary hardware
40. The admin is engaged in a staring contest with a pack of evil dogs
41. The admin is on the phone trying to talk his wife out of buying a house without ISDN
42. The admin is sitting under the desk, hysterical at what the (l)user just asked
43. The admin is at the pub, it’s all *too* much
44. The admin is standing behind you, holding an axe
45. The admin resigned in disgust five minutes ago
46. The admin is in a meeting with the boss to discuss poor user response times
47. Just look up at the ceiling (Think ‘Aliens’)
48. The admin can’t be reached via phone or e-mail because (s)he is too busy on Usenet telling everybody how busy (s)he is or thinking up 101 reasons why (s)he can’t be found
49. The admin is hiding under a table so that (s)he will not be the one sitting for hours watching Ultrix reinstall from a single-speed CDROM because the users who inexplicably have root access have destroyed the file system again during a misguided attempt to “improve” /etc/rc by repartitioning the disk at boot time “so that it doesn’t forget”.
50. We have a ‘secure room’ here – bloody great lock on it. I hide in there
51. The Grey Wall(tm) has fallen on them and no one has noticed their absence. [clunk....clunk...help!....anyone?]
52. They’ve gone to find some more coffee. Sysadmin has left the building!
53. They’ve snapped, started muttering about “this damned post office”, and left for the nearest gun store
54. They’re out on an interview
55. They’re seeing a therapist who doesn’t have any computers in their office, a non-threatening place
56. They’ve gone to a computer museum to beg for parts for the PDP-10s running the place (ala Compuserve)
57. They’re out looking for an ad in any media where DEC mentions OpenVMS
58. They’re planning where to be on 01/01/2000, when all of the MVS systems, and some older minis in mission-critical applications like process control turn to crap. They may be shopping for a bomb shelter if SAC’s launch control systems only have a two-digit year.
59. They’re at a travel agent’s, booking a vacation to friendlier place, like Iraq
60. They’re out fomenting rumors that the Windows 95 cd-roms have the Church of Scientology’s copyrighted teachings hidden on the disk
61. They’re meeting with Guido, to put out a contract on the parties that started the open systems myth
62. They’ve gone to Oklahoma City, to enroll in the FAA’s Air Traffic Controller training program, to start a less-stressful career
63. They’re seeing a commodities broker, to arrange direct deposit of their paychecks into buying coffee bean futures.
64. /pub/lunch
65. Look better. He/She is probably in the basement somewhere behind the modem racks
66. The admin finally took a day off
67. It’s 9 AM. He/she is not working that late.
68. Vendor demonstration
69. Convenience store across the street opened
70. Pizza delivery is at the front door
71. The admin is sleeping under the floor tiles
72. The admin is on some floor, in some wiring closet, trying to fix things
73. The admin is in the dumpster behind the building trying to get rid of some frustration by using a sledgehammer on the Macs
74. The trauma induced by repeated attempts to install Solaris 2.5 pre-beta on an Intel system has forced him to seek psychotherapy
75. The admin is still trying to come down from inhaling too much tape head cleaner
76. The admin is out chasing the rodents off of the twisted pair/power lines
77. The admin has gone home to sleep (1st time in x days)
78. The admin has been convicted of computer crimes
79. What was your username?
80. The admin is emptying the bit buckets
81. They finally caught him/her for that big site-massacre (s)he thought (s)he’d gotten away with
82. ObReason n+x: Your system administrator is walking in circles outside saying “TUESDAY? They want it by TUESDAY? TUESDAY?”
83. rcp $FAV_RESTAURANT:$FAV_FOOD /dev/stomach
84. The admin is hiding in wiring closet
85. The admin is outside having a smoke because it’s illegal in the building
86. The admin is on the roof of the building, contemplating jumping
87. The admin is on the roof of the building, contemplating which users to throw off
88. The admin is on the roof of the building, contemplating traffic
89. The admin is on the roof of the building, contemplating
90. The admin is in his/her manager’s office, trying to explain why the manager gets lots of calls from lusers who can’t find the Sysadmin
91. The admin is in his/her manager’s office, trying to explain why the “real” (programming) work doesn’t get done. Manager doesn’t understand — when he gave you this job, he said it would only take a couple of hours a week….
92. The admin is in luser’s office, trying to explain why “export VAR=xxx” from one xterm window doesn’t have any effect on the other windows. “But they’re all on the same Xstation — what’s the problem?”
93. The admin is down in the administrative offices fixing one of their DOS boxes
94. The admin is out getting a caffeine fix
95. There’s more caffeine than blood in his veins, and he was last seen hopping down the hall pretending he was a pogo stick
96. The admin is too busy playing with the Web
97. …reading news
98. …sleeping
99. …reading other peoples email (not that I do this…)
100. …installing the latest Xgame on the main fileserver (this is real cool)

The Story of Linux (20th Anniversary)

June 17, 2011 · Posted in Events, Linux · 1 Comment 

Upgrade mod_ssl version on Solaris 10

November 4, 2010 · Posted in Apache, Solaris · Comments Off 

Due to some vulnerabilities in the mod_ssl modules compiled with OpenSSL prior to 0.9.8n I have to upgrade it in my systems.  I have web servers running Apache 2.0.59 and 2.2.15, but there are not mod_ssl.so binaries available to download for this versions, so I decided to compile my own modules.

The first of all is upgrade the OpenSSL, my systems are Solaris 10 with OpenSSL 0.9.7d. In Sunfreeware there are 0.9.8o and 1.0.0a versions but Apache 2.0/2.2 is not compatible with OpenSSL 1.0.0 then we should use 0.9.8o.


# wget ftp://ftp.sunfreeware.com/pub/freeware/sparc/10/openssl-0.9.8o-sol10-sparc-local.gz
# gunzip openssl-0.9.8o-sol10-sparc-local.gz
# pkgadd -d openssl-0.9.8o-sol10-sparc-local

Now we have OpenSSL 0.9.8o installed and we need the source of our Apache version (for me it’s 2.0.59 and 2.2.15), you can download it from here, and if you have a modern version here.

Downloading:
# wget http://archive.apache.org/dist/httpd/httpd-2.0.59.tar.gz

Unpacking and configuring:
# gunzip httpd-2.0.59.tar.gz
# cd httpd-2.0.59
# ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http

Where --prefix=/usr/local/apache2 is the apache installation directory and --with-ssl=/usr/local/ssl is the OpenSSL 0.9.8o directory.

Compiling:
# make

Now we already have the mod_ssl.so in httpd-2.0.59/modules/ssl/.libs/mod_ssl.so, copy it to /usr/local/apache2/modules/ (or your installation directory) and restart the apache server.

Adam Leventhal leaves Oracle

August 19, 2010 · Posted in News · Comments Off 

Adam Leventhal is one of the three authors of Dtrace, a dynamic tracing facility in Solaris 10. In this post he announces that August 20th is his last day in Oracle.

Why are Adam (and others engineers) leaving Oracle? May be they just need a change of scene or they don’t like something about Oracle?

Community and communication

April 27, 2010 · Posted in Quotes · Comments Off 

The words “community” and “communication” have the same root. Wherever you put a communications network, you put a community as well. And whenever you take away that network — confiscate it, outlaw it, crash it, raise its price beyond affordability — then you hurt that community.

from the book “The Hacker Crackdown”.

Enable security using user/pass on jxm-console

April 16, 2010 · Posted in JBoss · Comments Off 

jmx-console

The jmx-console is a administration tool of JBoss. Through it you can set-up the application, change values and start/stop the JBoss.

One of my servers had a Jboss running but without access control, it was a high security error because anyone in the network can login the console.

To fix this you have to edit the next files:

1. /jboss/server/default/deploy/jmx-console.war/WEB-INF/jboss-web.xml

<jboss-web>
   <!-- Uncomment the security-domain to enable security. You will
      need to edit the htmladaptor login configuration to setup the
      login modules used to authentication users.
      <security-domain>java:/jaas/jmx-console</security-domain>
   -->
</jboss-web>

and uncomment

<jboss-web>
   <!-- Uncomment the security-domain to enable security. You will
      need to edit the htmladaptor login configuration to setup the
      login modules used to authentication users.
   -->
      <security-domain>java:/jaas/jmx-console</security-domain>
</jboss-web>

2. in /jboss/server/default/deploy/jmx-console.war/WEB-INF/web.xml look for

<!-- A security constraint that restricts access to the HTML JMX console
   to users with the role JBossAdmin. Edit the roles to what you want and
   uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
   secured access to the HTML JMX console.

   <security-constraint>
     <web-resource-collection>
       <web-resource-name>HtmlAdaptor</web-resource-name>
       <description>An example security config that only allows users with the
         role JBossAdmin to access the HTML JMX console web application
       </description>
       <url-pattern>/*</url-pattern>
       <http-method>GET</http-method>
       <http-method>POST</http-method>
     </web-resource-collection>
     <auth-constraint>
       <role-name>JBossAdmin</role-name>
     </auth-constraint>
   </security-constraint>
    -->

also uncomment

<!-- A security constraint that restricts access to the HTML JMX console
   to users with the role JBossAdmin. Edit the roles to what you want and
   uncomment the WEB-INF/jboss-web.xml/security-domain element to enable
   secured access to the HTML JMX console.
   -->
   <security-constraint>
     <web-resource-collection>
       <web-resource-name>HtmlAdaptor</web-resource-name>
       <description>An example security config that only allows users with the
         role JBossAdmin to access the HTML JMX console web application
       </description>
       <url-pattern>/*</url-pattern>
       <http-method>GET</http-method>
       <http-method>POST</http-method>
     </web-resource-collection>
     <auth-constraint>
       <role-name>JBossAdmin</role-name>
     </auth-constraint>
   </security-constraint>

3. Finally, to set the password of ‘admin’ user change in this file.  /jboss/server/default/conf/props/jmx-console-users.properties

admin=admin

for

admin=new_pass

Next Page »