def checkPassword(user, pswd, service, default_realm):
    """
    This function provides a simple way to verify that a user name and password
    match those normally used for Kerberos authentication.
    It does this by checking that the supplied user name and password can be
    used to get a ticket for the supplied service.
    If the user name does not contain a realm, then the default realm supplied
    is used.

    For this to work properly the Kerberos must be configured properly on this
    machine.
    That will likely mean ensuring that the edu.mit.Kerberos preference file
    has the correct realms and KDCs listed.

    IMPORTANT: This method is vulnerable to KDC spoofing attacks and it should
    only used for testing. Do not use this in any production system - your
    security could be compromised if you do.

    @param user: A string containing the Kerberos user name.
        A realm may be included by appending an C{"@"} followed by the realm
        string to the actual user id.
        If no realm is supplied, then the realm set in the default_realm
        argument will be used.

    @param pswd: A string containing the password for the user.

    @param service: A string containing the Kerberos service to check access
        for.
        This will be of the form C{"sss/xx.yy.zz"}, where C{"sss"} is the
        service identifier (e.g., C{"http"}, C{"krbtgt"}), and C{"xx.yy.zz"} is
        the hostname of the server.

    @param default_realm: A string containing the default realm to use if one
        is not supplied in the user argument.
        Note that Kerberos realms are normally all uppercase (e.g.,
        C{"EXAMPLE.COM"}).

    @return: True if authentication succeeds, false otherwise.
    """
