oidentd doesnt work with znc, ... #824

Closed
opened 2026-10-05 04:46:42 +02:00 by adam · 6 comments
Owner

Not sure where the problem comes from, here is my stetting:

/etc/oident.conf

user "znc" {
    default {
        allow spoof
        allow spoof_all
        allow spoof_privport
        allow random
        allow hide
    }
}

znc files incl. config stored in /etc/znc
.oidentd.conf is also stored in /etc/znc

I run znc as a service with -d /etc/znc, ... works without problem

After installed oidentd at least my bouncers got the ident: znc - like the user who runs znc, .. but not the defined ident

used this instruction: http://wiki.znc.in/Identfile
but replaced the /msg *identfile setfile ~/.oidentd.conf with /msg *identfile setfile /etc/znc/.oidentd.conf

also set the rights, even tried to give it 777, ... doesnt work

dont know where the problem comes from

Not sure where the problem comes from, here is my stetting: /etc/oident.conf ``` user "znc" { default { allow spoof allow spoof_all allow spoof_privport allow random allow hide } } ``` znc files incl. config stored in /etc/znc .oidentd.conf is also stored in /etc/znc I run znc as a service with -d /etc/znc, ... works without problem After installed oidentd at least my bouncers got the ident: znc - like the user who runs znc, .. but not the defined ident used this instruction: http://wiki.znc.in/Identfile but replaced the /msg *identfile setfile ~/.oidentd.conf with /msg *identfile setfile /etc/znc/.oidentd.conf also set the rights, even tried to give it 777, ... doesnt work dont know where the problem comes from <!-- github-sync-id:311531060 -->
adam closed this issue 2026-10-05 04:46:42 +02:00
Author
Owner

Is $HOME of "znc" user /etc/znc? oidentd reads .oident.conf in the user's
homedir. Is /etc/znc/ readable by oidentd? (more precisely, chmod +x)

2018-04-05 10:14 GMT+01:00 Veit notifications@github.com:

Not sure where the problem comes from, here is my stetting:

/etc/oident.conf

user "znc" {
default {
allow spoof
allow spoof_all
allow spoof_privport
allow random
allow hide
}
}

znc files incl. config stored in /etc/znc
.oidentd.conf is also stored in /etc/znc

I run znc as a service with -d /etc/znc, ... works without problem

After installed oidentd at least my bouncers got the ident: znc - like the
user who runs znc, .. but not the defined ident

used this instruction: http://wiki.znc.in/Identfile
but replaced the /msg *identfile setfile ~/.oidentd.conf with /msg
*identfile setfile /etc/znc/.oidentd.conf

also set the rights, even tried to give it 777, ... doesnt work

dont know where the problem comes from

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/znc/znc/issues/1510, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAT15C9i5ILVzs2Q82Ux0SszNo3hH9iXks5tleBcgaJpZM4TIG99
.

Is $HOME of "znc" user /etc/znc? oidentd reads .oident.conf in the user's homedir. Is /etc/znc/ readable by oidentd? (more precisely, chmod +x) 2018-04-05 10:14 GMT+01:00 Veit <notifications@github.com>: > Not sure where the problem comes from, here is my stetting: > > /etc/oident.conf > > user "znc" { > default { > allow spoof > allow spoof_all > allow spoof_privport > allow random > allow hide > } > } > > znc files incl. config stored in /etc/znc > .oidentd.conf is also stored in /etc/znc > > I run znc as a service with -d /etc/znc, ... works without problem > > After installed oidentd at least my bouncers got the ident: znc - like the > user who runs znc, .. but not the defined ident > > used this instruction: http://wiki.znc.in/Identfile > but replaced the /msg *identfile setfile ~/.oidentd.conf with /msg > *identfile setfile /etc/znc/.oidentd.conf > > also set the rights, even tried to give it 777, ... doesnt work > > dont know where the problem comes from > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <https://github.com/znc/znc/issues/1510>, or mute the thread > <https://github.com/notifications/unsubscribe-auth/AAT15C9i5ILVzs2Q82Ux0SszNo3hH9iXks5tleBcgaJpZM4TIG99> > . > <!-- github-comment-id:378879183 -->
Author
Owner

Not sure, maybe I made some mistake at some point. Here is my way of setting it up:

  1. downloaded and compiled with just a littel configuration: ./configure --prefix=/usr/

  2. add new user:

