This past week I set up Kerberos authentication for all the machines on my network. One of those machines is our media computer which I want to login automatically and start up MythTV. In the past, I’ve used a `su – mythtv -c startx` call in /etc/rc.local to auto login.
With the new system, I’m also mounting /home over NFS with Kerberos authentication so normally we’d need to enter in mythtv’s password before getting access to /home/mythtv as well as all the media it needs access to. So instead we need to use a keytab for the mythtv user – http://kb.iu.edu/data/aumh.html#create
Next, we need to get the ticket into the session before trying to mount /home and start up.
`su – mythtv -c “kinit mythtv@JHULST.COM -k -t /etc/mythtv.keytab”` This will error out at trying to mount /home but it will get the ticket cached for mythtv.
After this you can then run `su – mythtv -c startx`. On my system I needed to put a sleep statement in between the two statements or else the mount would fail.
This is somewhat insecure with the auto login thing that gives network credentials automatically. In my setup the mythtv user has limited privileges, but you’ll want to think about that before going forward with this.