username (seen to the IRC server) remains constant across all servers #840

Closed
opened 2026-10-05 04:48:00 +02:00 by adam · 7 comments
Owner

ZNC uses the internal usernamer connected to the bouncer as the username provided to the IRC servers it connects to (as reflected by /whois yournick). This is less than desirable, and should be allowed to be set per network.

So far I have not seen any options to change this.

ZNC uses the internal usernamer connected to the bouncer as the username provided to the IRC servers it connects to (as reflected by /whois yournick). This is less than desirable, and should be allowed to be set per network. So far I have not seen any options to change this. <!-- github-sync-id:326091408 -->
adam closed this issue 2026-10-05 04:48:00 +02:00
Author
Owner

Assuming you mean the username in the ident field (where we see nickname!znc@hostname for full user mask patterns), take a look at the identfile module (and setting up an ident daemon with it) (https://wiki.znc.in/Identfile)

This usually resolves this issue, assuming this is the issue you are talking about. (since whois output differs slightly from IRC client to IRC client I can't be certain this is what you are talking about without seeing exemplars of what you are seeing and what in that output you are referencing).

Assuming you mean the username in the ident field (where we see nickname!znc@hostname for full user mask patterns), take a look at the identfile module (and setting up an ident daemon with it) (https://wiki.znc.in/Identfile) This usually resolves this issue, assuming this is the issue you are talking about. (since whois output differs slightly from IRC client to IRC client I can't be certain this is what you are talking about without seeing exemplars of what you are seeing and what in that output you are referencing). <!-- github-comment-id:391694160 -->
Author
Owner

Yes, that's pretty much it. I suppose identfile would be compatible with chrooted znc, right?

Yes, that's pretty much it. I suppose identfile would be compatible with chrooted znc, right? <!-- github-comment-id:391695053 -->
Author
Owner

I haven't ever run ZNC inside a chroot so I can't answer that question. (I'm not sure if the chroot will prohibit using identfile, if the ident daemon is serving 'znc' and you can configure it accordingly then it should work I think, but chroots are not the common way of running ZNC)

I haven't ever run ZNC inside a chroot so I can't answer that question. (I'm not sure if the chroot will prohibit using identfile, if the ident daemon is serving 'znc' and you can configure it accordingly then it should work I think, but chroots are not the common way of running ZNC) <!-- github-comment-id:391696101 -->
Author
Owner

I will check later and report back.

Per-network CTCP replies would also be best. As it is now, it is easy to single out a privacy-conscious user by analyzing his CTCP replies and ident, matching across networks :(

I will check later and report back. Per-network CTCP replies would also be best. As it is now, it is easy to single out a privacy-conscious user by analyzing his CTCP replies and ident, matching across networks :( <!-- github-comment-id:391699394 -->
Author
Owner

Something I noticed: ZNC has per-network ident settings, why is this not respected then? I don't see why we would need an extra step. What is it useful for then? (the ident setting per network)

EDIT: Missing in the wiki, but you can use with the string expansion:

*identfile setformat global { reply "%ident%" }
I hope this helps!

Something I noticed: ZNC has per-network ident settings, why is this not respected then? I don't see why we would need an extra step. What is it useful for then? (the ident setting per network) EDIT: Missing in the wiki, but you can use with the string expansion: `*identfile setformat global { reply "%ident%" } ` I hope this helps! <!-- github-comment-id:391702823 -->
Author
Owner

The ident setting is overridden if an identd is running and responds when the IRC server queries it on connect. On a machine with no ident service running, the ircd will use what it's given by znc (via the setting), usually with a ~ prefix to indicate that it's not verified by an ident service.

The identfile module exists to let znc pass the configured ident to the running identd during connection to the IRC network, so the setting will be used instead of whatever the identd would send otherwise (the username of the account running znc, probably).

Disclaimer: Typed on mobile, mistakes or typos may happen. 😸

The ident setting is overridden if an identd is running and responds when the IRC server queries it on connect. On a machine with no ident service running, the ircd will use what it's given by znc (via the setting), usually with a `~` prefix to indicate that it's not verified by an ident service. The identfile module exists to let znc pass the configured ident to the running identd during connection to the IRC network, so the setting will be used instead of whatever the identd would send otherwise (the username of the account running znc, probably). _Disclaimer: Typed on mobile, mistakes or typos may happen. :smile_cat:_ <!-- github-comment-id:391715035 -->
Author
Owner

@vogelfreiheit see https://wiki.znc.in/ExpandString for all ExpandString replacements.

@vogelfreiheit see https://wiki.znc.in/ExpandString for all ExpandString replacements. <!-- github-comment-id:391886662 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#840