Kerberos
Now it is time to add users to the machine. First, start off with the administrator account.
# kadmin.local
kadmin.local: addprinc admin/admin@
Enter password for principal "admin/admin@
your_password
Re-enter password for principal "admin/admin@
your_password
Principal "admin/admin@YOUR_REALM" created.
Then create a keytab on the server. This will authenticate who can modify things on the server and who cannot. Make sure you place everything on one line (including kadmin/changepw):
kadmin.local: ktadd -k /etc/kadm5.keytab kadmin/admin kadmin/changepw Entry for principal kadmin/admin with kvno 3, encryption type DES-CBC-CRC added to keytab WRFILE:/etc/kadm5.keytab. Entry for principal kadmin/changepw with kvno 3, encryption type DES-CBC-CRC added to keytab WRFILE:/etc/kadm5.keytab.You should see something similar, but probably not identical. Then you have to add the necessary information to the server. Edit your /etc/inetd.conf and insert the following:
krb5_prop 754/tcp # Kerberos v5 slave propagation kerberos-adm 749/tcp # Kerberos v5 admin/chpwd kerberos-adm 749/udp # Kerberos v5 admin/chpwd kpasswd 761/tcp kpwd # Kerberos "passwd" -kfallNow, as root, restart inetd and run krb5kdc and kadmind. Congratulations, most of the pain is over. It took me eight hours to get here my first time trying this—hope you did better.
Now test it. A few commands to know about are kinit, klist and kdestory. These initialize your tickets which authorize you, list them and destroy them. (Yes, from the user's point of view, everything is fairly simple.) So try it out by doing a kinit admin/admin@YOUR_REALM
underground:~> kinit admin/admin Password for admin/admin@UNDER: underground:~> klist Ticket cache: /tmp/krb5cc_1000 Default principal: admin/admin@UNDER Valid starting Expires Service principal 08 May 98 15:04:45 09 May 98 01:04:43 krbtgt/UNDER@UNDER
If you got it to work this far, you are virtually done. Add yourself as a user. Run kadmin—it should ask you for a password, same as the one you typed in way back when you created kadmin/admin. The procedure for adding another user is just as simple. Each user is a “principal” (don't ask me where the name came from).
kadmin: addprinc
Enter password for principal "user@
Re-enter password for principal "user@
Principal "user@YOUR_REALM" created.
Should you make a mistake, just delete the principal like so:
kadmin: delprinc user@
Are you sure you want to delete the principal "user@
Principal "user@YOUR_REALM" deleted.
Now test this out the same way you did the administrator. You
should get a new ticket.
I still haven't explained how to use it, so here we go. In order for you to be able to use Kerberos encrypted services on a machine, it must satisfy the following:
It has a principal host/hostname@REALM on the server
It has the correct services set up.
It has a keytab file and has /etc/inetd.conf set up right.
The easiest way to try this out is to set up the server so that it will let you make encrypted connections, before you attempt to add other machines. The problem is that it is a bit different from setting up another machine. So we are going to say we want to have kerberized TELNET and FTP on the machine pepsi.kellogg.nwu.edu for this example. To do this, you need to satisfy the three requirements above.
Let's go over the first. You are going to need to install Kerberos on the machine you want to offer kerberized services on first. All this means is putting the binaries on the machine (in our example pepsi.kellogg.nwu.edu). So just go install the binaries. You can, if you want, just copy them over. Then copy your /etc/krb5.conf file from the KDC (server) and place it on the machine you are giving kerberized services (pepsi.kellogg.nwu.edu). From that machine, you must run kinit admin/admin. Then run kadmind from your machine (or in my case pepsi.kellogg.nwu.edu) and run the following commands:
kadmin: addprinc host/pepsi.kellogg.nwu.edu
kadmin: addprinc telnet/pepsi.kellogg.nwu.edu
kadmin: addprinc ftp/pepsi.kellogg.nwu.edu
kadmin: ktadd host/pepsi.kellogg.nwu.edu telnet/pepsi.kellogg.nwu.edu
ftp/pepsi.kellogg.nwu.edu
A quick explanation is in order. For each service you plan to offer that is kerberized, you must have a principal. Hence, the use of telnet and ftp with the addprinc command. Then you must make the keytab. That is done by issuing the ktadd command. All of this must be done on the machine, you are setting up to offer services (in this case pepsi.kellogg.nwu.edu).
Finally, edit your /etc/inetd.conf and add the following lines. You will want to comment out any previous definitions of telnet and ftp.
klogin stream tcp nowait root /krb5/sbin/klogind klogind -ki eklogin stream tcp nowait root /krb5/sbin/klogind klogind -eki kshell stream tcp nowait root /krb5/sbin/kshd kshd -ki telnet stream tcp nowait root /krb5/sbin/telnetd telnetd -a valid ftp stream tcp nowait root /krb5/sbin/ftpd -a
Go back to the main server and create yourself a ticket (kinit user@YOUR_REALM). Now make a user (see above addprinc command) for yourself and try to login using telnet like this:
underground:~> telnet -l cosimo pepsi Trying 129.105.197.33... Connected to pepsi.kellogg.nwu.edu (129.105.197.33). Escape character is '^]'. [ Kerberos V5 accepts you as "cosimo@UNDER" ] Last login: Fri May 8 13:44:44 on tty2 Linux 2.0.30. pepsi:~>Note how you didn't have to enter a password. That's okay, because the ticket gave you the access to the machine. The ticket does eventually expire, but it can be renewed by issuing a new kinit command. (Do a klist to see when it does expire. If you copied my /etc/krb5.conf, it will be 600 minutes.)
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- RSS Feeds
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




2 hours 59 min ago
4 hours 25 min ago
8 hours 36 min ago
9 hours 21 min ago
9 hours 31 min ago
9 hours 36 min ago
11 hours 46 min ago
11 hours 47 min ago
12 hours 32 min ago
13 hours 21 min ago