MacEdition Logo
 

You have OS X, so now what are you going to do? (Continued)

Back to first page

Feed your power cravings

The Apple folk were thinking when they configured the Setup Assistant for Mac OS X. The user you first set up is the administrator, and has administrator privileges. The administrator has lots of power, but doesn’t have all the power one needs to get down and dirty. Administrators can really only change the system settings of Mac OS X using the System Preferences control panel. To add anything from the command line or modify many directories and files in the OS X file structure, you will need to have “root” privileges. The root, or superuser as some may call it, owns the real rights under any UNIX system. With these rights come the ability to completely FUBAR the system. That is why Apple doesn’t give even the administrator root privileges by default and why I suggested earlier that even the administrator account not get used on a regular basis. Apple prevents people from using “root” by leaving its password null, so it is impossible to login remotely or change the password, even at the command line. In fact, if you think you are smart by giving your administrator the short name of “root” at startup, Apple still only gives “root” administrator privileges and not root privileges. It will also foul up many parts of the system that depend on root having certain privileges. Repeat after me: “Don’t give the administrator the short name ‘root’.” It will break things. You have been warned.

Administrators, however, can change the root password by opening the NetInfo Manager application (located in the Utilities folder in the Applications folder of OS X). To do this, they simply browse over /Users/admin (or whatever you used for the short name of the administrator account) and copy the hex password string value from the list at the bottom of the NetInfo Manager window and paste it into the value of /Users/root. Make sure to save your changes before you exit, as NetInfo Manager doesn’t do it by default. Here are screenshots of the process:

Screenshot of root privileges dialog
(click for full size)

Screenshot of root privileges dialog
(click for full size)

After you set the root password this way, change your administrator password to something else. The root password should be the toughest to crack on your system because of what it can do. Make it longer than eight characters, use both numeric and non-numeric characters and don’t use plain English (or French or Japanese) words. Remember: There is almost no reason to login as root, so don’t do it. However, there will be certain articles on the Web that ask you to “su” at the command line to install software, which drops you into the root account.

If you build it, they will come

If you want to play around with the funkiness that is Mac OS X and UNIX, you are going to need the proper tools. These tools are, of course, the Developer Tools that give you a whole programming environment for both UNIX command tools and Mac OS X tools all in one. Apple has included the Developer Tools CD in the OS X package, and it includes Apple’s Project Builder and Interface Builder along with gnumake and cc, so feel free to jump into Mac OS programming in a way that has never been so accessible to many.

Communicate securely

Everything on the Internet is open for eavesdropping. Mac OS X allows you to do many cool things remotely from anywhere on the Internet thanks to services such as telnet and FTP. As long as you know the IP address of the computer, you can start and stop services and change configurations given some knowledge of the command line. If you choose to send password across the Internet in clear text, you are inviting network snoopers and network spies into the heart of your computer. For this reason, you should never use telnet or FTP unless you have to. Instead, use the SSH suite of tools. From the SSH Website:

OpenSSH is a FREE version of the SSH protocol suite of network connectivity tools that increasing numbers of people on the Internet are coming to rely on. Many users of telnet, rlogin, ftp, and other such programs might not realize that their password is transmitted across the internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other network-level attacks. Additionally, OpenSSH provides a myriad of secure tunnelling capabilities, as well as a variety of authentication methods.

By installing OpenSSH on Mac OS X, you can connect securely to your computer. Apple had included SSH as part of earlier builds of OS X, but left it out of the final release. There is a lot of speculation over why Apple left SSH out, and even more speculation that they will add an SSH installer sometime after OS X comes out. For those of you who can’t afford to wait, there is a very good primer for compiling SSH on your own over at StepWise. At the time of this article, I was still trying to work out the kinks for getting SSH to run on startup. The quick and dirty way is to open the terminal, su into root, type “sshd” at the command line and hit enter. It will start SSH, which will run as long as you don’t restart. (And since this is a UNIX system, why restart? The only time I have restarted OS X was to boot OS 9 to install the AppleWorks patches.) As soon as I debug my script, I will post an update to make the process easier. If you know of a way to get this working, please mail me.

Run X Windows

What is X Windows? From XFree86.org:

XFree86 is the underlying software that is between the hardware and graphical user interface (aka gui) that people see and use. If you are using KDE, GNOME, Enlightenment, Blackbox, AfterStep, twm or fvwm then you are already using and running XFree86 as these run as our clients.

Why would you want to run X Windows? There is a lot of software that runs under UNIX and X Windows that won’t run under Aqua in Mac OS X. While I strongly encourage people to use and build software for OS X and Aqua, there is some software that would take too much effort to port to Aqua if you are not a developer. With XFree86, you can build most any X Windows application, provided you have all of the libraries necessary to build it. (But your mileage may vary.)

More importantly to most people will be the ability to run X Windows applications from remote machines directly on their Macintosh without the use of third-party tools. Lots of universities and research institutions run engineering, statistical and graphical applications by letting people connect remotely. This way, they can maintain the software on one central server as well as concentrate the computing power on one central server. For people who are working with large amounts of data, this is the only way to do things. Since running X Windows on Windows and Mac OS has traditionally been fairly complicated, many places simply drop a Linux computer on a person’s desk if somebody needs to run X Windows apps remotely. For those who don’t have the extra space or money or like the simplicity of doing everything from one computer, X Windows is just for you. To run X Windows under Aqua, you need to make a few changes to the base install. Luckily, the whole process is laid out for you nicely at XonX. The base XonX installation comes with a crappy window manager called twm. If you want something a little nicer and more appealing, try installing WindowMaker. I have listed some instructions for installing WindowMaker and some other things to help you with the X Windows install here.

Want to run Aqua apps remotely? It can’t be done right now, but we can always speculate...

Links for people interested in playing around even more

Bottom line

This article is not intended as a true “review” of OS X, but to give you a way to evaluate the OS on your own. When it comes down to using a computer, only you can be the judge of how it works for you and how it is going to feel to you. OS X isn’t perfect, but I think it will raise productivity through technical merit alone. The lack of drivers and applications will hold back adoption of OS X, but I think that for those who do decide to upgrade, it will be worthwhile.

I offer these tips because it should save you time. I cannot answer all questions that people are having with compiling or installing things on OS X as I have a job as well as ongoing studies. Even Apple is struggling to provide all the answers. There are forums on various Macintosh Web sites where people will likely answer your questions much more comprehensively and much more quickly. Please try contacting the FAQ or the maintainers of each individual project before running for help. As always, RTFM!

Thanks are in order to the people at MacEdition, many of whom contributed to this article with simple dialog about the OS. Thanks also to the people out there who are maintaining Web sites about OS X. Keep up the good work!

Questions, comments and job offers are always welcome.

— Remy Martin

E-mail this story to a friend