Always check your fingers while being root

ript>

Yesterday, while I was reading some very old magazine articles, I remembered a “horror” story that happened to me a long time ago, when I was learning to administer my first Sun Solaris system. It goes like this…

I was following the instructions to install some new application and I had to add a new user in /etc/passwd file. I kept a backup copy and I started editing it with vi. What I didn’t knew at that time, was that cursor (arrow) keys were not used for moving the cursor and they produced “~” instead. OK, I thought, back to H-J-K-L keys. I added the new user at the end of the file and saved it. I also logged out from my ‘root’ account, as my job was finished.

What I didn’t noticed, when I was fiddling with the cursor keys, was that the first two letters of the username of the first account of the file changed to capitals.

“No big deal”, you might say, except that the first account in /etc/passwd file was ‘root’! And it became ‘ROot’, without noticing it!

Imagine my frustration when I tried to login back to root’s account, without knowing what actually had happen! 🙁

I don’t remember exactly what error messages I saw, but I ended that by rebooting the machine in single user mode, mounting the root partition in a directory and recovering back the root account.

What this little story taught me, was to double-check always what I’m doing as root, especially if the keys I’m pressing don’t have the expected result.


Visit The Light of the LAMP blog for more…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.