adduser --disabled-password --no-create-home --gecos "" znc 
mkdir /etc/znc 
chown -R znc:znc /etc/znc
  1. make config:
    su -c "znc -d /etc/znc --makeconf" znc

  2. add znc.service

[Unit]
Description=ZNC - IRC Bouncer
Requires=nss-user-lookup.target
After=network-online.target nss-user-lookup.target 

[Service]
User=znc
ExecStart=/usr/bin/znc -d /etc/znc --foreground 
ExecReload=/bin/kill -HUP 
Restart=on-failure
KillSignal=SIGINT
SuccessExitStatus=2

[Install]
WantedBy=multi-user.target

ZNC runs like a charm, but i got ~ident@ ... so I installed oidentd, and changed the config, like the first post

than I loaded the ident modul and configured it

/msg *status loadmod identfile
/msg *identfile setfile /etc/znc/.oidentd.conf
/msg *identfile setformat global { reply "%user%" }

Than I restarted oidentd and znc.

but all I got is znc@.... as ident

I noticed, /etc/znc/moddata/identfile/.registry store some information

File %2f;etc%2f;znc%2f;%2e;oidentd%2e;conf
Format global%20;%7b;%20;reply%20;%22;%25;user%25;%22;%20;%7d;

Also /etc/znc/.oidentd.conf keeps empty, never mind if znc is running or not


Also tried to add the information directly in the znc config

ISpoofFile = /etc/znc/.oidentd.conf
ISpoofFormat =global { reply "%user%" }

... with the result that this just overwrite the /etc/znc/moddata/identfile/.registry


So it seems like the ident modul want to work, .. but doesnt do anything, it doesnt put any information in .oidentd.conf, ...

Not sure, maybe I made some mistake at some point. Here is my way of setting it up: 1) downloaded and compiled with just a littel configuration: ./configure --prefix=/usr/ 2) add new user: ``` adduser --disabled-password --no-create-home --gecos "" znc mkdir /etc/znc chown -R znc:znc /etc/znc ``` 3) make config: `su -c "znc -d /etc/znc --makeconf" znc` 4) add znc.service ``` [Unit] Description=ZNC - IRC Bouncer Requires=nss-user-lookup.target After=network-online.target nss-user-lookup.target [Service] User=znc ExecStart=/usr/bin/znc -d /etc/znc --foreground ExecReload=/bin/kill -HUP Restart=on-failure KillSignal=SIGINT SuccessExitStatus=2 [Install] WantedBy=multi-user.target ``` _________________________________________ ZNC runs like a charm, but i got ~ident@ ... so I installed oidentd, and changed the config, like the first post than I loaded the ident modul and configured it ``` /msg *status loadmod identfile /msg *identfile setfile /etc/znc/.oidentd.conf /msg *identfile setformat global { reply "%user%" } ``` Than I restarted oidentd and znc. but all I got is znc@.... as ident I noticed, /etc/znc/moddata/identfile/.registry store some information ``` File %2f;etc%2f;znc%2f;%2e;oidentd%2e;conf Format global%20;%7b;%20;reply%20;%22;%25;user%25;%22;%20;%7d; ``` Also /etc/znc/.oidentd.conf keeps empty, never mind if znc is running or not ___________________________________ Also tried to add the information directly in the znc config ``` ISpoofFile = /etc/znc/.oidentd.conf ISpoofFormat =global { reply "%user%" } ``` ... with the result that this just overwrite the /etc/znc/moddata/identfile/.registry __________________________________ So it seems like the ident modul want to work, .. but doesnt do anything, it doesnt put any information in .oidentd.conf, ... <!-- github-comment-id:378887892 -->
Author
Owner

Could you run the following (as root or as the znc user), make znc reconnect to irc and see if your ident becomes "test"? Also, what does echo ~znc produce as output?

echo ~znc
echo 'global { reply "test" }' > ~znc/.oidentd.conf
chmod a+r ~znc/.oidentd.conf
chmod a+x ~znc/
Could you run the following (as root or as the znc user), make znc reconnect to irc and see if your ident becomes "test"? Also, what does `echo ~znc` produce as output? ``` echo ~znc echo 'global { reply "test" }' > ~znc/.oidentd.conf chmod a+r ~znc/.oidentd.conf chmod a+x ~znc/ ``` <!-- github-comment-id:378888825 -->
Author
Owner
root@r3v:~# echo ~znc
/home/znc
root@r3v:~# echo 'global { reply "test" }' > ~znc/.oidentd.conf
-bash: /home/znc/.oidentd.conf: Datei oder Verzeichnis nicht gefunden

