def authfile_replace(value, getent_info):
    """
    Replace function for option AuthorizedKeysFiles
    """
    user = getent_info.keys()[0]
    user_home = getent_info[user][4]

    # Literal %
    value = value.replace("%%", "%")
    # Home directory of the user being authenticated
    value = value.replace("%h", user_home)
    # Username of that user
    value = value.replace("%u", user)
    # Home directory symbol
    value = value.replace("~", user_home)

    return value