SSERVER(8)

πŸ’– SSERVER(8) β€” the MIT Kerberos era πŸ’–

okay bestie, welcome to sserver, the sample Kerberos version 5 server. yes it's a demo app. yes it's iconic. let's get into it 🫢


✨ NAME ✨

sserver β€” a sample Kerberos version 5 server. it's giving "test that Kerberos actually works on this machine" and honestly? we love a low-stakes queen πŸ‘‘


🌸 SYNOPSIS 🌸

sserver [ -p port ] [ -S keytab ] [ server_port ]

πŸ¦‹ DESCRIPTION πŸ¦‹

sserver and sclient are a simple demonstration client/server application. when sclient connects to sserver, it performs a Kerberos authentication, and then sserver hands back to sclient the Kerberos principal that was used for the Kerberos authentication. it's literally the perfect little vibe check that Kerberos got installed successfully on a machine ✨

the service name used by sserver and sclient is sample. so sserver requires that there be a keytab entry for the service

sample/hostname.domain.name@REALM.NAME

that keytab is generated using the kadmin program. and the keytab file is usually installed as

FILE:/etc/krb5.keytab

the -S option lets you point at a different keytab than the default one. no gatekeeping πŸ’…

sserver is normally invoked out of inetd(8), using a line in /etc/inetd.conf that looks like this:

sample stream tcp nowait root /usr/local/sbin/sserver sserver

and since sample is normally not a port defined in /etc/services, you'll usually have to add a line to /etc/services that looks like this:

sample          13135/tcp

when you're using sclient, first you gotta have an entry in the Kerberos database β€” that's a kadmin job β€” and then you have to get Kerberos tickets, that's a kinit job. also, if you're running the sclient program on a different host than the sserver it'll be connecting to, be sure that both hosts have an entry in /etc/services for the sample tcp port, and that the same port number is in both files. matching ports or it's not gonna slay 😭

when you run sclient you should see something like this:

sendauth succeeded, reply is:
reply len 32, contents:
You are nlgilman@JIMI.MIT.EDU

πŸ’€ COMMON ERROR MESSAGES πŸ’€

ngl these are the ones you'll actually run into. read them, love them, fix them 🫢

  1. kinit returns the error:
kinit: Client not found in Kerberos database while getting
       initial credentials

this means that you didn't create an entry for your username in the Kerberos database. you're not in the group chat yet bestie πŸ’”

  1. sclient returns the error:
unknown service sample/tcp; check /etc/services

this means that you don't have an entry in /etc/services for the sample tcp port.

  1. sclient returns the error:
connect: Connection refused

this probably means you didn't edit /etc/inetd.conf correctly, or you didn't restart inetd after editing inetd.conf. the classic "i changed it but forgot to restart" moment πŸ™ˆ

  1. sclient returns the error:
sclient: Server not found in Kerberos database while using
         sendauth

this means that the sample/hostname@LOCAL.REALM service was not defined in the Kerberos database; it should be created using kadmin, and a keytab file needs to be generated to make the key for that service principal available for sclient.

  1. sclient returns the error:
sendauth rejected, error reply is:
    "No such file or directory"

this probably means sserver couldn't find the keytab file. it was probably not installed in the proper directory. keytab missing = main character missing 😭


🌈 ENVIRONMENT 🌈

see kerberos for a description of Kerberos environment variables. iykyk 🌟


πŸ‘‘ SEE ALSO πŸ‘‘

sclient, kerberos, services(5), inetd(8)


πŸ’œ AUTHOR πŸ’œ

MIT


1985-2026, MIT


and that's the whole page bestie!! this cutie is from MIT Kerberos, version 1.22.2, and it's been holding it down since way back. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from