I love mythology and there's nothing like hearing a technology myth to make my day complete. Just today someone applied one of the following myths in a conversation with me. I didn't say anything but it gave me the idea for this post. Here are the five myths related to *nix systems that I hear most often when dealing with technical and non-technical people alike. You'd be surprised as to how often even the most technical people spout these myths to each other and to the unsuspecting and unknowledgeable bystander. I have to bite my tongue when I hear them. And now that you know them, I hope it ruins your day too when someone slips into mythland with one of these gems.
They are in reverse order of how much they irritate me. Enjoy.
5. Logging in as Root - The long-held myth that you should never login as root is ridiculous. The logic goes something like this: Login as a standard user, then su to root or use sudo to run something as root. Yes, it's safer to do so but not by much. If you su to root, then you are root. If you use sudo then you are executing a program, editing a file or doing whatever it is you're doing as root.
Should you disable the ability to ssh as root? Yes.
Should you never login as root to a system? No.
Should you always use sudo to perform single commands as root? If you're afraid of what you might do. But there's a caveat with sudo too. If you're actively doing things with sudo, you only have to enter your password once during a session, unless you walk away or take a five minute break, then you'll be prompted again for it.
If you're careless, you're going to make unrecoverable errors regardless of using su or sudo. Be careful.
4. su is SuperUser - OK, so this is a light myth but it's one worth busting. So many people use this term incorrectly that it is almost acceptable terminology. The term su does NOT mean superuser (super user). It means substitute user. It is used to login as another user though many use it for logging in or taking on the characteristics of the root user.
And for those who still don't believe me, this is from the su man page:
su - run a shell with substitute user and group IDs
There is no superuser. There are users and the root user. And there's no substitute for those terms.
3. *nix Systems Can't Get Viruses - This myth is a bit gray for some people. A *nix system can get viruses under certain circumstances. A virus is a computer program that can copy itself to other computers thereby infecting them with a harmful or potentially harmful payload. One of the circumstances where *nix systems could get viruses is where a user has access to a *nix system and other *nix systems on the same network. This user could deploy a computer program that would replicate itself and deliver its payload on all the systems. The virus would be even more effective if the user account has or gained root user access and wrote to cron to fire itself at a specific time and date. Once the payload is delivered, it would erase its tracks and itself.
So, to say that it's impossible for *nix systems to have viruses is incorrect. It isn't common but it can happen. And, yes, even the beloved Mac is susceptible and it is now *nix-based.
2. *nix Systems are More Secure - This is a very common myth that swirls around *nix systems and I don't expect that my entry here will make it go away. Any system can be insecure or can be made to be very secure. It has nothing to do with the operating system. It has everything to do with how that operating system is implemented. I had a co-worker with a FreeBSD system that was hacked. FreeBSD is well-known for its heightened security. But it takes some careful thought about what you're doing. It takes patching, updating and upgrading to prevent security issues. It also takes vigilance to make sure your systems are up to date and not compromised.
Remember that no system is completely secure. We used to say the only way to secure a system is to unplug it but that isn't true either as someone can still pick it up and carry it away. Don't forget physical security.
1. You Never Have to Reboot - I love this one. Every uninformed *nix nerd in the world will tell you that you never have to reboot a *nix system. It's laughable, really. For those of us who exist in the real world, you know that you have to reboot, and should, on a regular basis. Some enterprises reboot their systems weekly, monthly or quarterly. Where I currently work, it's quarterly.
There are good reasons for rebooting and some of them are: hardware maintenance and upgrades, kernel changes, major patches, getting rid of zombie processes, diagnostics and memory refresh.
I once used an Oracle database server (Solaris) that had an uptime of about 5 years, which is really, really stupid and here's why. The system administrators needed to do some major patching on that system but were afraid since it had been up so long. The system also needed a memory upgrade because it was 'thrashing.' Add thrashing to the list of reasons to reboot.
Once the system was patched and rebooted, there were lots of errors. Lots and lots of errors. Problems that had amassed over the last few years that, if taken one a time, could have been solved but after we saw what had happened, no one could determine what to do next. We upgraded the RAM and restarted the system. It kept failing and finally was decommissioned and replaced.
The moral to the story is that responsible system administrators would have done their due diligence (and their job) and maintained that system appropriately. Yes, you do, in fact, need to reboot your *nix systems.
Do you have any other technology myths that you can add to the list?