<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
  <!ENTITY package "clog">
  <!ENTITY date    "April 2004">
]>

<refentry>
<refentryinfo>
    <address><email>coda@cs.cmu.edu</email></address>
    <copyright>
	<year>1987-2004</year>
	<holder>Carnegie Mellon University</holder>
    </copyright>
    <date>&date;</date>
</refentryinfo>

<refmeta>
    <refentrytitle>&package;</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo>Coda Distributed File System</refmiscinfo>
</refmeta>

<refnamediv>
    <refname>&package;</refname>
    <refpurpose>Authenticate to the Coda distributed file system</refpurpose>
</refnamediv>

<refsynopsisdiv>
    <cmdsynopsis>
	<command>clog</command>
	<arg>-pipe</arg>
	<arg>-test</arg>
	<arg>-host <replaceable>hostname</replaceable></arg>
	<arg>-coda | -kerberos4 | -kerberos5</arg>
	<arg>-tofile <replaceable>file</replaceable></arg>
	<arg>-fromfile <replaceable>file</replaceable></arg>
	<arg choice=req>[username][@realm]</arg>
    </cmdsynopsis>
</refsynopsisdiv>

<refsect1>
    <title>DESCRIPTION</title>
    <para>This command enables users to get tokens to use for authenticated
    communication with a Coda File System.  The given name and a password or
    kerberos token are passed to an <emphasis>Authentication
    Server</emphasis>. The <emphasis>Authentication Server</emphasis> returns
    a set of tokens encoding the chosen identity if the password is correct.
    <command>clog</command> passes these tokens to the
    <command>venus</command> process, which acts as the users agent for file
    manipulation. These tokens have a limited lifetime, becoming invalid after
    25 hours. If an attempt is made to operate on a Coda File System object
    while the user is not authenticated, the user will assume the privileges
    of the <emphasis>Anonymous</emphasis> user.
    </para>
    <para><command>clog</command> accepts the following arguments:
    </para>

    <variablelist>
	<varlistentry>
	<term><option>-pipe</option></term>
	<listitem>
	    <para>For use in shell scripts, the password is read from stdin.
	    This option is also enabled when stdin is not a tty.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>-test</option></term>
	<listitem>
	    <para>Test the clog-venus token passing code.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>-host</option></term>
	<listitem>
	    <para>Specify the host where the authentication server is
	    running.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>-coda | -kerberos4 | -kerberos5</option></term>
	<listitem>
	    <para>Authentication mechanism, use kerberos tickets or coda
	    password to identify yourself to the authentication server.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>-tofile</option></term>
	<listitem>
	    <para>After obtaining a token from the authentication server,
	    write it to a file.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>-fromfile</option></term>
	<listitem>
	    <para>Instead of connecting to the authentication server, read a
	    previously saved token from a file and pass it to venus.</para>
	</listitem>
	</varlistentry>

	<varlistentry>
	<term><option>[username][@realm]</option></term>
	<listitem>
	    <para>Coda user name you wish to be identified as within the
	    specified realm. If the username is not specified, clog tries to
	    use the local login name. If the Coda realm name is not specified
	    clog falls back to using the default realm name as specified in
	    the venus.conf configuration file.</para>
	</listitem>
	</varlistentry>
    </variablelist>
</refsect1>

<refsect1>
    <title>BUGS</title>
    <para>
    <itemizedlist>
    <listitem><para>The on-disk tokens are not encrypted.</para>
    </listitem>
    <listitem><para>The <option>-pipe</option> option should be dropped, there
    already is an isatty(stdin) test which is sufficient for most
    cases.</para>
    </listitem>
    <listitem><para>The <option>-test</option> option should also test the
    reading and writing code of token files.</para>
    </listitem>
    </itemizedlist>
    </para>
</refsect1>

<refsect1>
    <title>SEE ALSO</title>
    <para>
    <citerefentry>
	<refentrytitle>cunlog</refentrytitle>
	<manvolnum>1</manvolnum>
    </citerefentry>,
    <citerefentry>
	<refentrytitle>venus</refentrytitle>
	<manvolnum>8</manvolnum>
    </citerefentry>
    </para>
</refsect1>
	
<refsect1>
    <title>AUTHORS</title>
    <para>
    <itemizedlist>
    <listitem><para>1987, Adapted from AFS-2</para>
    </listitem>
    <listitem><para>Maria R. Ebling, 1990, Created man page</para>
    </listitem>
    <listitem><para>Jan Harkes, 2004, converted to DocBook 4.1</para>
    </listitem>
    </itemizedlist>
    </para>
</refsect1>
</refentry>

