System Administration Made Simpler, Part 2
Happy 2000, everyone! I hope all of you had a great, eventful New Year's celebration followed by a completely uneventful Y2K rollover on your various systems. If you are feeling refreshed and anxious to simplify your system administration tasks, then read on.
Last time we talked, I mentioned that Linux's great problem is the perception that it's just too difficult for the average person to administer, a perception I hope to change. Several people have commented that Webmin was really cool and they finally had an easy way to administer their various Linux and UNIX boxes. That makes me happy. However, as the saying goes, "there's more than one way to do it". So, let's look at another way.
Enter linuxconf. If your system is a Red Hat one, or if you are running GNOME as your desktop, then you probably already have linuxconf loaded. If not, you can get it from the source by visiting Jacques Gelinas' web site, the official home of linuxconf.
It is available in a source tarball as well as distributions for Caldera, Red Hat, Slackware and SuSE. Unlike our previous contender for simpler system administration, linuxconf is strictly for Linux (as its name implies).
Unlike many programs, linuxconf is particularly interesting in that it is designed to work in a number of different environments. There is a text (or ncurses)-based interface, an X interface (on my Red Hat system, it is based on GNOME) and a web interface. Another thing that distinguishes this program is it views itself in two different ways. One is as a configuration utility; the second is as a control system, where you can do things like shut down and reboot the system, create cron entries, or install software.
To activate the web interface, you will need to do a few things first. Since we will use linuxconf to make those changes, it gives us a good excuse to tour the text (or X) interface. Start linuxconf from the command line, like this.
# linuxconf &
You will notice linuxconf starts with a simple menu that is essentially a hierarchical view of its functions. The layout is much the same as you would find in graphical file managers. There are two major sections, Config and Control. Each can be expanded or collapsed by clicking the plus or minus sign in front of each section (or subsection). If you were using the simple text version, navigating from one section to another is simply a matter of tabbing from one area to another and moving up and down with your cursor keys.
To activate the web interface, you would click on "Networking" followed by "Network" and then "Misc". Under the misc branch (or menu), choose the option "linuxconf network access". This is your HTML access control. Now click on the radio button labeled "Enable network access". If you want to log access through the web interface, click the "Log Access" radio button. The default output for the log file is /var/log/htmlaccess.log.
The last step you really need to add is either a host or domain entry. On my system, I added my whole internal network 192.168.22.0. The last step is to click on "Accept", then on "Quit". Linuxconf will then inform you that changes have been made to various configurations. You can accept and activate these changes, or just plain quit. Activate the changes, and linuxconf will terminate.
To use linuxconf via a web browser, you should know it runs on port 98. Check this out for yourself using the following command.
# grep linuxconf /etc/services
You should get this reply to the above command:
Now, check your /etc/inetd.conf file, and using your favorite text editor, uncomment (or add, if it is not there) the following line:
linuxconf stream tcp wait root /bin/linuxconf linuxconf --http
You will then need to restart inetd in order to activate this change. You can do this by finding the inetd process and doing a kill -SIGHUP.
# ps ax | grep inetd 395 ? S 0:00 inetd 7332 pts/0 S 0:00 grep inetd # kill -SIGHUP 395
If you are feeling particularly brave, you can do a kill -1 pid. Just keep in mind one of my favorite warnings: a kill -1 looks an awful lot like kill 1 (the second would crash your system).
To start the web interface, enter a URL with the following format:
When linuxconf starts up in your browser, it will inform you of the modules currently installed and provide you with a start button. Clicking this will cause an authentication window to pop up, where you will enter your user name and password.
Try experimenting with the various interfaces to decide what you like best. I should point out that the X Window GUI provides some interesting "direct access" commands that are somewhat slicker than their linuxconf menu alternates. For instance, network functions can be accessed simply by typing netconf. User administration is also a single command away with userconf. I look forward to more development in these areas, because the look is important if Linux is to take over the desktop.
You can also access linuxconf modules directly from the command line. To find out what these options are (and there are many), type the following command:
# linuxconf --help
There is one last file you might want to take a look at. This is the configuration file, located at /etc/conf.linuxconf. Here's what mine looks like right now:
[base] LINUXCONF.distribution redhat module.list 1 redhatppp module.list 1 treemenu module.list 1 inittab module.list 1 motd module.list 1 dnsconf module.list 1 apache module.list 1 samba module.list 1 mailconf module.list 1 wuftpd kmaildbtype./etc/mail/virtusertable hash notice.10-welcome.help 924195811 [netaccess] htmlaccess.from 192.168.22.0 htmlaccess.dolog 1 htmlaccess.enable 1
Note the change to the netaccess paragraph at the end, where we enabled htmlaccess to network 192.168.22.0.
Linuxconf is flexible enough in that it works with your regular system files. You can make changes in any of your system files manually, and then make other changes with linuxconf. I mention this because much earlier versions of linuxconf seemed to be in a battle for control of my system configuration files. I would make manual changes, only to lose them when I used linuxconf. This no longer seems to be a problem. This was probably tied in to what could be a powerful feature of this package, multiple system profiles. This is something I can see as being quite interesting if I should want to muck about with my system (testing various bits of software) and I want to return to a known configuration. It also seems like a good idea for mobile users who move from one configuration to another (one network environment to another, for instance).
The product is in continuous development, and new functionality is always being added. In writing this article, I started with the stock distribution of linuxconf (from my Red Hat 6.0 system), then downloaded the latest to see the changes. Indeed, linuxconf is a dynamic product with a great deal of heart and energy behind it. If you are looking for some way to simplify Linux system administration, this is another tool that you owe yourself to examine.
Anyway, that's it for now. While some may argue about the significance of that 2 followed by those 3 zeroes, there is no question that 2000 has arrived, and with it, a palpable sense of excitement about things to come. I'm quite sure this feeling is alive in the Linux world as well. As we move forward into whatever you may wish to call this new era, Linux stands at the door of the Holy Grail of acceptance, the desktop. Simple, fun tools for administration will make that goal a reality.
So, until next time, remember the KISS rule: Keep it Simple, Sysadmin.
Webinar: 8 Signs You’re Beyond Cron
11am CDT, April 29th
Join Linux Journal and Pat Cameron, Director of Automation Technology at HelpSystems, as they discuss the eight primary advantages of moving beyond cron job scheduling. In this webinar, you’ll learn about integrating cron with an enterprise scheduler.Join us!
- New Products
- Users, Permissions and Multitenant Sites
- Not So Dynamic Updates
- March 2015 Issue of Linux Journal: High-Performance Computing
- Flexible Access Control with Squid Proxy
- Security in Three Ds: Detect, Decide and Deny
- Tighten Up SSH
- DevOps: Everything You Need to Know
- Solving ODEs on Linux
- Non-Linux FOSS: MenuMeters