Super User to the Rescue

In last week’s article I mentioned a special command that requires a password to perform certain tasks. This week I’d like to talk about that command a little. It is called “sudo”. It is both an acronym for the expression Super User DO and also the “su” and “do” commands put together. The first part, “su”, is the power part. It enables you to enter commands as what is known as the superuser or root user. The superuser can do anything, which is both is power and danger. When you enable as superuser you will be warned up front that you are now capable of destroying your system with ease. While you are always required to enter your password when enabling as superuser, you only get the warning once. After that they assume you are on board with being responsible for your system. The warning is pretty dry at this point, but in the past the text looked like this:

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these two things:

#1) Respect the privacy of others.

#2) Think before you type.

Kind of friendly and humorous. And kind of sad that level of humor seems to be gone from OS X at this point. On to the second part- “do” is what it seems like. It is an action command. So together you get “sudo” or SuperUserDO. One might ask why bother to use “sudo” when you could just use “su” and then type in your commands? From a caution point of view “sudo” provides some benefits- it times out after 15 minutes, after which it requires you to enter your password again. So it’s OK to walk away and forget you were logged in as root, because after 15 minutes you revert to your normal status. The “sudo” command is a great tool to accomplish tasks normally not allowed in terminal, such as changing permissions and ownership of certain files and moving things you normally couldn’t. For more information see the wikipedia page on “sudo”, and next week we’ll look at some tasks that require the use of this powerful command.

Thanks

Similar Posts

  • AirPlay v. Bluetooth Wireless Audio

    AirPlay v. Bluetooth Audio: Which one is for you? AirPlay – AirPlay is a technology invented by and used by Apple to let…

  • Complex Problems Often Have Simple Solutions

    A long time ago while working for Radio Shack, a co-worker gave me a series of motivational tapes by Joel Weldon. One of the more important passages began with “Elephants don’t bite”–the big things usually aren’t what get you. Typically it’s the gnats, the horse flies, the bees, the mosquitoes–tiny as they are, they can be quite annoying. The little, seemingly insignificant things can cause more problems than one would think. Over my first few weeks as a tech here at Small Dog, I have learned that you can never overlook or discount the little things.

    Sure, that sounds great, but how does that help someone who is trying to troubleshoot a computer with a nagging problem? One way is to take your large problem (it doesn’t boot and I have homework to do!) and break it down into a series of smaller, simpler possibilities.

    We all laugh when we read the tech support horror stories about the guy who spent two hours troubleshooting a computer only to find that it wasn’t plugged in, hence the reason that obvious question is always asked first when you call for help. Techs I have worked with over the years absolutely hate it when I suggest obvious solutions, but I do it because sometimes the answer is so obvious we skipped over it because it was so simple. We get so used to dealing with difficult problems with complex solutions that we forget to try the quick fixes first. Before cracking the case to test a suspected faulty power supply, check the easy (small) things such as plugging something else into the wall outlet or the power strip to make sure that works. Power strips are designed to fail before the equipment plugged into it, so it is entirely possible that a brownout could have taken it right out. It’s a quick and cheap fix if that’s what happened, so it makes sense to try it first.

    Another example from an incident that happened this week in Manchester: you have a MacBook that won’t recognize the hard disk. Disk Utility will not mount it, and may not even see it at all. The assumption? Dead hard drive. So you pull it out and replace it, fire up the OS X Install DVD, and the drive isn’t recognized. Pull the new drive out, plug it into an external connector and it works. Okay, maybe the drive is flaky, so try another drive…and the same thing happens. Given this, what’s the next thing to replace? The logic board? Costly, and time consuming. By now, perhaps some have already screamed out the answer: a bad connector cable. A seemingly minor thing that is often overlooked because, well, it’s just a cable, so what could go wrong with it?

    Take care of the small things, and the big ones often take care of themselves.

  • The Crypto Craze Part One: Overview

    Between work, band practice, recording, and going on those gorgeous autumn hikes, I’ve been spending a solid chunk of time familiarizing myself and delving into the science and application behind the digital currency craze known as Cryptocurrency. Unless you haven’t been on the internet in the last 5 years, you’ve no doubt heard of Bitcoin, the first and still most important cryptocurrency out there. But while a lot of us have heard of it, some may find themselves asking…

    What is Cryptocurrency?

    You’ll get a different answer from each person you ask, and some may give a lengthy response that still leaves you scratching your head. But the simplest definition of cryptocurrency is that it’s a form of digital money that is designed to be secure and anonymous.

    Full disclosure: the theories, protocols, applications, and sciences behind cryptocurrencies vary between the various types of cryptocurrency (Last documented number of cryptocurrencies was clocked at over 900 and still growing!). For the sake of these guides, I’ll be referring specifically to Bitcoin. And another warning: this stuff is dense, but throughout this series, I’ll do my best to make it palatable.

    While the boom of cryptocurrency (henceforth called simply ‘crypto’ in these guides) is not new, it only truly took off within the last ten years. Throughout the early 2000’s, there were a number of attempts to create a digital currency system (see: Digicash) that ultimately failed. It wasn’t until late 2008 that the concept of crypto became more than just a failed pipe-dream.

    In October 2008, an individual, (or individuals, the identity is still debated) using the name Satoshi Nakamoto published a paper on a cryptography mailing list titled “Bitcoin: A Peer-to-Peer Electronic Cash System”. This has come to be known as the Bitcoin “White Paper”. Within the white paper, Nakamoto describes and details the methods of using a peer-to-peer network to generate what was described as “a system for electronic transactions without relying on trust”. By the following January, Nakamoto implemented the Bitcoin software as open source code and released it to the public. The Bitcoin network was born after Nakamoto ‘mined’ the first ever ‘block’ on the ‘chain’, known as the “genesis block”, for a reward of 50 Bitcoin***. Embedded in this first block was the following text:

    “The Times 03/Jan/2009 Chancellor on brink of the second bailout for banks.”

    But wait, block? Mine? Chain? What do these mean, you may be asking yourself? And we will certainly go down that rabbit hole! But I think it’s better left for The Crypto Craze Part Two: Party On The Blockchain.

    Fun fact: 50 Bitcoin would be worth $275,497.50 at the time of this writing.

  • Real time application and routine sequencing

    Terminal and application tracking We have previously covered trace, dynamic trace scripting, in Terminal and the higher powered logging and tracking it provided…