Kerberos is a powerful set of programs which allow you to have encrypted connections to virtually anything: TELNET, FTP and even e-mail. This is of little use to the modem user, but in larger settings where Ethernet is used and sniffing is a real danger, Kerberos provides a viable and powerful solution. There is, however, one problem—Kerberos is notoriously known for being overly complex and difficult to install. This article is designed to help you make a good start; before you know it, with a little experimentation everything will (kind of) work. I wish I could explain everything in detail here, but then, this would be a book, not an article.
Like almost every major upgrade/change, it would be ideal to make a backup of your system. If you can, do it. If you don't have a tape drive be careful installing, Kereberos shouldn't write over your files, but if you want to be sure, make copies of /sbin somewhere. It takes two seconds and if something goes wrong it will be well worth your time.
Now we go grab the files. There are binary and source distributions of Kerberos for Linux. I've found that the source usually causes me less problems than the binaries. If you are up to playing around a bit go ahead and get the source, otherwise grab the binaries. Either can be found at http://web.mit.edu/kerberos/www/. I'll cover only the binaries here—simply because compiling the source isn't part of the scope of this article. I'm going to assume you managed to install things right. One important note: If you do choose to use the source (I recommend you do) make sure you extract all the tar archive files, not just the one containing the source. Also, if you install things in a different directory (not /krb5) then you will need to modify the files mentioned below to reflect your installation directory.
These two files control virtually everything. They control the name of your REALM (see below) and who can connect; however, they can be fairly complex. Before you set them up, you will probably need to understand a few terms:
REALM: I think of a realm as a “group”. Machines will belong to this group. It has become almost standard procedure to make the realm the same as your domain name, just with capital letters. In my case, I called it UNDER, but you could call it anything you wanted. Yes, you can have more than one REALM, but you probably won't need one. Remember—the REALM is case sensitive! Pick a standard and stick to it.
KEYTAB: a file that contains encrypted information allowing users/machines to authenticate themselves. Each machine that attempts to authenticate itself to the KDC (see below) must have one. This is done by issuing the ktadd command under kadmin.
KDC: the Kerberos Distribution Center—the one that causes you headaches. This is the machine that controls access.
PRINCIPAL: a principal is a “definition” of a user or a host. It is, effectively, what tells the server a user exists or a server is trusted.
INCIDENT: when making a new principal, the notation is as follows: incident/host@REALM. For example, with ktadd, doing something like
would make the incident host for the machine pepsi.kellogg.nwu.edu which is part of the UNDER realm.
Take a look at my /etc/krb5.conf file and notice the following:
default_realm = UNDER: name of your realm.
profile = /krb5/var/krb5kdc/kdc.conf: location of your kdc.conf file
Also note the section called [realms]. Under it, I have the name of my realm, UNDER, and the machine that hosts that information, in this case, underground.kellogg.nwu.edu. This will be the hostname of where you just installed Kerberos. [domain_realm] explains who can connect to the realm: anyone from anywhere within kellogg and within res-hall (the dorm rooms at Northwestern). Replace all the information mentioned above with the name of your REALM and the name of the machine you installed the server on.
Now on to your kdc.conf file. You are going to need to place it wherever you defined it in /etc/krb5.conf. My suggestion is you place it in the same directory I did. This will mean making these directories. If you do that, you can just copy my kdc.conf and save yourself some time. Just change the name of the realm to whatever you picked when making krb5.conf file. These two files are integral to making things work. You may want to double check for typos and possibly save yourself some headaches later.
Now, some tedious but easy work must be done. Create the database that controls who can login where by issuing the following command:
# kdb5_util create -r Initializing database '/krb5/lvar/krb5kdc/principal' for realm ' master key name 'K/M@YOUR_REALM'
In my case, YOUR_REALM would have been UNDER. Just replace it with whatever the host name of the machine you are on right now is. You will be asked for a master password; pick something you won't forget.
Now you must make an ACL file. This basically controls who can connect and administer the REALM. It can also be complex, but for our purposes we will keep it simple. Edit the file (or create) defined by acl = in the kdc.conf file. Place the following on a line by itself:
This means the administrator can control things. I don't see why you would want anything else anyway.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- Stunnel Security for Oracle
- SourceClear Open
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Google's SwiftShader Released
- Non-Linux FOSS: Caffeine!
- Parsing an RSS News Feed with a Bash Script
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide