by Michael J. Norton
Learning computer technology these days can seem overwhelming. It's not the technology itself that is the root of this evil; it's often the size of the book that we must drag home from the Super Crown bookstore.
True system administration requires attention to detail, but in this age, I fear we are drowning in a little too much information. Do you really need a thousand-page book in order to become a Linux Administrator in 28 Days? Can anyone read a thousand-page Unix guide in 28 days? That's the real question.
Perhaps all you really need is a little practical direction. I know from personal experience that Linux administrators come from all walks of life. A Linux admin can be a precocious teenager enthralled with the wonders of technology, or a secretary in a small office with newly expanded job duties, or someone just looking to improve themselves for a better job.
Where to start? The truth of the matter is that professionals in this field today probably own the big Linux books, but it wasn't these books that helped them when they first started learning their craft. Today's successful administrators had someone called a mentor. Someone to SHOW them how to configure a Unix system. This is how many admins learned their trade.
Living Linux - How does a new Linux user go about getting day-to-day tasks accomplished? This series of articles by Michael Stutz offers some solutions to newbies and advanced users alike.
FreeBSD Basics - Dru Lavigne's series on FreeBSD includes useful tips and tutorials that can often be helpful to Linux users as well.
This guide should help you get started in the basics of small office system Linux administration. We'll go step by step: setting up the network interface connection, creating user accounts, and then some simple package installation. Once these are configured, you can then consult the really big books.
Setting up the network connection
Probably wasn't any longer than 18 months ago when the standard equipment for getting online was a 56K modem. How things have changed. DSL and the cable modem are rapidly becoming the standard means of Internet connection for the small office/home office environment.
Both the DSL and cable modem service providers typically assign an IP address to clients in your network using Dynamic Host Configuration Protocol (DHCP). IP addresses for your network are most likely assigned by your DSL router or cable modem, which have a pre-assigned range of addresses for your equipment. You will need to configure your Linux system to request addresses from a DHCP server.
I'll walk you through a DHCP configuration. In this example, I have an administrator, Dr. Morbius, who is setting up a Linux system to store a database on important research he is conducting. He has completed the installation of Linux onto his system and now he is configuring his network interface so he can use his Netscape browser.
At the moment, the only account available to Dr. Morbius is the user root. Which is okay, because he will need to modify some privileged network files in the
Dr. Morbius will need to create a configuration file for his Ethernet adapter. He changes his current directory to
/etc/sysconfig/network-scripts and creates the file
This file contains the following configurations for DHCP:
DEVICE=eth0 IPADDR= NETMASK= ONBOOT=yes BOOTPROTO=dhcp BROADCAST= NETWORK= USERCTL=no
Dr. Morbius closes this file after a careful inspection for typos. He then changes his current directory over to
/etc/sysconfig and edits the file
network. The following changes are made by Morbius for his DHCP connection:
NETWORKING=yes FORWARD_IPV4=no HOSTNAME='altairIV.unitedplanets.com' DOMAINNAME=unitedplanets.com GATEWAY=0.0.0.0 GATEWAYDEV=eth0
Dr. Morbius is from the old school of Unix; he really likes using
vi. However, he's aware that under the GNOME window environment, when logged in as user root, there is a graphical interface to accomplish the same thing under the caption "Another Level of Menus," followed out to "Administration."
Now, Dr. Morbius is working on a workstation running LinuxPPC. He wants to use the
pump utility to initialize his DHCP interface. The LinuxPPC installation does not install pump, so Dr. Morbius must install it from his LinuxPPC 2000 CD. This is easily accomplished when Morbius mounts his CD-ROM drive.
mount /dev/cdrom /mnt/cdrom cd /mnt/cdrom/software
This is a quick example of how the CD-ROM is mounted on your system so you may access it. Dr. Morbius keeps in the back of his mind that he should later add this device to the
To install the pump software, Dr. Morbius uses the Redhat Package Manager utility, called rpm. The install is simple.
rpm -i pump-0.7.2-2.ppc.rpm
The pump utility is then installed onto Dr. Morbius' LinuxPPC workstation. He next brings up his network interface by typing the command
pump -i eth0
Our good doctor waits a moment and then the interface initializes. Morbius can also view the specifics of his connection by typing the command
pump -s. More information on
pump can be found on the man pages, the online manual for most Unix operations, for
Adding user accounts
When your Linux system first boots, you'll have at least one user account, root. For initial setup, having the root super user account is okay. A safer approach is to create a user account and use this for most of your Linux usage needs. If you're learning Unix administration, creating user accounts is a basic and frequent task in system management.
Most Unix operating systems provide a utility for adding users. As super user (root), you can use the tool
adduser. You may want to examine the man pages on the exact syntax of this command. At your prompt, type
man adduser and hit the return key. Take a moment to examine the syntax; it may look like garble at the moment, but we'll examine the arguments to this command. (The term arguments identifies the options we will use with this command.)
Now the task at hand is to create a new user. The very first user account you should create is one for yourself. As I mentioned, using your system as user root is not advised. For this example, Dr. Morbius has chosen to use the tc shell for his activities and would like for his new account to reside in the
/home directory. As a user, Dr. Morbius will also need a unique ID, uid, so he will use his employee ID, 2257.
Now, having read the man pages, Dr. Morbius takes a bold step and creates a user account for himself. Using the utility
adduser, he types the following:
adduser morbius -d /home/morbius -u 2257 -s /bin/tcsh -c "Krell Research Admin"
The account login name is
morbius, the home directory (the
-d option from the
man page) is
/home/morbius with user ID (the
-u option is uid)
2257, and the login shell is the tc shell. Now, in simple terms, this is what this means: Whenever Dr. Morbius logs into his system, he will log in as user morbius, and his default directory will be
What's a uid?
A unique ID (uid) is a 32-bit integer that is paired with a login name. The super user, root, is assigned the uid of 0. You will want to start assigning your users unique IDs starting at or above the integer 100. Most IS organizations pair the employee number with the user login, since the employee number is unique within the company. In our example, Dr. Morbius is employee 2257 and we used this for his uid.
This unique pairing of login names and IDs is important especially in networked environments where privileges to different Linux machines are to be assigned. An example would be using Network File Services (NFS).
What files does adduser modify?
The boot of the man pages for function
adduser clearly identifies which files this utility modifies. Two files the utility changes are
passwd file is primarily the key file where we create the user account. The
adduser command added the following line to create the morbius account:
morbius:x:2257:2257:Krell Research Admin:/home/morbius:/bin/tcsh
The other file modified is
/etc/shadow which contains the encrypted password string. Currently, there is no password for the morbius account. We can create one in the following manner,
passwd morbiusChanging password for user morbius New UNIX password: Retype new UNIX password: Passwd: all authentication tokens updated successfully
Pages: 1, 2