Linux System Administration: A User's Guide
The reason for a good password goes right back to my description of the password file earlier in the book, specifically as it relates to the password field in nonshadow files. Here's a quick reminder of the format:
The password field (field 2) is encoded by virtue of a hashing algorithm. If you are curious as to the gory details, type <@cxb>man crypt<@$p> and you'll find everything you ever wanted to know about encoding passwords. The short form is this: that strange password is actually a coded version of your password based on a two-character, randomly generated salt. This salt is then used to seed the hashing routine to generate the final group of characters.
The term hashing represents a technique for taking a string of characters (a person's last name, for instance) and generating a unique key (ideally) for easy retrieval of the information from a database. What you are doing is encoding the normal text into a shorter, (usually) numeric representation.
Password crackers figure out passwords by using that salt to generate passwords against every word in the dictionary. While this sounds pretty complex, it's not. A simple program calls the crypt routine, runs the hash on a word and then compares it to the password entry in the /etc/passwd file. If it matches, bingo! They have your password. If it doesn't, they move on to the next word. On a reasonably punchy system, it doesn't take all that long for crackers to work their way through every password in the book.
Don't believe me? Take a look at the output in Figure 1 from a little program called Nutcracker, a freeware tool that does the kind of brute-force password checking I was talking about.
As you can see in Figure 1, picking something you'll remember easily because it is a common word is a bad choice for a password.
Have a look at what happens when I log in to a machine. Everything looks normal. I have a login name, a request for my password. I enter the password and voilà, I am in. But hold on—read that little one-line message that appears after I enter the password:
login: mgagne Password: Last login: Mon Jan 8 16:00:39 from energize
What the heck is “energize”? Energize is the hostname of the computer from which I last logged in apparently, except I don't have a system called energize. Furthermore, let's pretend that I don't know anyone with that system and I always log in from the same place. The only explanation is that somebody from a system called energize logged in to the server with my login name and password.
This is just a hypothetical situation, but it does illustrate one other habit that you should consider training your users to adopt. If they are logging in from the same PC day in and day out, that message should never change. If they do not recognize the hostname in the last login message, they should make it a policy to alert you.
Security isn't just the domain of the system administrator. After all, you've got plenty on your hands. Any help is appreciated. You need to get the users involved. Let them know that system security is their business as well as yours.
Marcel Gagné (firstname.lastname@example.org) is president of Salmar Consulting, Inc., a systems integration and network consulting firm and the author of Linux System Administration: A User's Guide, published by Addison-Wesley.
|Contrast Security's Contrast Enterprise||Aug 30, 2016|
|illusive networks' Deceptions Everywhere||Aug 29, 2016|
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Contrast Security's Contrast Enterprise
- illusive networks' Deceptions Everywhere
- Happy Birthday Linux
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- New Version of GParted
- All about printf
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- Tech Tip: Really Simple HTTP Server with Python
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide