Kerberos for users
Last updated -[Sun Oct 9 10:12:27 2005 by cxh]-
Kerberos Introduction
Kerberos is an authentication scheme that helps avoid snooping
problems. See the
Departmental Kerberos page for users
for instructions on how to use kerberos. This page is a
supplement to the sww instructions, not a replacement.
You can register yourself from argon.EECS, conviction.CS,
mho.EECS diva.EECS, fred.EECS, hera.EECS, karenin.EECS, perth.CS,
po.EECS, radon.EECS, toe.CS, or vangogh.CS with the
/usr/kerberos/bin/register
program. Note that there might be a delay
of one hour before your ticket is propagated around correctly.
The binary to run is /usr/kerberos/bin/register
You can try using
/usr/kerberos/bin/kinit
to
initialize a ticket on your local machine. Don't run
kinit
over the net, you should run it before you
start X in the morning, or in your console window.
To use kerberos rlogin
and other binaries, place /usr/kerberos/bin
in
your path. Note that Solaris machines have kerberos too, so
/usr/kerberos/bin
should be before
/usr/bin
in your path. Some solaris users have
reported that to see the Kerberos man pages, they have to use
man -k
, which forces the man command to use the
MANPATH
environment variable
Why use kerberos?
Kerberos Problems
These instructions are for users who are running Unix at a remote
site, and don't have access to sww and do not have root access
to their remote machine.
The idea here is that you download a rlogin binary to your
remote machine do a little configuration and then use the
rlogin binary to connect to a kerberos only machine. The
rlogin binary should prompt you for a kerberos password before
connecting to a kerberos machine.
If you are in the UCB eecs department, see the Kerberos distribution
page for tar files for certain architectures.
To use these binaries, do the following
- Ftp the appropriate binary to your remote site. The
binaries are not available via anonymous ftp, so there is a
bit of a chicken and egg problem. If you have an account on
the Mho cluster, but can't log in because you don't have
kerberos setup locally then send mail to me (cxh).
- The binary must be renamed to
rlogin
, or you
will get a usage message:
visigoth.EECS.Berkeley.EDU 32# ./rlogin.sol2
usage: rlogin host [-option] [-option...] [-k realm ] [-t ttytype] [-l username]
where option is e, 7, 8, noflow, n, a, x, or c
You should also make it executable:
mv sparc-sun-sunos4.1.3-cygin rlogin
chmod a+x rlogin
- Because of a minor bug in the binaries, you will need to
copy
/etc/krb.conf
to
/tmp/kerberos.lib.krb.conf
on your local machine.
You can change this path by editing the binary with emacs, but
the new path must have the same length as the old path.
- Note that you can use the
-x
option to encrypt
your session:
rlogin -8x watson.eecs.berkeley.edu
Here's what I had to do to set up kerberos on a SunOS machine
at home, where I had root access.
- Copy
/usr/sww/kerberosIV/bin
to the remote HIP machine. On a campus machine of the right
architecture I did:cd /usr/sww/kerberosIV/bin;
/usr/sww/bin/gtar -zcf /tmp/sww.krb.bin.sol2.tar.gz .
Use
rcp
or ftp to transfer the file to the remote
HIP machine.
If you are in the UCB eecs department, see the Kerberos distribution
page for tar files for certain architectures, along with
a copy of kerberize
, which you will also need.
- Then on the remote machine, as root I did
mkdir -p /usr/sww/kerberosIV/bin
cd /usr/sww/kerberosIV/bin;
set path = ($path /usr/sww/bin)
/usr/sww/bin/gtar -zxf /tmp/sww.krb.bin.sol2.tar.gz
- Copy
/usr/sww/etc/kerberize
to the remote
HIP machine.
You may see a message about broken pipe
at the end
of the kerberize
script, which you can ignore.
-
kerberize needs
/usr/sww/bin/perl5
.
On the campus machine, you may want to do cp
/usr/sww/bin/perl5 /tmp; gzip /tmp/perl5
and then copy over the
compressed binary to /usr/sww/bin/perl5
- On the remote HIP machine, as root, run
/usr/sww/etc/kerberize
. You will be prompted for
the /etc/krb.srvtab
file, which is used only if
you want to allow kerberized logins into your machine. If
your machine is in the eecs subdomain, then you can follow
the instructions in the
/usr/sww/share/doc/security/kerberos/quick-start
Otherwise, you can just proceed.
- Place
/usr/sww/kerberosIV/bin
in your path.
You should then be able to run kinit
If you are in the UCB eecs department, see the Kerberos distribution
page for a Macintosh Self Extracting archive containing
a kerberized version of NCSA telnet
The same version is available on cory and po
in
/usr/sww/share/src/mac/CS_Kerberos_Telnet.sea.hqx
.
Mac Kerberos Problems
If you are in the UCB eecs department, see the Kerberos distribution
page for a Windows zip file containing kerberos distribution
The cns and telnet binary seem to work ok with NT.
Under NT, Kerberos for windows uses two files
C:\WINNT\krb.con
and C:\\WINNT\krb.rea
.
These correspond to the Unix files /etc/krb.conf
and
/etc/krb.realms
, except they have only three letters in
their prefix. The two links below are copies of /etc/krb.conf
and /etc/krb.realms
, which you can download to your
NT box.
Under Windows3.1, Mike Williamson said that putting these files in
c:\windows
worked for him.
To get a ticket, run the CNS
binary, and type in your
kerberos Id, which should be the same as your login, and the realm,
which should be EECS.BERKELEY.EDU
. The
Instance
field should be left blank. Then hit the
Login
button, and after a few seconds, you should get a
ticket.
To login, start up the cns telnet
binary, and type in
a hostname. It seems that the cns telnet binary may fail to connect to Solaris machines that are not set up for kerberos only logins. As of 12/2/96, I was able to log into brahe.eecs.berkeley.edu and diva.eecs.berkeley.edu.
If you resize the telnet window by grabbing the lower left corner,
then the next time you restart cns telnet, the window should come up
in the new size. When you telnet into solaris, you may need to type
reset
so that the solaris side gets the window dimensions
CNS Telnet troubleshooting
CNS Telnet Windows bugs
Below are some frequently asked questions about the local Kerberos
installation. The Top Level Kerberos page
has links to faqs about Kerberos in general. If you are having
problems with a particular platform, look at the appropriate section
above.
- Why are we doing this?
- Basically for security reasons. It is very easy to sniff the net
and get passwords. Winter break is the time when most breakins
occur. Staff is frequently on vacation, and crackers get new
toys for xmas, and have plenty of time on their hands.
- I log in from offsite, and kerberos makes is difficult.
- Sorry. The machines on campus are primarily for people on
campus. Unfortunately, remote users take the brunt of the
burden of switching over to kerberos. I'm willing to work
with remote users, but there is only so much I can do, so I'm
expecting remote users to help out a little.
- How can I set my kerberos password if I am never on campus?
- The easiest way to do this is to register for a kerberos password and
start up an encrypted rlogin session and change your password
with
kpasswd
.
Be sure to use /usr/sww/krb5/bin/kpasswd
instead of /usr/kerberos/bin/kpasswd
or
/usr/sww/kerberosIV/bin/kpasswd
.
To start an encrypted session:
See the
Departmental Kerberos page for users
for information about kpasswd
.
- I'm having problems with XXX.
- Make sure that
/usr/kerberos/bin
is in your path first.
Carefully read this page and the
Departmental Kerberos page for users
- I lost my password.
- Check out the instructions in the
Departmental Kerberos page for users
- When I try to register, I get
kerberos1.CS.Berkeley.EDU: Principal not unique
Instead of getting the confirmation message
kerberos1.CS.Berkeley.EDU: Update complete
- The most likely cause is that you have already registered once.
If you forgot your password, see the question above.
One way to tell if you have registered before is to
try the kinit
command with your uid:
cxh@kahn 5% kinit cxh
Kerberos Initialization for "cxh"
WARNING: Your password may be exposed if you enter it here and are logged
in remotely using an unsecure (non-encrypted) channel.
Kerberos Password:
kinit: Password incorrect
Here is an example of running kinit
on a uid
that is not yet registered into the Kerberos system:
cxh@kahn 6% kinit notregistered
Kerberos Initialization for "notregistered"
WARNING: Your password may be exposed if you enter it here and are logged
in remotely using an unsecure (non-encrypted) channel.
kinit: Principal unknown
- Why aren't we using XXX instead of this nasty Kerberos
system?
- Kerberos is what the department has embraced, I'm sure that there
are other systems out there. However, I personally don't have the
time to research other systems. For a replacement to kerberos
to be considered it should have the following features
- What about
pop
and ftp
?
- The non-kerberized versions of
pop
and
ftp
will continue to work until we get working
kerberized versions installed, and we get kerberized pop and
ftp clients that work under Unix, Mac and Windows.
We have not yet been able to get a kerberized
popd
to run, see the
kerberos administrators guide for more information. We
have a ftpd
daemon working, though it is a little
buggy, see the kerberos
administrators guide.
- Well, doesn't having non-kerberized
popd
and
ftpd
defeat the purpose of kerberizing
telnetd
and rlogind
?
- Yes, having non-kerberized
popd
and ftpd
definitely undermine kerberos.
Also, having the rest of the department making kerberos
mandatory is also a big lose.
However, most users do not use pop, and only a few ftps by
cluster users occur every day. However, there are many logins
from outside the cluster everyday.
You can always grab files without typing your password by
telnetting in with kerberos, placing files in your public_html
directory and grabbing them via netscape. If you are really
paranoid, you can create a ~/public_html/uploads
directory and put a .htaccess
file in that
directory that only allows access from your own list of
machines
To place files on the mho cluster, you must use ftp. In
theory, we could set up an anonymous ftp server on another
machine that would allow people to place files in an uploads
directory.
- I've tried to setup kerberos, but I'm behind a firewall.
- As of 12/11/96, I don't know of anyone who has used the above binaries
from behind a firewall. If you get kerberos working from behind
a firewall, let me know.
I'm not a big firewall expert, but my guess is that the
firewall is filtering out the kerberos traffic because it is
not on a port that is allowed to pass through.
You might ask your local network guru if they have
ever successfully used kerberos from behind the firewall.
Perhaps if you ask real nicely, they might allow the firewall
to be modified so that you can log in to remote machines with
out typing in your password over the net in clear text, or having
a ~/.rhosts
file.
- What is
krb.srvtab
?
- This file is only needed if you want to allow kerberized logins
into your machine.
krb.srvtab
is different for
each machine. Kerberos uses krb.srvtab
to to verify that
each machine is really the machine it says it is.
If your machine name ends in cs.berkeley.edu
or .eecs.berkeley.edu
, then you can request a krb.srvtab
file, see
Sww user documentation at
/usr/sww/share/doc/security/kerberos/quick-start
(Dead link)
cxh at eecs