Which means he doesn't find the dir, ... I guess i have to change the dir first.

I changed like this:

usermod -m -d /etc/znc znc

another try:

root@r3v:~# echo ~znc
/etc/znc
root@r3v:~# echo ~znc
/etc/znc
root@r3v:~# echo 'global { reply "test" }' > ~znc/.oidentd.conf
root@r3v:~# chmod a+r ~znc/.oidentd.conf
root@r3v:~# chmod a+x ~znc/
root@r3v:~# service znc start

The funny thing is, ... my ident doesnt become "test" but actually it becomes the ident I setup with znc:

znc_ident@...

So basically its working, I just dont know why.

I guess:

  1. I forget about the homedir, by changing it to /etc/znc, oidentd was checking for the .oidentd.conf
  2. Seems like the file wasnt excetuable before that - I just changed the permission to 755 for the .oidentd.conf

Thanks a lot for your help guys!!!! You are awesome!

But one thing still confuses me, ... my .oidentd.conf still doesnt contain any information about the connected znc ident, .. it just contains global { reply "test" }. How this is possible?

``` root@r3v:~# echo ~znc /home/znc root@r3v:~# echo 'global { reply "test" }' > ~znc/.oidentd.conf -bash: /home/znc/.oidentd.conf: Datei oder Verzeichnis nicht gefunden ``` Which means he doesn't find the dir, ... I guess i have to change the dir first. I changed like this: `usermod -m -d /etc/znc znc` another try: ``` root@r3v:~# echo ~znc /etc/znc root@r3v:~# echo ~znc /etc/znc root@r3v:~# echo 'global { reply "test" }' > ~znc/.oidentd.conf root@r3v:~# chmod a+r ~znc/.oidentd.conf root@r3v:~# chmod a+x ~znc/ root@r3v:~# service znc start ``` The funny thing is, ... my ident doesnt become "test" but actually it becomes the ident I setup with znc: ` znc_ident@...` So basically its working, I just dont know why. I guess: 1) I forget about the homedir, by changing it to /etc/znc, oidentd was checking for the .oidentd.conf 2) Seems like the file wasnt excetuable before that - I just changed the permission to 755 for the .oidentd.conf Thanks a lot for your help guys!!!! You are awesome! But one thing still confuses me, ... my .oidentd.conf still doesnt contain any information about the connected znc ident, .. it just contains global { reply "test" }. How this is possible? <!-- github-comment-id:378891571 -->
Author
Owner

So basically its working, I just dont know why.

Well, because you fixed it with:

usermod -m -d /etc/znc znc

oidentd still looks for the file in znc's home directory, but instead of getting a "no such file" error, this time it actually finds the information it needs.

But one thing still confuses me, ... my .oidentd.conf still doesnt contain any information about the connected znc ident, .. it just contains global { reply "test" }. How this is possible?

ZNC only overwrites the file while it tries to connect to some IRC server. Afterwards it restores the old content.

> So basically its working, I just dont know why. Well, because you fixed it with: > usermod -m -d /etc/znc znc oidentd still looks for the file in znc's home directory, but instead of getting a "no such file" error, this time it actually finds the information it needs. > But one thing still confuses me, ... my .oidentd.conf still doesnt contain any information about the connected znc ident, .. it just contains global { reply "test" }. How this is possible? ZNC only overwrites the file while it tries to connect to some IRC server. Afterwards it restores the old content. <!-- github-comment-id:378892483 -->
Author
Owner

The file doesn't need to be executable, the directory needs - otherwise
oidentd won't be able to read the file.

2018-04-05 11:37 GMT+01:00 Veit notifications@github.com:

Thanks a lot 👍 :3

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/znc/znc/issues/1510#issuecomment-378893063, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAT15G3FZHK-dFy9kYR1sFeWxL8Mmk9Mks5tlfPdgaJpZM4TIG99
.

The file doesn't need to be executable, the directory needs - otherwise oidentd won't be able to read the file. 2018-04-05 11:37 GMT+01:00 Veit <notifications@github.com>: > Thanks a lot 👍 :3 > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/znc/znc/issues/1510#issuecomment-378893063>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AAT15G3FZHK-dFy9kYR1sFeWxL8Mmk9Mks5tlfPdgaJpZM4TIG99> > . > <!-- github-comment-id:378963261 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#824