Using oidentd With ZNC

You can use oidentd to spoof ident replies so that they match idents configured within ZNC.

Append the following to your system-wide configuration file:

user username {
    default {
        allow spoof

        # Use this if ZNC needs to spoof local user names
        allow spoof_all

Replace username with the user name of the ZNC user (example: znc).

Change to the user running ZNC (e.g., using su znc -ls "$SHELL"), and use the following commands to create an empty user configuration file:

touch ~/.oidentd.conf
chmod 0644 ~/.oidentd.conf

Ensure that the home directory is world-executable (mode 0711) so that oidentd is able to read the configuration file:

chmod 0711 ~

Ensure that ZNC’s identfile module is loaded and configured correctly:

/MSG *status LoadMod identfile
/MSG *identfile SetFile ~/.oidentd.conf
/MSG *identfile SetFormat global { reply "%user%" }
/MSG *status SaveConfig

Note that %user% expands to the name of the ZNC user that initiated the connection. Another popular choice is %ident%, which allows users to specify any ident. %ident% should not be used on public instances. Other possible values are listed in ExpandString.

Your changes will take effect after you reload oidentd and reconnect to IRC.